Commit 114313c
authored
fix(cli-plugin-eslint): make eslint deps optional (#3068)
1. In @vue/cli-plugin-eslint 3.1.0+, eslint will be explicitly added to
the project's package.json, so it is **optional**.
2. `optionalDependencies` will still be installed by npm by default,
just no longer cause installation to fail when error happens.
3. ESLint v4 did cause weird errors sometimes, like `npm WARN
ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed.`
Though this warning never caused any errors on my machine, I think it's
good to make the plugin fail-safe.1 parent f819f51 commit 114313c
File tree
2 files changed
+6
-2
lines changed- packages/@vue
- cli-plugin-eslint
- cli-service-global
2 files changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | | - | |
31 | 29 | | |
32 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
0 commit comments