' should be above '',
+ output: '',
+ options: [{ order: ['script', 'template', 'style'] }],
+ errors: [
+ {
+ message: "'`,
+ output:
+ '\n' +
+ ' \n' +
+ '\n' +
+ ' \n' +
+ '\n' +
+ ' ',
+ errors: [
+ {
+ message: "'
+
+ `,
+ output:
+ '\n' +
+ ' \n' +
+ ' \n' +
+ ' \n' +
+ ' ',
+ options: [{ order: ['script', 'template', 'style'] }],
+ errors: [
+ {
+ message: "'
+
+
+ `,
+ output:
+ '\n' +
+ ' \n' +
+ ' \n' +
+ ' \n' +
+ ' ',
+ options: [{ order: ['template', 'script', 'style'] }],
+ errors: [
+ {
+ message: "'' should be above '
+
+ `,
+ output:
+ '\n' +
+ ' \n' +
+ ' \n' +
+ ' \n' +
+ ' \n' +
+ ' ',
+ options: [{ order: ['docs', 'template', 'script', 'style'] }],
+ errors: [
+ {
+ message: "'' should be above '' on line 2.",
+ line: 3
+ }
+ ]
+ },
+ {
+ code: `
+
+
+
+
+ `,
+ output:
+ '\n' +
+ ' \n' +
+ ' \n' +
+ ' \n' +
+ ' \n' +
+ ' ',
+ options: [{ order: ['script', 'template', 'style'] }],
+ errors: [
+ {
+ message: "'
+
+ `,
+ output:
+ '\n' +
+ ' \n' +
+ ' \n' +
+ ' \n' +
+ ' \n' +
+ ' \n' +
+ ' ',
+ options: [{ order: ['script', 'template', 'style'] }],
+ errors: [
+ {
+ message: "'
+
+ `,
+ output:
+ '\n \n \n ',
+ options: [{ order: ['template', 'script'] }],
+ errors: [
+ {
+ message: "'' should be above '
+ `,
+ output:
+ '\n' +
+ ' \n' +
+ ' \n' +
+ ' \n' +
+ ' ',
+ errors: [
+ {
+ message: "'' should be above '
+
+
+
+ `,
+ output:
+ '\n' +
+ ' \n' +
+ ' \n' +
+ ' \n' +
+ ' \n' +
+ ' ',
+ errors: [
+ {
+ message: "'' should be above '
+
+ `,
+ output: '\n \n \n ',
+ errors: [
+ {
+ message: "'',
+ output: '',
+ options: [{ order: ['script:not([scoped])', 'style:not([scoped])'] }],
+ errors: [
+ {
+ message: "'`
+ const [{ messages, output }] = await eslint.lintText(code, {
+ filePath: 'test.vue'
+ })
+ assert.strictEqual(messages.length, 0)
+ // should not fix `
+ )
+ })
+})
diff --git a/tools/update-docs.js b/tools/update-docs.js
index 65b0eae5c..aecee5fdd 100644
--- a/tools/update-docs.js
+++ b/tools/update-docs.js
@@ -117,7 +117,8 @@ class DocFile {
} else {
notes.push(`- :no_entry_sign: This rule was **deprecated**.`)
}
- } else if (meta.docs.categories) {
+ }
+ if (meta.docs?.categories) {
const presets = getPresetIds(meta.docs.categories).map(
(categoryId) => `\`"plugin:vue/${categoryId}"\``
)