Skip to content

Commit 3565cc1

Browse files
author
Mohsen Azimi
committed
enable noUnusedLocals
1 parent 0d50f94 commit 3565cc1

6 files changed

Lines changed: 20 additions & 1 deletion

lib/HotModuleReplacement.runtime.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@
55
/*global $hash$ $requestTimeout$ installedModules $require$ hotDownloadManifest hotDownloadUpdateChunk hotDisposeChunk modules */
66
module.exports = function() {
77
var hotApplyOnUpdate = true;
8+
// @ts-ignore
89
var hotCurrentHash = $hash$; // eslint-disable-line no-unused-vars
910
var hotRequestTimeout = $requestTimeout$;
1011
var hotCurrentModuleData = {};
1112
var hotCurrentChildModule; // eslint-disable-line no-unused-vars
13+
// @ts-ignore
1214
var hotCurrentParents = []; // eslint-disable-line no-unused-vars
15+
// @ts-ignore
1316
var hotCurrentParentsTemp = []; // eslint-disable-line no-unused-vars
1417

18+
// @ts-ignore
1519
// eslint-disable-next-line no-unused-vars
1620
function hotCreateRequire(moduleId) {
1721
var me = installedModules[moduleId];
@@ -80,6 +84,7 @@ module.exports = function() {
8084
return fn;
8185
}
8286

87+
// @ts-ignore
8388
// eslint-disable-next-line no-unused-vars
8489
function hotCreateModule(moduleId) {
8590
var hot = {
@@ -206,6 +211,7 @@ module.exports = function() {
206211
});
207212
}
208213

214+
// @ts-ignore
209215
// eslint-disable-next-line no-unused-vars
210216
function hotAddUpdateChunk(chunkId, moreModules) {
211217
if (!hotAvailableFilesMap[chunkId] || !hotRequestedFilesMap[chunkId])

lib/node/NodeMainTemplate.runtime.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
*/
55
/*global installedChunks $hotChunkFilename$ hotAddUpdateChunk $hotMainFilename$ */
66
module.exports = function() {
7+
// @ts-ignore
78
// eslint-disable-next-line no-unused-vars
89
function hotDownloadUpdateChunk(chunkId) {
910
var chunk = require("./" + $hotChunkFilename$);
1011
hotAddUpdateChunk(chunk.id, chunk.modules);
1112
}
1213

14+
// @ts-ignore
1315
// eslint-disable-next-line no-unused-vars
1416
function hotDownloadManifest() {
1517
try {
@@ -20,6 +22,7 @@ module.exports = function() {
2022
return Promise.resolve(update);
2123
}
2224

25+
// @ts-ignore
2326
//eslint-disable-next-line no-unused-vars
2427
function hotDisposeChunk(chunkId) {
2528
delete installedChunks[chunkId];

lib/node/NodeMainTemplateAsync.runtime.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*/
55
/*global installedChunks $hotChunkFilename$ $require$ hotAddUpdateChunk $hotMainFilename$ */
66
module.exports = function() {
7+
// @ts-ignore
78
// eslint-disable-next-line no-unused-vars
89
function hotDownloadUpdateChunk(chunkId) {
910
var filename = require("path").join(__dirname, $hotChunkFilename$);
@@ -21,6 +22,7 @@ module.exports = function() {
2122
});
2223
}
2324

25+
// @ts-ignore
2426
// eslint-disable-next-line no-unused-vars
2527
function hotDownloadManifest() {
2628
var filename = require("path").join(__dirname, $hotMainFilename$);
@@ -37,6 +39,7 @@ module.exports = function() {
3739
});
3840
}
3941

42+
// @ts-ignore
4043
//eslint-disable-next-line no-unused-vars
4144
function hotDisposeChunk(chunkId) {
4245
delete installedChunks[chunkId];

lib/web/JsonpMainTemplate.runtime.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
*/
55
/*globals hotAddUpdateChunk parentHotUpdateCallback document XMLHttpRequest $require$ $hotChunkFilename$ $hotMainFilename$ $crossOriginLoading$ */
66
module.exports = function() {
7+
// @ts-ignore
78
// eslint-disable-next-line no-unused-vars
89
function webpackHotUpdateCallback(chunkId, moreModules) {
910
hotAddUpdateChunk(chunkId, moreModules);
1011
if (parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules);
1112
} //$semicolon
1213

14+
// @ts-ignore
1315
// eslint-disable-next-line no-unused-vars
1416
function hotDownloadUpdateChunk(chunkId) {
1517
var head = document.getElementsByTagName("head")[0];
@@ -20,6 +22,7 @@ module.exports = function() {
2022
head.appendChild(script);
2123
}
2224

25+
// @ts-ignore
2326
// eslint-disable-next-line no-unused-vars
2427
function hotDownloadManifest(requestTimeout) {
2528
requestTimeout = requestTimeout || 10000;

lib/webworker/WebWorkerMainTemplate.runtime.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,20 @@
44
*/
55
/*globals installedChunks hotAddUpdateChunk parentHotUpdateCallback importScripts XMLHttpRequest $require$ $hotChunkFilename$ $hotMainFilename$ */
66
module.exports = function() {
7+
// @ts-ignore
78
// eslint-disable-next-line no-unused-vars
89
function webpackHotUpdateCallback(chunkId, moreModules) {
910
hotAddUpdateChunk(chunkId, moreModules);
1011
if (parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules);
1112
} //$semicolon
1213

14+
// @ts-ignore
1315
// eslint-disable-next-line no-unused-vars
1416
function hotDownloadUpdateChunk(chunkId) {
1517
importScripts($require$.p + $hotChunkFilename$);
1618
}
1719

20+
// @ts-ignore
1821
// eslint-disable-next-line no-unused-vars
1922
function hotDownloadManifest(requestTimeout) {
2023
requestTimeout = requestTimeout || 10000;
@@ -57,6 +60,7 @@ module.exports = function() {
5760
});
5861
}
5962

63+
// @ts-ignore
6064
//eslint-disable-next-line no-unused-vars
6165
function hotDisposeChunk(chunkId) {
6266
delete installedChunks[chunkId];

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
2929

3030
/* Additional Checks */
31-
// "noUnusedLocals": true, /* Report errors on unused locals. */
31+
"noUnusedLocals": true, /* Report errors on unused locals. */
3232
// "noUnusedParameters": true, /* Report errors on unused parameters. */
3333
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
3434
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */

0 commit comments

Comments
 (0)