Skip to content

Commit 805b3f5

Browse files
authored
Upgrade vue-eslint-parser to v7.2.0 (#1365)
1 parent 6d6203f commit 805b3f5

File tree

4 files changed

+43
-1
lines changed

4 files changed

+43
-1
lines changed

docs/rules/no-deprecated-filter.md

+16
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,22 @@ See [Migration Guide - Filters](https://v3.vuejs.org/guide/migration/filters.htm
3939

4040
</eslint-code-block>
4141

42+
:::warning
43+
Do not disable [`"parserOptions.vueFeatures.filter"`](https://github.com/vuejs/vue-eslint-parser#parseroptionsvuefeaturesfilter) to use this rule.
44+
45+
```json5
46+
{
47+
"parser": "vue-eslint-parser",
48+
"parserOptions": {
49+
"vueFeatures": {
50+
"filter": false // Don't!!
51+
}
52+
}
53+
}
54+
```
55+
56+
:::
57+
4258
### :wrench: Options
4359

4460
Nothing.

docs/user-guide/README.md

+19
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,25 @@ For example:
154154

155155
If you want to disallow `eslint-disable` functionality in `<template>`, disable the [vue/comment-directive](../rules/comment-directive.md) rule.
156156

157+
### Parser Options
158+
159+
This plugin uses [vue-eslint-parser](https://www.npmjs.com/package/vue-eslint-parser).
160+
For `parserOptions`, you can use the `vueFeatures` options of `vue-eslint-parser`.
161+
162+
```json
163+
{
164+
"parser": "vue-eslint-parser",
165+
"parserOptions": {
166+
"vueFeatures": {
167+
"filter": true,
168+
"interpolationAsNonHTML": false,
169+
}
170+
}
171+
}
172+
```
173+
174+
See the [`parserOptions.vueFeatures` documentation for `vue-eslint-parser`](https://github.com/vuejs/vue-eslint-parser#parseroptionsvuefeatures) for more details.
175+
157176
## :computer: Editor integrations
158177

159178
### Visual Studio Code

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"eslint-utils": "^2.1.0",
5656
"natural-compare": "^1.4.0",
5757
"semver": "^7.3.2",
58-
"vue-eslint-parser": "^7.1.1"
58+
"vue-eslint-parser": "^7.2.0"
5959
},
6060
"devDependencies": {
6161
"@types/eslint": "^7.2.0",

tests/lib/rules/no-deprecated-filter.js

+7
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ ruleTester.run('no-deprecated-filter', rule, {
2929
{
3030
filename: 'test.vue',
3131
code: '<template>{{ method(msg) }}</template>'
32+
},
33+
{
34+
filename: 'test.vue',
35+
code: '<template>{{ msg | filter }}</template>',
36+
parserOptions: {
37+
vueFeatures: { filter: false }
38+
}
3239
}
3340
],
3441

0 commit comments

Comments
 (0)