-
-
Notifications
You must be signed in to change notification settings - Fork 696
feat: introduce -error versions of configs that have all rules configured to error
#2796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
ee9f8a0
4dcb8ff
b5a434e
644d23b
6d92929
50fec87
6f57445
844d3fc
b835cda
e77678a
9c56a40
3e9fb11
c510184
6a09005
fe755cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "eslint-plugin-vue": minor | ||
| --- | ||
|
|
||
| Added [new configs](https://eslint.vuejs.org/user-guide/#bundle-configurations-eslint-config-js) `strongly-recommended-error` and `recommended-error` with all rules' severity set to `error` | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -65,14 +65,20 @@ You can use the following configs by adding them to `eslint.config.js`. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Configurations for using Vue.js 3.x: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `*.configs["flat/essential"]` ... `base`, plus rules to prevent errors or unintended behavior. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `*.configs["flat/strongly-recommended"]` ... Above, plus rules to considerably improve code readability and/or dev experience. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `*.configs["flat/strongly-recommended-error"]` ... Above, except with all rules configured to error instead of warn. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `*.configs["flat/recommended"]` ... Above, plus rules to enforce subjective community defaults to ensure consistency. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `*.configs["flat/recommended-error"]` ... Above, except with all rules configured to error instead of warn. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Configurations for using Vue.js 2.x: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `*.configs["flat/vue2-essential"]` ... `base`, plus rules to prevent errors or unintended behavior. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `*.configs["flat/vue2-strongly-recommended"]` ... Above, plus rules to considerably improve code readability and/or dev experience. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `*.configs["flat/vue2-strongly-recommended-error"]` ... Above, except with all rules configured to error instead of warn. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `*.configs["flat/vue2-strongly-recommended-error"]` ... Above, except with all rules configured to error instead of warn. | |
| - `*.configs["flat/vue2-strongly-recommended-error"]` ... Same as vue2-strongly-recommended, except with all rules in this category configured to error instead of warn. |
Copilot
AI
Dec 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description "Above, except with all rules configured to error instead of warn" is potentially misleading. This config doesn't modify the config mentioned directly above it (strongly-recommended); rather, it's an alternative to strongly-recommended where the category's rules are set to error severity instead of warn. Consider clarifying this to say something like "Same as strongly-recommended, except with all rules in this category configured to error instead of warn" to make it clearer that this is an alternative, not a modification of the previous config.
| - `*.configs["flat/strongly-recommended-error"]` ... Above, except with all rules configured to error instead of warn. | |
| - `*.configs["flat/recommended"]` ... Above, plus rules to enforce subjective community defaults to ensure consistency. | |
| - `*.configs["flat/recommended-error"]` ... Above, except with all rules configured to error instead of warn. | |
| - Configurations for using Vue.js 2.x: | |
| - `*.configs["flat/vue2-essential"]` ... `base`, plus rules to prevent errors or unintended behavior. | |
| - `*.configs["flat/vue2-strongly-recommended"]` ... Above, plus rules to considerably improve code readability and/or dev experience. | |
| - `*.configs["flat/vue2-strongly-recommended-error"]` ... Above, except with all rules configured to error instead of warn. | |
| - `*.configs["flat/vue2-recommended"]` ... Above, plus rules to enforce subjective community defaults to ensure consistency | |
| - `*.configs["flat/vue2-recommended-error"]` ... Above, except with all rules configured to error instead of warn. | |
| - `*.configs["flat/strongly-recommended-error"]` ... Same as strongly-recommended, except with all rules in this category configured to error instead of warn. | |
| - `*.configs["flat/recommended"]` ... Above, plus rules to enforce subjective community defaults to ensure consistency. | |
| - `*.configs["flat/recommended-error"]` ... Same as recommended, except with all rules in this category configured to error instead of warn. | |
| - Configurations for using Vue.js 2.x: | |
| - `*.configs["flat/vue2-essential"]` ... `base`, plus rules to prevent errors or unintended behavior. | |
| - `*.configs["flat/vue2-strongly-recommended"]` ... Above, plus rules to considerably improve code readability and/or dev experience. | |
| - `*.configs["flat/vue2-strongly-recommended-error"]` ... Same as vue2-strongly-recommended, except with all rules in this category configured to error instead of warn. | |
| - `*.configs["flat/vue2-recommended"]` ... Above, plus rules to enforce subjective community defaults to ensure consistency | |
| - `*.configs["flat/vue2-recommended-error"]` ... Same as vue2-recommended, except with all rules in this category configured to error instead of warn. |
Copilot
AI
Dec 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description "Above, except with all rules configured to error instead of warn" is potentially misleading. This config doesn't modify the config mentioned directly above it (recommended); rather, it's an alternative to recommended where the category's rules are set to error severity instead of warn. Consider clarifying this to say something like "Same as recommended, except with all rules in this category configured to error instead of warn" to make it clearer that this is an alternative, not a modification of the previous config.
| - `*.configs["flat/strongly-recommended-error"]` ... Above, except with all rules configured to error instead of warn. | |
| - `*.configs["flat/recommended"]` ... Above, plus rules to enforce subjective community defaults to ensure consistency. | |
| - `*.configs["flat/recommended-error"]` ... Above, except with all rules configured to error instead of warn. | |
| - Configurations for using Vue.js 2.x: | |
| - `*.configs["flat/vue2-essential"]` ... `base`, plus rules to prevent errors or unintended behavior. | |
| - `*.configs["flat/vue2-strongly-recommended"]` ... Above, plus rules to considerably improve code readability and/or dev experience. | |
| - `*.configs["flat/vue2-strongly-recommended-error"]` ... Above, except with all rules configured to error instead of warn. | |
| - `*.configs["flat/vue2-recommended"]` ... Above, plus rules to enforce subjective community defaults to ensure consistency | |
| - `*.configs["flat/vue2-recommended-error"]` ... Above, except with all rules configured to error instead of warn. | |
| - `*.configs["flat/strongly-recommended-error"]` ... Same as strongly-recommended, except with all rules in this category configured to error instead of warn. | |
| - `*.configs["flat/recommended"]` ... Above, plus rules to enforce subjective community defaults to ensure consistency. | |
| - `*.configs["flat/recommended-error"]` ... Same as recommended, except with all rules in this category configured to error instead of warn. | |
| - Configurations for using Vue.js 2.x: | |
| - `*.configs["flat/vue2-essential"]` ... `base`, plus rules to prevent errors or unintended behavior. | |
| - `*.configs["flat/vue2-strongly-recommended"]` ... Above, plus rules to considerably improve code readability and/or dev experience. | |
| - `*.configs["flat/vue2-strongly-recommended-error"]` ... Same as vue2-strongly-recommended, except with all rules in this category configured to error instead of warn. | |
| - `*.configs["flat/vue2-recommended"]` ... Above, plus rules to enforce subjective community defaults to ensure consistency | |
| - `*.configs["flat/vue2-recommended-error"]` ... Same as vue2-recommended, except with all rules in this category configured to error instead of warn. |
Copilot
AI
Dec 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description "Above, except with all rules configured to error instead of warn" is potentially misleading. This config doesn't modify the config mentioned directly above it (vue2-recommended); rather, it's an alternative to vue2-recommended where the category's rules are set to error severity instead of warn. Consider clarifying this to say something like "Same as vue2-recommended, except with all rules in this category configured to error instead of warn" to make it clearer that this is an alternative, not a modification of the previous config.
| - `*.configs["flat/vue2-recommended-error"]` ... Above, except with all rules configured to error instead of warn. | |
| - `*.configs["flat/vue2-recommended-error"]` ... Same as vue2-recommended, except with all rules in this category configured to error instead of warn. |
Copilot
AI
Dec 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description "Above, except with all rules configured to error instead of warn" is potentially misleading. This config doesn't modify the config mentioned directly above it (vue2-strongly-recommended); rather, it's an alternative to vue2-strongly-recommended where the category's rules are set to error severity instead of warn. Consider clarifying this to say something like "Same as vue2-strongly-recommended, except with all rules in this category configured to error instead of warn" to make it clearer that this is an alternative, not a modification of the previous config.
| - `"plugin:vue/vue2-strongly-recommended-error"` ... Above, except with all rules configured to error instead of warn. | |
| - `"plugin:vue/vue2-strongly-recommended-error"` ... Same as vue2-strongly-recommended, except with all rules in this category configured to error instead of warn. |
Copilot
AI
Dec 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description "Above, except with all rules configured to error instead of warn" is potentially misleading. This config doesn't modify the config mentioned directly above it (strongly-recommended); rather, it's an alternative to strongly-recommended where the category's rules are set to error severity instead of warn. Consider clarifying this to say something like "Same as strongly-recommended, except with all rules in this category configured to error instead of warn" to make it clearer that this is an alternative, not a modification of the previous config.
| - `"plugin:vue/strongly-recommended-error"` ... Above, except with all rules configured to error instead of warn. | |
| - `"plugin:vue/recommended"` ... Above, plus rules to enforce subjective community defaults to ensure consistency. | |
| - `"plugin:vue/recommended-error"` ... Above, except with all rules configured to error instead of warn. | |
| - Configurations for using Vue.js 2.x: | |
| - `"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-strongly-recommended-error"` ... Above, except with all rules configured to error instead of warn. | |
| - `"plugin:vue/vue2-recommended"` ... Above, plus rules to enforce subjective community defaults to ensure consistency. | |
| - `"plugin:vue/vue2-recommended-error"` ... Above, except with all rules configured to error instead of warn. | |
| - `"plugin:vue/strongly-recommended-error"` ... Same as strongly-recommended, except with all rules in this category configured to error instead of warn. | |
| - `"plugin:vue/recommended"` ... Above, plus rules to enforce subjective community defaults to ensure consistency. | |
| - `"plugin:vue/recommended-error"` ... Same as recommended, except with all rules in this category configured to error instead of warn. | |
| - Configurations for using Vue.js 2.x: | |
| - `"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-strongly-recommended-error"` ... Same as vue2-strongly-recommended, except with all rules in this category configured to error instead of warn. | |
| - `"plugin:vue/vue2-recommended"` ... Above, plus rules to enforce subjective community defaults to ensure consistency. | |
| - `"plugin:vue/vue2-recommended-error"` ... Same as vue2-recommended, except with all rules in this category configured to error instead of warn. |
Copilot
AI
Dec 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description "Above, except with all rules configured to error instead of warn" is potentially misleading. This config doesn't modify the config mentioned directly above it (recommended); rather, it's an alternative to recommended where the category's rules are set to error severity instead of warn. Consider clarifying this to say something like "Same as recommended, except with all rules in this category configured to error instead of warn" to make it clearer that this is an alternative, not a modification of the previous config.
| - `"plugin:vue/strongly-recommended-error"` ... Above, except with all rules configured to error instead of warn. | |
| - `"plugin:vue/recommended"` ... Above, plus rules to enforce subjective community defaults to ensure consistency. | |
| - `"plugin:vue/recommended-error"` ... Above, except with all rules configured to error instead of warn. | |
| - Configurations for using Vue.js 2.x: | |
| - `"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-strongly-recommended-error"` ... Above, except with all rules configured to error instead of warn. | |
| - `"plugin:vue/vue2-recommended"` ... Above, plus rules to enforce subjective community defaults to ensure consistency. | |
| - `"plugin:vue/vue2-recommended-error"` ... Above, except with all rules configured to error instead of warn. | |
| - `"plugin:vue/strongly-recommended-error"` ... Same as strongly-recommended, except with all rules in this category configured to error instead of warn. | |
| - `"plugin:vue/recommended"` ... Above, plus rules to enforce subjective community defaults to ensure consistency. | |
| - `"plugin:vue/recommended-error"` ... Same as recommended, except with all rules in this category configured to error instead of warn. | |
| - Configurations for using Vue.js 2.x: | |
| - `"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-strongly-recommended-error"` ... Same as vue2-strongly-recommended, except with all rules in this category configured to error instead of warn. | |
| - `"plugin:vue/vue2-recommended"` ... Above, plus rules to enforce subjective community defaults to ensure consistency. | |
| - `"plugin:vue/vue2-recommended-error"` ... Same as vue2-recommended, except with all rules in this category configured to error instead of warn. |
Copilot
AI
Dec 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description "Above, except with all rules configured to error instead of warn" is potentially misleading. This config doesn't modify the config mentioned directly above it (vue2-recommended); rather, it's an alternative to vue2-recommended where the category's rules are set to error severity instead of warn. Consider clarifying this to say something like "Same as vue2-recommended, except with all rules in this category configured to error instead of warn" to make it clearer that this is an alternative, not a modification of the previous config.
| - `"plugin:vue/strongly-recommended-error"` ... Above, except with all rules configured to error instead of warn. | |
| - `"plugin:vue/recommended"` ... Above, plus rules to enforce subjective community defaults to ensure consistency. | |
| - `"plugin:vue/recommended-error"` ... Above, except with all rules configured to error instead of warn. | |
| - Configurations for using Vue.js 2.x: | |
| - `"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-strongly-recommended-error"` ... Above, except with all rules configured to error instead of warn. | |
| - `"plugin:vue/vue2-recommended"` ... Above, plus rules to enforce subjective community defaults to ensure consistency. | |
| - `"plugin:vue/vue2-recommended-error"` ... Above, except with all rules configured to error instead of warn. | |
| - `"plugin:vue/strongly-recommended-error"` ... Same as strongly-recommended, except with all rules in this category configured to error instead of warn. | |
| - `"plugin:vue/recommended"` ... Above, plus rules to enforce subjective community defaults to ensure consistency. | |
| - `"plugin:vue/recommended-error"` ... Same as recommended, except with all rules in this category configured to error instead of warn. | |
| - Configurations for using Vue.js 2.x: | |
| - `"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-strongly-recommended-error"` ... Same as vue2-strongly-recommended, except with all rules in this category configured to error instead of warn. | |
| - `"plugin:vue/vue2-recommended"` ... Above, plus rules to enforce subjective community defaults to ensure consistency. | |
| - `"plugin:vue/vue2-recommended-error"` ... Same as vue2-recommended, except with all rules in this category configured to error instead of warn. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| /* | ||
| * IMPORTANT! | ||
| * This file has been automatically generated, | ||
| * in order to update its content execute "npm run update" | ||
| */ | ||
| 'use strict' | ||
| const config = require('./vue2-strongly-recommended-error.js') | ||
|
|
||
| module.exports = [ | ||
| ...config, | ||
| { | ||
| name: 'vue/vue2-recommended/rules', | ||
| rules: { | ||
| 'vue/attributes-order': 'error', | ||
| 'vue/block-order': 'error', | ||
| 'vue/no-lone-template': 'error', | ||
| 'vue/no-multiple-slot-args': 'error', | ||
| 'vue/no-required-prop-with-default': 'error', | ||
| 'vue/no-v-html': 'error', | ||
| 'vue/order-in-components': 'error', | ||
| 'vue/this-in-template': 'error' | ||
| } | ||
| } | ||
| ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| /* | ||
| * IMPORTANT! | ||
| * This file has been automatically generated, | ||
| * in order to update its content execute "npm run update" | ||
| */ | ||
| 'use strict' | ||
| const config = require('./vue2-essential.js') | ||
|
|
||
| module.exports = [ | ||
| ...config, | ||
| { | ||
| name: 'vue/vue2-strongly-recommended/rules', | ||
| rules: { | ||
| 'vue/attribute-hyphenation': 'error', | ||
| 'vue/component-definition-name-casing': 'error', | ||
| 'vue/first-attribute-linebreak': 'error', | ||
| 'vue/html-closing-bracket-newline': 'error', | ||
| 'vue/html-closing-bracket-spacing': 'error', | ||
| 'vue/html-end-tags': 'error', | ||
| 'vue/html-indent': 'error', | ||
| 'vue/html-quotes': 'error', | ||
| 'vue/html-self-closing': 'error', | ||
| 'vue/max-attributes-per-line': 'error', | ||
| 'vue/multiline-html-element-content-newline': 'error', | ||
| 'vue/mustache-interpolation-spacing': 'error', | ||
| 'vue/no-multi-spaces': 'error', | ||
| 'vue/no-spaces-around-equal-signs-in-attribute': 'error', | ||
| 'vue/no-template-shadow': 'error', | ||
| 'vue/one-component-per-file': 'error', | ||
| 'vue/prop-name-casing': 'error', | ||
| 'vue/require-default-prop': 'error', | ||
| 'vue/require-prop-types': 'error', | ||
| 'vue/singleline-html-element-content-newline': 'error', | ||
| 'vue/v-bind-style': 'error', | ||
| 'vue/v-on-style': 'error', | ||
| 'vue/v-slot-style': 'error' | ||
| } | ||
| } | ||
| ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| /* | ||
| * IMPORTANT! | ||
| * This file has been automatically generated, | ||
| * in order to update its content execute "npm run update" | ||
| */ | ||
| 'use strict' | ||
| const config = require('./vue3-strongly-recommended-error.js') | ||
|
|
||
| module.exports = [ | ||
| ...config, | ||
| { | ||
| name: 'vue/recommended/rules', | ||
| rules: { | ||
| 'vue/attributes-order': 'error', | ||
| 'vue/block-order': 'error', | ||
| 'vue/no-lone-template': 'error', | ||
| 'vue/no-multiple-slot-args': 'error', | ||
| 'vue/no-required-prop-with-default': 'error', | ||
| 'vue/no-v-html': 'error', | ||
| 'vue/order-in-components': 'error', | ||
| 'vue/this-in-template': 'error' | ||
| } | ||
| } | ||
| ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| /* | ||
| * IMPORTANT! | ||
| * This file has been automatically generated, | ||
| * in order to update its content execute "npm run update" | ||
| */ | ||
| 'use strict' | ||
| const config = require('./vue3-essential.js') | ||
|
|
||
| module.exports = [ | ||
| ...config, | ||
| { | ||
| name: 'vue/strongly-recommended/rules', | ||
| rules: { | ||
| 'vue/attribute-hyphenation': 'error', | ||
| 'vue/component-definition-name-casing': 'error', | ||
| 'vue/first-attribute-linebreak': 'error', | ||
| 'vue/html-closing-bracket-newline': 'error', | ||
| 'vue/html-closing-bracket-spacing': 'error', | ||
| 'vue/html-end-tags': 'error', | ||
| 'vue/html-indent': 'error', | ||
| 'vue/html-quotes': 'error', | ||
| 'vue/html-self-closing': 'error', | ||
| 'vue/max-attributes-per-line': 'error', | ||
| 'vue/multiline-html-element-content-newline': 'error', | ||
| 'vue/mustache-interpolation-spacing': 'error', | ||
| 'vue/no-multi-spaces': 'error', | ||
| 'vue/no-spaces-around-equal-signs-in-attribute': 'error', | ||
| 'vue/no-template-shadow': 'error', | ||
| 'vue/one-component-per-file': 'error', | ||
| 'vue/prop-name-casing': 'error', | ||
| 'vue/require-default-prop': 'error', | ||
| 'vue/require-explicit-emits': 'error', | ||
| 'vue/require-prop-types': 'error', | ||
| 'vue/singleline-html-element-content-newline': 'error', | ||
| 'vue/v-bind-style': 'error', | ||
| 'vue/v-on-event-hyphenation': [ | ||
| 'error', | ||
| 'always', | ||
| { | ||
| autofix: true | ||
| } | ||
| ], | ||
| 'vue/v-on-style': 'error', | ||
| 'vue/v-slot-style': 'error' | ||
| } | ||
| } | ||
| ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| /* | ||
| * IMPORTANT! | ||
| * This file has been automatically generated, | ||
| * in order to update its content execute "npm run update" | ||
| */ | ||
| module.exports = { | ||
| extends: require.resolve('./vue2-strongly-recommended-error'), | ||
| rules: { | ||
| 'vue/attributes-order': 'error', | ||
| 'vue/block-order': 'error', | ||
| 'vue/no-lone-template': 'error', | ||
| 'vue/no-multiple-slot-args': 'error', | ||
| 'vue/no-required-prop-with-default': 'error', | ||
| 'vue/no-v-html': 'error', | ||
| 'vue/order-in-components': 'error', | ||
| 'vue/this-in-template': 'error' | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| /* | ||
| * IMPORTANT! | ||
| * This file has been automatically generated, | ||
| * in order to update its content execute "npm run update" | ||
| */ | ||
| module.exports = { | ||
| extends: require.resolve('./vue2-essential'), | ||
| rules: { | ||
| 'vue/attribute-hyphenation': 'error', | ||
| 'vue/component-definition-name-casing': 'error', | ||
| 'vue/first-attribute-linebreak': 'error', | ||
| 'vue/html-closing-bracket-newline': 'error', | ||
| 'vue/html-closing-bracket-spacing': 'error', | ||
| 'vue/html-end-tags': 'error', | ||
| 'vue/html-indent': 'error', | ||
| 'vue/html-quotes': 'error', | ||
| 'vue/html-self-closing': 'error', | ||
| 'vue/max-attributes-per-line': 'error', | ||
| 'vue/multiline-html-element-content-newline': 'error', | ||
| 'vue/mustache-interpolation-spacing': 'error', | ||
| 'vue/no-multi-spaces': 'error', | ||
| 'vue/no-spaces-around-equal-signs-in-attribute': 'error', | ||
| 'vue/no-template-shadow': 'error', | ||
| 'vue/one-component-per-file': 'error', | ||
| 'vue/prop-name-casing': 'error', | ||
| 'vue/require-default-prop': 'error', | ||
| 'vue/require-prop-types': 'error', | ||
| 'vue/singleline-html-element-content-newline': 'error', | ||
| 'vue/v-bind-style': 'error', | ||
| 'vue/v-on-style': 'error', | ||
| 'vue/v-slot-style': 'error' | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| /* | ||
| * IMPORTANT! | ||
| * This file has been automatically generated, | ||
| * in order to update its content execute "npm run update" | ||
| */ | ||
| module.exports = { | ||
| extends: require.resolve('./vue3-strongly-recommended-error'), | ||
| rules: { | ||
| 'vue/attributes-order': 'error', | ||
| 'vue/block-order': 'error', | ||
| 'vue/no-lone-template': 'error', | ||
| 'vue/no-multiple-slot-args': 'error', | ||
| 'vue/no-required-prop-with-default': 'error', | ||
| 'vue/no-v-html': 'error', | ||
| 'vue/order-in-components': 'error', | ||
| 'vue/this-in-template': 'error' | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| /* | ||
| * IMPORTANT! | ||
| * This file has been automatically generated, | ||
| * in order to update its content execute "npm run update" | ||
| */ | ||
| module.exports = { | ||
| extends: require.resolve('./vue3-essential'), | ||
| rules: { | ||
| 'vue/attribute-hyphenation': 'error', | ||
| 'vue/component-definition-name-casing': 'error', | ||
| 'vue/first-attribute-linebreak': 'error', | ||
| 'vue/html-closing-bracket-newline': 'error', | ||
| 'vue/html-closing-bracket-spacing': 'error', | ||
| 'vue/html-end-tags': 'error', | ||
| 'vue/html-indent': 'error', | ||
| 'vue/html-quotes': 'error', | ||
| 'vue/html-self-closing': 'error', | ||
| 'vue/max-attributes-per-line': 'error', | ||
| 'vue/multiline-html-element-content-newline': 'error', | ||
| 'vue/mustache-interpolation-spacing': 'error', | ||
| 'vue/no-multi-spaces': 'error', | ||
| 'vue/no-spaces-around-equal-signs-in-attribute': 'error', | ||
| 'vue/no-template-shadow': 'error', | ||
| 'vue/one-component-per-file': 'error', | ||
| 'vue/prop-name-casing': 'error', | ||
| 'vue/require-default-prop': 'error', | ||
| 'vue/require-explicit-emits': 'error', | ||
| 'vue/require-prop-types': 'error', | ||
| 'vue/singleline-html-element-content-newline': 'error', | ||
| 'vue/v-bind-style': 'error', | ||
| 'vue/v-on-event-hyphenation': [ | ||
| 'error', | ||
| 'always', | ||
| { | ||
| autofix: true | ||
| } | ||
| ], | ||
| 'vue/v-on-style': 'error', | ||
| 'vue/v-slot-style': 'error' | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -28,10 +28,11 @@ const extendsCategories = { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 'vue3-use-with-caution': 'vue3-recommended' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| function formatRules(rules, categoryId) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| function formatRules(rules, categoryId, alwaysError) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const obj = Object.fromEntries( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rules.map((rule) => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| let options = errorCategories.has(categoryId) ? 'error' : 'warn' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| let options = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| alwaysError || errorCategories.has(categoryId) ? 'error' : 'warn' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const defaultOptions = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rule.meta && rule.meta.docs && rule.meta.docs.defaultOptions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (defaultOptions) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -47,8 +48,8 @@ function formatRules(rules, categoryId) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return JSON.stringify(obj, null, 2) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| function formatCategory(category) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const extendsCategoryId = extendsCategories[category.categoryId] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| function formatCategory(category, alwaysError = false) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| let extendsCategoryId = extendsCategories[category.categoryId] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (extendsCategoryId == null) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return `/* | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * IMPORTANT! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -63,7 +64,7 @@ module.exports = { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| plugins: [ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 'vue' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rules: ${formatRules(category.rules, category.categoryId)}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rules: ${formatRules(category.rules, category.categoryId, alwaysError)}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| overrides: [ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| files: '*.vue', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -73,14 +74,18 @@ module.exports = { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (alwaysError && !errorCategories.has(extendsCategoryId)) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| extendsCategoryId += '-error' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return `/* | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * IMPORTANT! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * This file has been automatically generated, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * in order to update its content execute "npm run update" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| module.exports = { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| extends: require.resolve('./${extendsCategoryId}'), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rules: ${formatRules(category.rules, category.categoryId)} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rules: ${formatRules(category.rules, category.categoryId, alwaysError)} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -92,6 +97,13 @@ for (const category of categories) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const content = formatCategory(category) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fs.writeFileSync(filePath, content) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!errorCategories.has(category.categoryId)) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fs.writeFileSync( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| path.join(ROOT, `${category.categoryId}-error.js`), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| formatCategory(category, true) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Update lib/configs/index.js to export all config files. | |
| const CONFIGS_INDEX_PATH = path.join(ROOT, 'index.js') | |
| function updateConfigsIndex() { | |
| const files = fs.readdirSync(ROOT) | |
| .filter(f => f.endsWith('.js') && f !== 'index.js') | |
| const entries = files | |
| .map(f => { | |
| const name = path.basename(f, '.js') | |
| return ` '${name}': require('./${name}')` | |
| }) | |
| .join(',\n') | |
| const content = `/* | |
| * IMPORTANT! | |
| * This file has been automatically generated, | |
| * in order to update its content execute "npm run update" | |
| */ | |
| module.exports = { | |
| ${entries} | |
| } | |
| ` | |
| fs.writeFileSync(CONFIGS_INDEX_PATH, content) | |
| } | |
| updateConfigsIndex() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changeset description only mentions
strongly-recommended-errorandrecommended-error, but this PR also adds Vue 2 variants (vue2-strongly-recommended-errorandvue2-recommended-error) and flat config versions of all these. Consider updating the description to be more comprehensive, for example: "Added new-errorconfig variants (strongly-recommended-error,recommended-error,vue2-strongly-recommended-error,vue2-recommended-error, and their flat config equivalents) with all rules' severity set toerror"