You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added [new `-error` config variants](https://eslint.vuejs.org/user-guide/#bundle-configurations-eslint-config-js), with all rules' severity set to `error`: `strongly-recommended-error`, `recommended-error`, `vue2-strongly-recommended-error`, `vue2-recommended-error` (along with their flat config equivalents)
Copy file name to clipboardExpand all lines: docs/user-guide/index.md
+20-8Lines changed: 20 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,15 +64,21 @@ You can use the following configs by adding them to `eslint.config.js`.
64
64
-`*.configs["flat/base"]` ... Settings and rules to enable correct ESLint parsing.
65
65
- Configurations for using Vue.js 3.x:
66
66
-`*.configs["flat/essential"]` ... `base`, plus rules to prevent errors or unintended behavior.
67
-
-`*.configs["flat/strongly-recommended"]` ... Above, plus rules to considerably improve code readability and/or dev experience.
68
-
-`*.configs["flat/recommended"]` ... Above, plus rules to enforce subjective community defaults to ensure consistency.
67
+
-`*.configs["flat/strongly-recommended"]` ... `essential`, plus rules to considerably improve code readability and/or dev experience.
68
+
-`*.configs["flat/strongly-recommended-error"]` ... Same as `strongly-recommended`, except with all rules configured to error instead of warn.
69
+
-`*.configs["flat/recommended"]` ... `strongly-recommended`, plus rules to enforce subjective community defaults to ensure consistency.
70
+
-`*.configs["flat/recommended-error"]` ... Same as `recommended`, except with all rules configured to error instead of warn.
69
71
- Configurations for using Vue.js 2.x:
70
72
-`*.configs["flat/vue2-essential"]` ... `base`, plus rules to prevent errors or unintended behavior.
71
-
-`*.configs["flat/vue2-strongly-recommended"]` ... Above, plus rules to considerably improve code readability and/or dev experience.
72
-
-`*.configs["flat/vue2-recommended"]` ... Above, plus rules to enforce subjective community defaults to ensure consistency
73
+
-`*.configs["flat/vue2-strongly-recommended"]` ... `vue2-essential`, plus rules to considerably improve code readability and/or dev experience.
74
+
-`*.configs["flat/vue2-strongly-recommended-error"]` ... Same as `vue2-strongly-recommended`, except with all rules configured to error instead of warn.
75
+
-`*.configs["flat/vue2-recommended"]` ... `vue2-strongly-recommended`, plus rules to enforce subjective community defaults to ensure consistency.
76
+
-`*.configs["flat/vue2-recommended-error"]` ... Same as `vue2-recommended`, except with all rules configured to error instead of warn.
73
77
74
78
:::warning Reporting rules
75
79
By default, all rules from **base** and **essential** categories report ESLint errors. Other rules - because they're not covering potential bugs in the application - report warnings. What does it mean? By default - nothing, but if you want - you can set up a threshold and break the build after a certain amount of warnings, instead of any. More information [here](https://eslint.org/docs/user-guide/command-line-interface#handling-warnings).
80
+
81
+
Alternatively, there are versions of the configs with all rules set to error suffixed with `-error` that you can use.
76
82
:::
77
83
78
84
#### Specifying Globals (`eslint.config.js`)
@@ -186,15 +192,21 @@ You can use the following configs by adding them to `extends`.
186
192
-`"plugin:vue/base"` ... Settings and rules to enable correct ESLint parsing.
187
193
- Configurations for using Vue.js 3.x:
188
194
-`"plugin:vue/essential"` ... `base`, plus rules to prevent errors or unintended behavior.
189
-
-`"plugin:vue/strongly-recommended"` ... Above, plus rules to considerably improve code readability and/or dev experience.
190
-
-`"plugin:vue/recommended"` ... Above, plus rules to enforce subjective community defaults to ensure consistency.
195
+
-`"plugin:vue/strongly-recommended"` ... `essential`, plus rules to considerably improve code readability and/or dev experience.
196
+
-`"plugin:vue/strongly-recommended-error"` ... Same as `strongly-recommended`, except with all rules configured to error instead of warn.
197
+
-`"plugin:vue/recommended"` ... `strongly-recommended`, plus rules to enforce subjective community defaults to ensure consistency.
198
+
-`"plugin:vue/recommended-error"` ... Same as `recommended`, except with all rules configured to error instead of warn.
191
199
- Configurations for using Vue.js 2.x:
192
200
-`"plugin:vue/vue2-essential"` ... `base`, plus rules to prevent errors or unintended behavior.
193
-
-`"plugin:vue/vue2-strongly-recommended"` ... Above, plus rules to considerably improve code readability and/or dev experience.
194
-
-`"plugin:vue/vue2-recommended"` ... Above, plus rules to enforce subjective community defaults to ensure consistency.
201
+
-`"plugin:vue/vue2-strongly-recommended"` ... `vue2-essential`, plus rules to considerably improve code readability and/or dev experience.
202
+
-`"plugin:vue/vue2-strongly-recommended-error"` ... Same as `vue2-strongly-recommended`, except with all rules configured to error instead of warn.
203
+
-`"plugin:vue/vue2-recommended"` ... `vue2-strongly-recommended`, plus rules to enforce subjective community defaults to ensure consistency.
204
+
-`"plugin:vue/vue2-recommended-error"` ... Same as `vue2-recommended`, except with all rules configured to error instead of warn.
195
205
196
206
:::warning Reporting rules
197
207
By default, all rules from **base** and **essential** categories report ESLint errors. Other rules - because they're not covering potential bugs in the application - report warnings. What does it mean? By default - nothing, but if you want - you can set up a threshold and break the build after a certain amount of warnings, instead of any. More information [here](https://eslint.org/docs/user-guide/command-line-interface#handling-warnings).
208
+
209
+
Alternatively, there are versions of the configs with all rules set to error suffixed with `-error` that you can use.
0 commit comments