Skip to content

Commit cdfa1e6

Browse files
authored
Merge branch 'master' into cleanup-test
2 parents c603bef + db724d1 commit cdfa1e6

File tree

13 files changed

+37
-35
lines changed

13 files changed

+37
-35
lines changed

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
"console": "integratedTerminal"
1919
}
2020
]
21-
}
21+
}

.vscode/settings.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
{
22
"editor.tabSize": 2,
3-
"eslint.validate": ["javascript", "javascriptreact", "vue", "json", "jsonc", "markdown"],
3+
"eslint.validate": [
4+
"javascript",
5+
"javascriptreact",
6+
"vue",
7+
"json",
8+
"jsonc",
9+
"markdown"
10+
],
411
"typescript.tsdk": "./node_modules/typescript/lib",
512
"vetur.validation.script": false,
613
"[typescript]": {

docs/rules/no-async-in-computed-properties.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ since: v3.8.0
1212
1313
- :gear: This rule is included in all of `"plugin:vue/essential"`, `*.configs["flat/essential"]`, `"plugin:vue/vue2-essential"`, `*.configs["flat/vue2-essential"]`, `"plugin:vue/strongly-recommended"`, `*.configs["flat/strongly-recommended"]`, `"plugin:vue/vue2-strongly-recommended"`, `*.configs["flat/vue2-strongly-recommended"]`, `"plugin:vue/recommended"`, `*.configs["flat/recommended"]`, `"plugin:vue/vue2-recommended"` and `*.configs["flat/vue2-recommended"]`.
1414

15-
Computed properties and functions should be synchronous. Asynchronous actions inside them may not work as expected and can lead to an unexpected behaviour, that's why you should avoid them.
16-
If you need async computed properties you might want to consider using additional plugin [vue-async-computed]
15+
Computed properties and functions should be synchronous. Asynchronous actions inside them may not work as expected and can lead to unexpected behaviour; that's why you should avoid them.
16+
If you need async computed properties, consider using the [`computedAsync`] composable from VueUse.
1717

1818
## :book: Rule Details
1919

@@ -147,9 +147,9 @@ const fetchData = computed(() => {
147147

148148
## :books: Further Reading
149149

150-
- [vue-async-computed]
150+
- [`computedAsync`]
151151

152-
[vue-async-computed]: https://github.com/foxbenjaminfox/vue-async-computed
152+
[`computedAsync`]: https://vueuse.org/core/computedAsync
153153

154154
## :rocket: Version
155155

lib/rules/max-len.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ function computeLineLength(line, tabWidth) {
101101
function isTrailingComment(line, lineNumber, comment) {
102102
return Boolean(
103103
comment &&
104-
comment.loc.start.line === lineNumber &&
105-
lineNumber <= comment.loc.end.line &&
106-
(comment.loc.end.line > lineNumber ||
107-
comment.loc.end.column === line.length)
104+
comment.loc.start.line === lineNumber &&
105+
lineNumber <= comment.loc.end.line &&
106+
(comment.loc.end.line > lineNumber ||
107+
comment.loc.end.column === line.length)
108108
)
109109
}
110110

lib/rules/no-restricted-v-bind.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ function parseOption(option) {
3333
test(key) {
3434
return Boolean(
3535
key.argument &&
36-
key.argument.type === 'VIdentifier' &&
37-
matcher.test(key.argument.rawName)
36+
key.argument.type === 'VIdentifier' &&
37+
matcher.test(key.argument.rawName)
3838
)
3939
},
4040
modifiers: []

lib/rules/no-restricted-v-on.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ function parseOption(option) {
2626
test(key) {
2727
return Boolean(
2828
key.argument &&
29-
key.argument.type === 'VIdentifier' &&
30-
matcher.test(key.argument.rawName)
29+
key.argument.type === 'VIdentifier' &&
30+
matcher.test(key.argument.rawName)
3131
)
3232
}
3333
}

lib/rules/padding-lines-in-component-definition.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ function isComma(node) {
4444
function isValidProperties(propOrEmit) {
4545
return Boolean(
4646
propOrEmit.type !== 'infer-type' &&
47-
propOrEmit.node &&
48-
['Property', 'SpreadElement'].includes(propOrEmit.node.type)
47+
propOrEmit.node &&
48+
['Property', 'SpreadElement'].includes(propOrEmit.node.type)
4949
)
5050
}
5151

lib/rules/require-valid-default-prop.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,8 @@ module.exports = {
435435
(prop) =>
436436
Boolean(
437437
prop.type === 'type' ||
438-
prop.type === 'infer-type' ||
439-
prop.type === 'object'
438+
prop.type === 'infer-type' ||
439+
prop.type === 'object'
440440
)
441441
)
442442
const defaultsByWithDefaults =

lib/utils/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2813,10 +2813,10 @@ function isVueInstance(node) {
28132813
const callee = node.callee
28142814
return Boolean(
28152815
node.type === 'NewExpression' &&
2816-
callee.type === 'Identifier' &&
2817-
callee.name === 'Vue' &&
2818-
node.arguments.length > 0 &&
2819-
skipTSAsExpression(node.arguments[0]).type === 'ObjectExpression'
2816+
callee.type === 'Identifier' &&
2817+
callee.name === 'Vue' &&
2818+
node.arguments.length > 0 &&
2819+
skipTSAsExpression(node.arguments[0]).type === 'ObjectExpression'
28202820
)
28212821
}
28222822

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
"jsdom": "^22.0.0",
117117
"markdownlint-cli": "^0.42.0",
118118
"pathe": "^1.1.2",
119-
"prettier": "^3.3.3",
119+
"prettier": "^3.7.0",
120120
"typescript": "^5.7.2",
121121
"vite-plugin-eslint4b": "^0.5.1",
122122
"vitepress": "^1.4.1",

0 commit comments

Comments
 (0)