Introduction to the
ESLint plugin for Webpack
And eslint – loader
Eslint-loader will soon be deprecated, use eslint-webpack-plugin instead.
NPM WARN deprecated eslint-loader@4.0.2: This loader has been deprecated. Please use eslint-webpack-plugin
Installation, configuration, use
npm install eslint --save-dev
npm install eslint-webpack-plugin --save-dev
Copy the code
In your WebPack configuration:
const ESLintPlugin = require('eslint-webpack-plugin');
module.exports = {
// ...
plugins: [new ESLintPlugin(options)],
// ...
};
Copy the code
Refer to the link
www.febeacon.com/webpack-plu…