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/lib/rules/max-len.js b/lib/rules/max-len.js index cbf4e171f..58c5b2c6a 100644 --- a/lib/rules/max-len.js +++ b/lib/rules/max-len.js @@ -101,10 +101,10 @@ function computeLineLength(line, tabWidth) { function isTrailingComment(line, lineNumber, comment) { return Boolean( comment && - comment.loc.start.line === lineNumber && - lineNumber <= comment.loc.end.line && - (comment.loc.end.line > lineNumber || - comment.loc.end.column === line.length) + comment.loc.start.line === lineNumber && + lineNumber <= comment.loc.end.line && + (comment.loc.end.line > lineNumber || + comment.loc.end.column === line.length) ) } diff --git a/lib/rules/no-restricted-v-bind.js b/lib/rules/no-restricted-v-bind.js index e16622174..cfaf77187 100644 --- a/lib/rules/no-restricted-v-bind.js +++ b/lib/rules/no-restricted-v-bind.js @@ -33,8 +33,8 @@ function parseOption(option) { test(key) { return Boolean( key.argument && - key.argument.type === 'VIdentifier' && - matcher.test(key.argument.rawName) + key.argument.type === 'VIdentifier' && + matcher.test(key.argument.rawName) ) }, modifiers: [] diff --git a/lib/rules/no-restricted-v-on.js b/lib/rules/no-restricted-v-on.js index 893d511a6..b4859c09c 100644 --- a/lib/rules/no-restricted-v-on.js +++ b/lib/rules/no-restricted-v-on.js @@ -26,8 +26,8 @@ function parseOption(option) { test(key) { return Boolean( key.argument && - key.argument.type === 'VIdentifier' && - matcher.test(key.argument.rawName) + key.argument.type === 'VIdentifier' && + matcher.test(key.argument.rawName) ) } } diff --git a/lib/rules/padding-lines-in-component-definition.js b/lib/rules/padding-lines-in-component-definition.js index eaea8fa22..dcf1b2d7e 100644 --- a/lib/rules/padding-lines-in-component-definition.js +++ b/lib/rules/padding-lines-in-component-definition.js @@ -44,8 +44,8 @@ function isComma(node) { function isValidProperties(propOrEmit) { return Boolean( propOrEmit.type !== 'infer-type' && - propOrEmit.node && - ['Property', 'SpreadElement'].includes(propOrEmit.node.type) + propOrEmit.node && + ['Property', 'SpreadElement'].includes(propOrEmit.node.type) ) } diff --git a/lib/rules/require-valid-default-prop.js b/lib/rules/require-valid-default-prop.js index 92c5b5b43..f24f33fa1 100644 --- a/lib/rules/require-valid-default-prop.js +++ b/lib/rules/require-valid-default-prop.js @@ -435,8 +435,8 @@ module.exports = { (prop) => Boolean( prop.type === 'type' || - prop.type === 'infer-type' || - prop.type === 'object' + prop.type === 'infer-type' || + prop.type === 'object' ) ) const defaultsByWithDefaults = diff --git a/lib/utils/index.js b/lib/utils/index.js index 092177906..56ad32b4b 100644 --- a/lib/utils/index.js +++ b/lib/utils/index.js @@ -2813,10 +2813,10 @@ function isVueInstance(node) { const callee = node.callee return Boolean( node.type === 'NewExpression' && - callee.type === 'Identifier' && - callee.name === 'Vue' && - node.arguments.length > 0 && - skipTSAsExpression(node.arguments[0]).type === 'ObjectExpression' + callee.type === 'Identifier' && + callee.name === 'Vue' && + node.arguments.length > 0 && + skipTSAsExpression(node.arguments[0]).type === 'ObjectExpression' ) } diff --git a/package.json b/package.json index 07ca8e95a..4a4db09a7 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,7 @@ "jsdom": "^22.0.0", "markdownlint-cli": "^0.42.0", "pathe": "^1.1.2", - "prettier": "^3.3.3", + "prettier": "^3.7.0", "typescript": "^5.7.2", "vite-plugin-eslint4b": "^0.5.1", "vitepress": "^1.4.1", diff --git a/tools/update-html-resources.js b/tools/update-html-resources.js index fcbdacbb0..aba02d13f 100644 --- a/tools/update-html-resources.js +++ b/tools/update-html-resources.js @@ -21,9 +21,8 @@ async function main() { // Update deprecated-html-elements.json // ------------------------------------------------------------------------------ function updateDeprecatedHTMLElements() { - const DEPRECATED_HTML_ELEMENTS_PATH = require.resolve( - '../lib/utils/deprecated-html-elements.json' - ) + const DEPRECATED_HTML_ELEMENTS_PATH = + require.resolve('../lib/utils/deprecated-html-elements.json') const elements = new Set() const domDl = jsdom.JSDOM.fragment(obsoleteHtml).querySelector( @@ -49,9 +48,8 @@ async function main() { // Update html-elements.json // ------------------------------------------------------------------------------ function updateHTMLElements() { - const HTML_ELEMENTS_PATH = require.resolve( - '../lib/utils/html-elements.json' - ) + const HTML_ELEMENTS_PATH = + require.resolve('../lib/utils/html-elements.json') const elements = new Set() const deprecatedHtmlElements = new Set( require('../lib/utils/deprecated-html-elements.json') diff --git a/typings/eslint-plugin-vue/util-types/ast/es-ast.ts b/typings/eslint-plugin-vue/util-types/ast/es-ast.ts index 4297d3d56..010945c5b 100644 --- a/typings/eslint-plugin-vue/util-types/ast/es-ast.ts +++ b/typings/eslint-plugin-vue/util-types/ast/es-ast.ts @@ -227,8 +227,7 @@ interface BasePropertyDefinition extends HasParentNode { static: boolean parent: ClassBody } -export interface PropertyDefinitionNonComputedName - extends BasePropertyDefinition { +export interface PropertyDefinitionNonComputedName extends BasePropertyDefinition { computed: false key: Identifier | Literal } @@ -627,8 +626,7 @@ interface BaseAssignmentProperty extends HasParentNode { value: Pattern parent: ObjectPattern } -export interface AssignmentPropertyNonComputedName - extends BaseAssignmentProperty { +export interface AssignmentPropertyNonComputedName extends BaseAssignmentProperty { computed: false key: Identifier | Literal } diff --git a/typings/eslint-plugin-vue/util-types/parser-services.ts b/typings/eslint-plugin-vue/util-types/parser-services.ts index 6a9ccc776..5f2b5a24c 100644 --- a/typings/eslint-plugin-vue/util-types/parser-services.ts +++ b/typings/eslint-plugin-vue/util-types/parser-services.ts @@ -7,8 +7,7 @@ type TemplateListenerBase = { [T in keyof VAST.VNodeListenerMap]?: (node: VAST.VNodeListenerMap[T]) => void } export interface TemplateListener - extends TemplateListenerBase, - eslint.Rule.NodeListener { + extends TemplateListenerBase, eslint.Rule.NodeListener { [key: string]: ((node: VAST.ParamNode) => void) | undefined }