From dcfdae1bbc79d5506675185137a36c13b398e47b Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Fri, 30 Aug 2024 17:18:24 +0200 Subject: [PATCH] REmove useless eslint disabling comments Those lines don't report such error. --- lib/loaders/css.js | 2 +- lib/loaders/handlebars.js | 2 +- lib/loaders/less.js | 2 +- lib/loaders/sass.js | 2 +- lib/loaders/stylus.js | 2 +- lib/loaders/typescript.js | 4 ++-- lib/loaders/vue.js | 2 +- lib/plugins/notifier.js | 2 +- lib/plugins/vue.js | 2 +- lib/webpack/copy-files-loader.js | 2 +- package.json | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/loaders/css.js b/lib/loaders/css.js index e00b44b8..c78f5522 100644 --- a/lib/loaders/css.js +++ b/lib/loaders/css.js @@ -57,7 +57,7 @@ module.exports = { }; cssLoaders.push({ - loader: require.resolve('postcss-loader'), //eslint-disable-line node/no-unpublished-require + loader: require.resolve('postcss-loader'), options: applyOptionsCallback(webpackConfig.postCssLoaderOptionsCallback, postCssLoaderOptions) }); } diff --git a/lib/loaders/handlebars.js b/lib/loaders/handlebars.js index 190f6f40..237ff16f 100644 --- a/lib/loaders/handlebars.js +++ b/lib/loaders/handlebars.js @@ -28,7 +28,7 @@ module.exports = { return [ { - loader: require.resolve('handlebars-loader'), //eslint-disable-line node/no-unpublished-require + loader: require.resolve('handlebars-loader'), options: applyOptionsCallback(webpackConfig.handlebarsConfigurationCallback, options) } ]; diff --git a/lib/loaders/less.js b/lib/loaders/less.js index 3f48d781..2d13f2d1 100644 --- a/lib/loaders/less.js +++ b/lib/loaders/less.js @@ -33,7 +33,7 @@ module.exports = { return [ ...cssLoader.getLoaders(webpackConfig, useCssModules), { - loader: require.resolve('less-loader'), //eslint-disable-line node/no-unpublished-require + loader: require.resolve('less-loader'), options: applyOptionsCallback(webpackConfig.lessLoaderOptionsCallback, config) }, ]; diff --git a/lib/loaders/sass.js b/lib/loaders/sass.js index c380ed1a..cbd81e31 100644 --- a/lib/loaders/sass.js +++ b/lib/loaders/sass.js @@ -52,7 +52,7 @@ module.exports = { }); sassLoaders.push({ - loader: require.resolve('sass-loader'), //eslint-disable-line node/no-unpublished-require + loader: require.resolve('sass-loader'), options: applyOptionsCallback(webpackConfig.sassLoaderOptionsCallback, config) }); diff --git a/lib/loaders/stylus.js b/lib/loaders/stylus.js index 51809354..4a2d7afc 100644 --- a/lib/loaders/stylus.js +++ b/lib/loaders/stylus.js @@ -33,7 +33,7 @@ module.exports = { return [ ...cssLoader.getLoaders(webpackConfig, useCssModules), { - loader: require.resolve('stylus-loader'), //eslint-disable-line node/no-unpublished-require + loader: require.resolve('stylus-loader'), options: applyOptionsCallback(webpackConfig.stylusLoaderOptionsCallback, config) }, ]; diff --git a/lib/loaders/typescript.js b/lib/loaders/typescript.js index 608caaaf..8b3f44e7 100644 --- a/lib/loaders/typescript.js +++ b/lib/loaders/typescript.js @@ -40,7 +40,7 @@ module.exports = { config.transpileOnly = true; // add forked ts types plugin to the stack - const forkedTypesPluginUtil = require('../plugins/forked-ts-types'); // eslint-disable-line + const forkedTypesPluginUtil = require('../plugins/forked-ts-types'); forkedTypesPluginUtil(webpackConfig); } @@ -54,7 +54,7 @@ module.exports = { let loaders = babelLoader.getLoaders(webpackConfig); return loaders.concat([ { - loader: require.resolve('ts-loader'), //eslint-disable-line node/no-unpublished-require + loader: require.resolve('ts-loader'), // @see https://github.com/TypeStrong/ts-loader/blob/master/README.md#available-options options: config } diff --git a/lib/loaders/vue.js b/lib/loaders/vue.js index c7a889e9..2cefd906 100644 --- a/lib/loaders/vue.js +++ b/lib/loaders/vue.js @@ -30,7 +30,7 @@ module.exports = { return [ { - loader: require.resolve('vue-loader'), //eslint-disable-line node/no-unpublished-require + loader: require.resolve('vue-loader'), options: applyOptionsCallback(webpackConfig.vueLoaderOptionsCallback, options) } ]; diff --git a/lib/plugins/notifier.js b/lib/plugins/notifier.js index aaf42fc8..d1ea319b 100644 --- a/lib/plugins/notifier.js +++ b/lib/plugins/notifier.js @@ -33,7 +33,7 @@ module.exports = function(plugins, webpackConfig) { title: 'Webpack Encore' }; - const WebpackNotifier = require('webpack-notifier'); // eslint-disable-line + const WebpackNotifier = require('webpack-notifier'); plugins.push({ plugin: new WebpackNotifier( applyOptionsCallback(webpackConfig.notifierPluginOptionsCallback, notifierPluginOptions) diff --git a/lib/plugins/vue.js b/lib/plugins/vue.js index 3690ffcc..01fb8cd9 100644 --- a/lib/plugins/vue.js +++ b/lib/plugins/vue.js @@ -25,7 +25,7 @@ module.exports = function(plugins, webpackConfig) { return; } - const { VueLoaderPlugin } = require('vue-loader'); // eslint-disable-line node/no-unpublished-require + const { VueLoaderPlugin } = require('vue-loader'); plugins.push({ plugin: new VueLoaderPlugin(), diff --git a/lib/webpack/copy-files-loader.js b/lib/webpack/copy-files-loader.js index 3b2d991f..04a22864 100644 --- a/lib/webpack/copy-files-loader.js +++ b/lib/webpack/copy-files-loader.js @@ -84,7 +84,7 @@ module.exports.default = function loader(source) { } }); - const fileLoader = require('file-loader'); // eslint-disable-line node/no-unpublished-require + const fileLoader = require('file-loader'); // If everything is OK, let the file-loader do the copy return fileLoader.bind(this)(source); diff --git a/package.json b/package.json index c1553f29..f0aee60a 100755 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "test": "yarn run test:main && yarn run test:persistent-cache", "test:main": "mocha --reporter spec test --recursive --ignore test/persistent-cache/*", "test:persistent-cache": "node run-persistent-tests", - "lint": "eslint lib test index.js .eslintrc.js", + "lint": "eslint lib test index.js .eslintrc.js --report-unused-disable-directives", "travis:lint": "yarn run lint" }, "bin": {