Skip to content

Commit 2709da8

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 9fec4c9 + 36ee5d8 commit 2709da8

21 files changed

+742
-144
lines changed

.changeset/five-roses-peel.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/fresh-taxis-glow.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/great-ravens-happen.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/purple-lights-invite.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/rude-heads-serve.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/social-ghosts-dress.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,52 @@
11
# eslint-plugin-vue
22

3+
## 10.5.1
4+
5+
### Patch Changes
6+
7+
- Fixed [`vue/no-negated-v-if-condition`](https://eslint.vuejs.org/rules/no-negated-v-if-condition.html) rule to swap entire elements ([#2941](https://github.com/vuejs/eslint-plugin-vue/pull/2941))
8+
9+
## 10.5.0
10+
11+
### Minor Changes
12+
13+
- Added `ignoredObjectNames` option to [`vue/no-async-in-computed-properties`](https://eslint.vuejs.org/rules/no-async-in-computed-properties.html) ([#2927](https://github.com/vuejs/eslint-plugin-vue/pull/2927))
14+
- Added `ignorePattern` option to [`vue/no-v-html`](https://eslint.vuejs.org/rules/no-v-html.html) ([#2857](https://github.com/vuejs/eslint-plugin-vue/pull/2857))
15+
- Added `sortLineLength` option to [`vue/attributes-order`](https://eslint.vuejs.org/rules/attributes-order.html) ([#2759](https://github.com/vuejs/eslint-plugin-vue/pull/2759))
16+
- Changed [`vue/component-name-in-template-casing`](https://eslint.vuejs.org/rules/component-name-in-template-casing.html) `globals` option to support regex patterns ([#2928](https://github.com/vuejs/eslint-plugin-vue/pull/2928))
17+
- Changed [`vue/valid-define-options`](https://eslint.vuejs.org/rules/valid-define-options.html) to allow local literal constant references ([#2920](https://github.com/vuejs/eslint-plugin-vue/pull/2920))
18+
- Changed [`vue/no-mutating-props`](https://eslint.vuejs.org/rules/no-mutating-props.html) and [`vue/no-side-effects-in-computed-properties`](https://eslint.vuejs.org/rules/no-side-effects-in-computed-properties.html) rules to detect `Object.assign` mutations ([#2929](https://github.com/vuejs/eslint-plugin-vue/pull/2929))
19+
- Added [`@stylistic/eslint-plugin`](https://eslint.style/) as optional peer dependency ([#2884](https://github.com/vuejs/eslint-plugin-vue/pull/2884))
20+
21+
### Patch Changes
22+
23+
- Changed [`vue/define-macros-order`](https://eslint.vuejs.org/rules/define-macros-order.html) to ignore enum declarations and `declare` statements ([#2918](https://github.com/vuejs/eslint-plugin-vue/pull/2918))
24+
325
## 10.4.0
426

527
### Minor Changes
628

729
- Added `ignoreParents` option to [`vue/no-deprecated-slot-attribute`](https://eslint.vuejs.org/rules/no-deprecated-slot-attribute.html) ([#2784](https://github.com/vuejs/eslint-plugin-vue/pull/2784))
8-
930
- Added new [`vue/no-negated-v-if-condition`](https://eslint.vuejs.org/rules/no-negated-v-if-condition.html) rule ([#2794](https://github.com/vuejs/eslint-plugin-vue/pull/2794))
10-
1131
- Added new [`vue/no-negated-condition`](https://eslint.vuejs.org/rules/no-negated-condition.html) rule ([#2795](https://github.com/vuejs/eslint-plugin-vue/pull/2795))
1232

1333
### Patch Changes
1434

1535
- Resolved TypeScript compatibility issues introduced by [eslint-typegen](https://github.com/antfu/eslint-typegen) ([#2790](https://github.com/vuejs/eslint-plugin-vue/pull/2790))
16-
1736
- 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))
1837

1938
## 10.3.0
2039

2140
### Minor Changes
2241

2342
- Added [`@typescript-eslint/parser`](https://typescript-eslint.io/packages/parser) as an optional peer dependency ([#2775](https://github.com/vuejs/eslint-plugin-vue/pull/2775))
24-
2543
- Add TypeScript IntelliSense support via [eslint-typegen](https://github.com/antfu/eslint-typegen) ([#2770](https://github.com/vuejs/eslint-plugin-vue/pull/2770))
26-
2744
- [`vue/no-deprecated-slot-attribute`](https://eslint.vuejs.org/rules/no-deprecated-slot-attribute.html) `ignore` option now supports regex patterns ([#2773](https://github.com/vuejs/eslint-plugin-vue/pull/2773))
2845

2946
### Patch Changes
3047

3148
- Fixed false negatives when using typescript-eslint v8 in [`vue/script-indent`](https://eslint.vuejs.org/rules/script-indent.html) rule ([#2775](https://github.com/vuejs/eslint-plugin-vue/pull/2775))
32-
3349
- Update resources ([#2752](https://github.com/vuejs/eslint-plugin-vue/pull/2752))
34-
3550
- [`vue/no-restricted-html-elements`](https://eslint.vuejs.org/rules/no-restricted-html-elements.html) now also checks SVG and MathML elements ([#2755](https://github.com/vuejs/eslint-plugin-vue/pull/2755))
3651

3752
## 10.2.0

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

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,42 @@ export default {
108108

109109
## :wrench: Options
110110

111-
Nothing.
111+
```js
112+
{
113+
"vue/no-async-in-computed-properties": ["error", {
114+
"ignoredObjectNames": []
115+
}]
116+
}
117+
```
118+
119+
- `ignoredObjectNames`: An array of object names that should be ignored when used with promise-like methods (`.then()`, `.catch()`, `.finally()`). This is useful for validation libraries like Zod that use these method names for non-promise purposes (e.g. [`z.catch()`](https://zod.dev/api#catch)).
120+
121+
### `"ignoredObjectNames": ["z"]`
122+
123+
<eslint-code-block :rules="{'vue/no-async-in-computed-properties': ['error', {ignoredObjectNames: ['z']}]}">
124+
125+
```vue
126+
<script setup>
127+
import { computed } from 'vue'
128+
import { z } from 'zod'
129+
130+
/* ✓ GOOD */
131+
const schema1 = computed(() => {
132+
return z.string().catch('default')
133+
})
134+
135+
const schema2 = computed(() => {
136+
return z.catch(z.string().min(2), 'fallback')
137+
})
138+
139+
/* ✗ BAD */
140+
const fetchData = computed(() => {
141+
return myFunc().then(res => res.json())
142+
})
143+
</script>
144+
```
145+
146+
</eslint-code-block>
112147

113148
## :books: Further Reading
114149

docs/rules/no-bare-strings-in-template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ If you want to report these string literals, enable the [vue/no-useless-v-bind]
7272
}
7373
```
7474

75-
- `allowlist` ... An array of allowed strings or regular expression patterns (e.g. `/\d+/` to allow numbers).
75+
- `allowlist` ... An array of allowed strings or regular expression patterns (e.g. `"/\d+/"` to allow numbers).
7676
- `attributes` ... An object whose keys are tag name or patterns and value is an array of attributes to check for that tag name.
7777
- `directives` ... An array of directive names to check literal value.
7878

docs/rules/no-deprecated-slot-attribute.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ This rule reports deprecated `slot` attribute in Vue.js v2.6.0+.
4949
}
5050
```
5151

52-
- `"ignore"` (`string[]`) An array of tags or regular expression patterns (e.g. `/^custom-/`) that ignore these rules. This option will check both kebab-case and PascalCase versions of the given tag names. Default is empty.
53-
- `"ignoreParents"` (`string[]`) An array of tags or regular expression patterns (e.g. `/^custom-/`) for parents that ignore these rules. This option is especially useful for [Web-Components](https://developer.mozilla.org/en-US/docs/Web/API/Web_components). Default is empty.
52+
- `"ignore"` (`string[]`) An array of tags or regular expression patterns (e.g. `"/^custom-/"`) that ignore these rules. This option will check both kebab-case and PascalCase versions of the given tag names. Default is empty.
53+
- `"ignoreParents"` (`string[]`) An array of tags or regular expression patterns (e.g. `"/^custom-/"`) for parents that ignore these rules. This option is especially useful for [Web-Components](https://developer.mozilla.org/en-US/docs/Web/API/Web_components). Default is empty.
5454

5555
### `"ignore": ["my-component"]`
5656

0 commit comments

Comments
 (0)