From acfde8f5fc5bf0f756ff3fee1d46fae6aececde2 Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Sun, 3 Aug 2025 21:29:42 +0900 Subject: [PATCH 1/3] chore: introduce `@eslint/markdown` and `eslint-plugin-markdown-preferences` --- .vscode/settings.json | 3 +- CHANGELOG.md | 2 +- README.md | 4 +- docs/developer-guide/index.md | 8 +- docs/rules/block-lang.md | 4 +- docs/rules/component-api-style.md | 2 +- docs/rules/html-indent.md | 2 +- .../multiline-html-element-content-newline.md | 6 +- docs/rules/no-async-in-computed-properties.md | 4 +- docs/rules/no-computed-properties-in-data.md | 2 +- .../no-deprecated-data-object-declaration.md | 2 +- docs/rules/no-duplicate-attr-inheritance.md | 2 +- docs/rules/no-expose-after-await.md | 4 +- docs/rules/no-extra-parens.md | 2 +- docs/rules/no-lifecycle-after-await.md | 2 +- docs/rules/no-lone-template.md | 6 +- docs/rules/no-multiple-slot-args.md | 2 +- docs/rules/no-ref-as-operand.md | 2 +- docs/rules/no-ref-object-destructure.md | 2 +- docs/rules/no-ref-object-reactivity-loss.md | 2 +- docs/rules/no-undef-properties.md | 4 +- docs/rules/no-useless-mustaches.md | 2 +- docs/rules/no-useless-v-bind.md | 2 +- docs/rules/no-watch-after-await.md | 2 +- docs/rules/require-slots-as-functions.md | 2 +- docs/rules/script-setup-uses-vars.md | 4 +- docs/rules/v-slot-style.md | 2 +- docs/user-guide/index.md | 22 +-- eslint-internal-rules/require-link.js | 129 ++++++++++++++++++ eslint.config.mjs | 110 +++++++++++++-- lib/rules/no-setup-props-reactivity-loss.js | 29 ++-- package.json | 4 +- 32 files changed, 306 insertions(+), 69 deletions(-) create mode 100644 eslint-internal-rules/require-link.js diff --git a/.vscode/settings.json b/.vscode/settings.json index f80681b66..8c7be0b23 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,6 @@ { "editor.tabSize": 2, - "eslint.experimental.useFlatConfig": true, - "eslint.validate": ["javascript", "javascriptreact", "vue", "json", "jsonc"], + "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 fa7a29427..71932ee19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ ### Patch Changes -- Resolved TypeScript compatibility issues introduced by eslint-typegen ([#2790](https://github.com/vuejs/eslint-plugin-vue/pull/2790)) +- Resolved TypeScript compatibility issues introduced by [eslint-typegen](https://github.com/antfu/eslint-typegen) ([#2790](https://github.com/vuejs/eslint-plugin-vue/pull/2790)) - Fixed inconsistent quotes in [`vue/block-lang`](https://eslint.vuejs.org/rules/block-lang.html) error messages ([#2805](https://github.com/vuejs/eslint-plugin-vue/pull/2805)) diff --git a/README.md b/README.md index bdeb5e167..01bc6b687 100644 --- a/README.md +++ b/README.md @@ -34,13 +34,13 @@ Contributing is welcome! See the [ESLint Vue Plugin Developer Guide](https://esl Be sure to read the [official ESLint guide](https://eslint.org/docs/developer-guide/working-with-rules) before you start writing a new rule. -To see what an abstract syntax tree (AST) of your code looks like, you may use [AST Explorer](https://astexplorer.net). After opening [AST Explorer](https://astexplorer.net), select `Vue` as the syntax and `vue-eslint-parser` as the parser. +To see what an abstract syntax tree (AST) of your code looks like, you may use [AST Explorer](https://astexplorer.net). After opening [AST Explorer](https://astexplorer.net), select `Vue` as the syntax and [`vue-eslint-parser`](https://github.com/vuejs/vue-eslint-parser) as the parser. The default JavaScript parser must be replaced because [Vue.js single file components](https://vuejs.org/guide/scaling-up/sfc.html) are not plain JavaScript, but a custom file format. [`vue-eslint-parser`](https://github.com/vuejs/vue-eslint-parser) is a replacement parser that generates an enhanced AST with nodes that represent specific parts of the template syntax, as well as the contents of the `