Skip to content

Commit e1e73c8

Browse files
docs: add section to migrate from eslint-loader (#14)
1 parent 6634d96 commit e1e73c8

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,43 @@ The plugin was born with the purpose of solving some problems of the [eslint-loa
2626
| Using cache directly from eslint | :heavy_check_mark: | :heavy_multiplication_x: |
2727
| Lint only changed files | :heavy_check_mark: | :heavy_multiplication_x: |
2828

29+
## Migrate from `eslint-loader`
30+
31+
The loader `eslint-loader` will be deprecated soon, please use this plugin instead.
32+
33+
Before:
34+
35+
```js
36+
module.exports = {
37+
// ...
38+
module: {
39+
rules: [
40+
{
41+
test: /\.js$/,
42+
exclude: /node_modules/,
43+
loader: 'eslint-loader',
44+
options: {
45+
// eslint options (if necessary)
46+
},
47+
},
48+
],
49+
},
50+
// ...
51+
};
52+
```
53+
54+
After:
55+
56+
```js
57+
const ESLintPlugin = require('eslint-webpack-plugin');
58+
59+
module.exports = {
60+
// ...
61+
plugins: [new ESLintPlugin(options)],
62+
// ...
63+
};
64+
```
65+
2966
## Install
3067

3168
```bash

0 commit comments

Comments
 (0)