diff --git a/.changeset/fast-monkeys-smoke.md b/.changeset/fast-monkeys-smoke.md new file mode 100644 index 000000000..676d9d23c --- /dev/null +++ b/.changeset/fast-monkeys-smoke.md @@ -0,0 +1,5 @@ +--- +"eslint-plugin-vue": minor +--- + +Added new `vue/no-undef-directives` rule 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/docs/rules/index.md b/docs/rules/index.md index 3209c157d..cfed2f082 100644 --- a/docs/rules/index.md +++ b/docs/rules/index.md @@ -238,7 +238,7 @@ For example: | [vue/no-empty-component-block] | disallow the ` `, + 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: '