diff --git a/.changeset/gorgeous-colts-bathe.md b/.changeset/gorgeous-colts-bathe.md new file mode 100644 index 000000000..e5f3a14a8 --- /dev/null +++ b/.changeset/gorgeous-colts-bathe.md @@ -0,0 +1,5 @@ +--- +"eslint-plugin-vue": patch +--- + +Updates resources diff --git a/.changeset/rich-zebras-type.md b/.changeset/rich-zebras-type.md new file mode 100644 index 000000000..62c2438ae --- /dev/null +++ b/.changeset/rich-zebras-type.md @@ -0,0 +1,5 @@ +--- +"eslint-plugin-vue": minor +--- + +Changed `vue/no-negated-v-if-condition` suggestion to autofix diff --git a/.changeset/swift-spies-nail.md b/.changeset/swift-spies-nail.md new file mode 100644 index 000000000..6d8ffe174 --- /dev/null +++ b/.changeset/swift-spies-nail.md @@ -0,0 +1,5 @@ +--- +"eslint-plugin-vue": minor +--- + +Added new `ignoreEOLComments` option to `vue/no-multi-spaces` rule diff --git a/.vscode/launch.json b/.vscode/launch.json index 171c80066..997cf0bca 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -18,4 +18,4 @@ "console": "integratedTerminal" } ] -} \ No newline at end of file +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 8c7be0b23..20102543c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,13 @@ { "editor.tabSize": 2, - "eslint.validate": ["javascript", "javascriptreact", "vue", "json", "jsonc", "markdown"], + "eslint.validate": [ + "javascript", + "javascriptreact", + "vue", + "json", + "jsonc", + "markdown" + ], "typescript.tsdk": "./node_modules/typescript/lib", "vetur.validation.script": false, "[typescript]": { diff --git a/CHANGELOG.md b/CHANGELOG.md index 10e8f7612..4bbb44fa6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,25 +1,30 @@ # eslint-plugin-vue +## 10.6.2 + +### Patch Changes + +- Fixed false positives in non-intersecting conditions in [`vue/no-duplicate-class-names`](https://eslint.vuejs.org/rules/no-duplicate-class-names.html) and correctly detect duplicates in combining expressions ([#2980](https://github.com/vuejs/eslint-plugin-vue/pull/2980)) +- Fixed false positives for `TSImportType` in [`vue/script-indent`](https://eslint.vuejs.org/rules/script-indent.html) rule ([#2969](https://github.com/vuejs/eslint-plugin-vue/pull/2969)) +- Improved performance and type safety in [`vue/prefer-use-template-ref`](https://eslint.vuejs.org/rules/prefer-use-template-ref.html) ([#2982](https://github.com/vuejs/eslint-plugin-vue/pull/2982)) + ## 10.6.1 ### Patch Changes -- Fixed false positives for comments outside ` `, + output: ` + + `, errors: [ { messageId: 'negatedCondition', line: 3, column: 20, endLine: 3, - endColumn: 24, - suggestions: [ - { - messageId: 'fixNegatedCondition', - output: ` - - ` - } - ] + endColumn: 24 } ] }, @@ -182,24 +177,19 @@ tester.run('no-negated-v-if-condition', rule, { Otherwise `, + output: ` + + `, errors: [ { messageId: 'negatedCondition', line: 3, column: 20, endLine: 3, - endColumn: 33, - suggestions: [ - { - messageId: 'fixNegatedCondition', - output: ` - - ` - } - ] + endColumn: 33 } ] }, @@ -211,24 +201,19 @@ tester.run('no-negated-v-if-condition', rule, {
Equal
`, + output: ` + + `, errors: [ { messageId: 'negatedCondition', line: 3, column: 20, endLine: 3, - endColumn: 26, - suggestions: [ - { - messageId: 'fixNegatedCondition', - output: ` - - ` - } - ] + endColumn: 26 } ] }, @@ -240,24 +225,19 @@ tester.run('no-negated-v-if-condition', rule, {
Strictly equal
`, + output: ` + + `, errors: [ { messageId: 'negatedCondition', line: 3, column: 20, endLine: 3, - endColumn: 27, - suggestions: [ - { - messageId: 'fixNegatedCondition', - output: ` - - ` - } - ] + endColumn: 27 } ] }, @@ -270,25 +250,20 @@ tester.run('no-negated-v-if-condition', rule, {

Default

`, + output: ` + + `, errors: [ { messageId: 'negatedCondition', line: 4, column: 26, endLine: 4, - endColumn: 30, - suggestions: [ - { - messageId: 'fixNegatedCondition', - output: ` - - ` - } - ] + endColumn: 30 } ] }, @@ -301,25 +276,20 @@ tester.run('no-negated-v-if-condition', rule, {

Default

`, + output: ` + + `, errors: [ { messageId: 'negatedCondition', line: 4, column: 26, endLine: 4, - endColumn: 28, - suggestions: [ - { - messageId: 'fixNegatedCondition', - output: ` - - ` - } - ] + endColumn: 28 } ] }, @@ -331,24 +301,19 @@ tester.run('no-negated-v-if-condition', rule, { span contents `, + output: ` + + `, errors: [ { messageId: 'negatedCondition', line: 3, column: 20, endLine: 3, - endColumn: 30, - suggestions: [ - { - messageId: 'fixNegatedCondition', - output: ` - - ` - } - ] + endColumn: 30 } ] }, @@ -366,17 +331,7 @@ tester.run('no-negated-v-if-condition', rule, { `, - errors: [ - { - messageId: 'negatedCondition', - line: 3, - column: 20, - endLine: 3, - endColumn: 26, - suggestions: [ - { - messageId: 'fixNegatedCondition', - output: ` + output: ` - ` - } - ] + `, + errors: [ + { + messageId: 'negatedCondition', + line: 3, + column: 20, + endLine: 3, + endColumn: 26 }, { messageId: 'negatedCondition', line: 4, column: 23, endLine: 4, - endColumn: 29, - suggestions: [ - { - messageId: 'fixNegatedCondition', - output: ` - - ` - } - ] + endColumn: 29 }, { messageId: 'negatedCondition', line: 8, column: 23, endLine: 8, - endColumn: 30, - suggestions: [ - { - messageId: 'fixNegatedCondition', - output: ` - - ` - } - ] + endColumn: 30 } ] } diff --git a/tests/lib/rules/no-parsing-error.js b/tests/lib/rules/no-parsing-error.js index 54194a7b5..9225e4bda 100644 --- a/tests/lib/rules/no-parsing-error.js +++ b/tests/lib/rules/no-parsing-error.js @@ -80,13 +80,11 @@ tester.run('no-parsing-error', rule, { }, { code: '