Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
"console": "integratedTerminal"
}
]
}
}
9 changes: 8 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -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]": {
Expand Down
8 changes: 4 additions & 4 deletions lib/rules/max-len.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
}

Expand Down
4 changes: 2 additions & 2 deletions lib/rules/no-restricted-v-bind.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
Expand Down
4 changes: 2 additions & 2 deletions lib/rules/no-restricted-v-on.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
}
}
Expand Down
4 changes: 2 additions & 2 deletions lib/rules/padding-lines-in-component-definition.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
}

Expand Down
4 changes: 2 additions & 2 deletions lib/rules/require-valid-default-prop.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
8 changes: 4 additions & 4 deletions lib/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
)
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 4 additions & 6 deletions tools/update-html-resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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')
Expand Down
6 changes: 2 additions & 4 deletions typings/eslint-plugin-vue/util-types/ast/es-ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down
3 changes: 1 addition & 2 deletions typings/eslint-plugin-vue/util-types/parser-services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
Loading