Skip to content

Commit

Permalink
Prefix eslintrc configs with vue2-
Browse files Browse the repository at this point in the history
  • Loading branch information
FloEdelmann committed Dec 13, 2024
1 parent 159c877 commit eb6d0c6
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions docs/user-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ You can use the following configs by adding them to `extends`.
- `"plugin:vue/vue3-strongly-recommended"` ... Above, plus rules to considerably improve code readability and/or dev experience.
- `"plugin:vue/vue3-recommended"` ... Above, plus rules to enforce subjective community defaults to ensure consistency.
- Configurations for using Vue.js 2.x:
- `"plugin:vue/essential"` ... `base`, plus rules to prevent errors or unintended behavior.
- `"plugin:vue/strongly-recommended"` ... Above, plus rules to considerably improve code readability and/or dev experience.
- `"plugin:vue/recommended"` ... Above, plus rules to enforce subjective community defaults to ensure consistency
- `"plugin:vue/vue2-essential"` ... `base`, plus rules to prevent errors or unintended behavior.
- `"plugin:vue/vue2-strongly-recommended"` ... Above, plus rules to considerably improve code readability and/or dev experience.
- `"plugin:vue/vue2-recommended"` ... Above, plus rules to enforce subjective community defaults to ensure consistency

:::warning Reporting rules
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).
Expand Down
6 changes: 3 additions & 3 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ declare const vue: {
configs: {
base: Linter.LegacyConfig

essential: Linter.LegacyConfig
'strongly-recommended': Linter.LegacyConfig
recommended: Linter.LegacyConfig
'vue2-essential': Linter.LegacyConfig
'vue2-strongly-recommended': Linter.LegacyConfig
'vue2-recommended': Linter.LegacyConfig

'vue3-essential': Linter.LegacyConfig
'vue3-strongly-recommended': Linter.LegacyConfig
Expand Down
6 changes: 3 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ const plugin = {
// eslintrc configs
base: require('./configs/base'),

essential: require('./configs/vue2-essential'),
'strongly-recommended': require('./configs/vue2-strongly-recommended'),
recommended: require('./configs/vue2-recommended'),
'vue2-essential': require('./configs/vue2-essential'),
'vue2-strongly-recommended': require('./configs/vue2-strongly-recommended'),
'vue2-recommended': require('./configs/vue2-recommended'),

'vue3-essential': require('./configs/vue3-essential'),
'vue3-strongly-recommended': require('./configs/vue3-strongly-recommended'),
Expand Down
6 changes: 3 additions & 3 deletions tools/lib/categories.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,23 @@ const CONFIG_NAME_CAPTIONS = {
'*.configs["flat/essential"]'
],
'vue2-essential': [
'"plugin:vue/essential"',
'"plugin:vue/vue2-essential"',
'*.configs["flat/vue2-essential"]'
],
'vue3-strongly-recommended': [
'"plugin:vue/vue3-strongly-recommended"',
'*.configs["flat/strongly-recommended"]'
],
'vue2-strongly-recommended': [
'"plugin:vue/strongly-recommended"',
'"plugin:vue/vue2-strongly-recommended"',
'*.configs["flat/vue2-strongly-recommended"]'
],
'vue3-recommended': [
'"plugin:vue/vue3-recommended"',
'*.configs["flat/recommended"]'
],
'vue2-recommended': [
'"plugin:vue/recommended"',
'"plugin:vue/vue2-recommended"',
'*.configs["flat/vue2-recommended"]'
]
}
Expand Down
6 changes: 3 additions & 3 deletions tools/update-lib-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ const plugin = {
// eslintrc configs
base: require('./configs/base'),
essential: require('./configs/vue2-essential'),
'strongly-recommended': require('./configs/vue2-strongly-recommended'),
recommended: require('./configs/vue2-recommended'),
'vue2-essential': require('./configs/vue2-essential'),
'vue2-strongly-recommended': require('./configs/vue2-strongly-recommended'),
'vue2-recommended': require('./configs/vue2-recommended'),
'vue3-essential': require('./configs/vue3-essential'),
'vue3-strongly-recommended': require('./configs/vue3-strongly-recommended'),
Expand Down

0 comments on commit eb6d0c6

Please sign in to comment.