Skip to content

Commit

Permalink
Upgrade vue-eslint-parser to v7.2.0 (#1365)
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed Dec 4, 2020
1 parent 6d6203f commit 805b3f5
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 1 deletion.
16 changes: 16 additions & 0 deletions docs/rules/no-deprecated-filter.md
Expand Up @@ -39,6 +39,22 @@ See [Migration Guide - Filters](https://v3.vuejs.org/guide/migration/filters.htm

</eslint-code-block>

:::warning
Do not disable [`"parserOptions.vueFeatures.filter"`](https://github.com/vuejs/vue-eslint-parser#parseroptionsvuefeaturesfilter) to use this rule.

```json5
{
"parser": "vue-eslint-parser",
"parserOptions": {
"vueFeatures": {
"filter": false // Don't!!
}
}
}
```

:::

### :wrench: Options

Nothing.
Expand Down
19 changes: 19 additions & 0 deletions docs/user-guide/README.md
Expand Up @@ -154,6 +154,25 @@ For example:

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

### Parser Options

This plugin uses [vue-eslint-parser](https://www.npmjs.com/package/vue-eslint-parser).
For `parserOptions`, you can use the `vueFeatures` options of `vue-eslint-parser`.

```json
{
"parser": "vue-eslint-parser",
"parserOptions": {
"vueFeatures": {
"filter": true,
"interpolationAsNonHTML": false,
}
}
}
```

See the [`parserOptions.vueFeatures` documentation for `vue-eslint-parser`](https://github.com/vuejs/vue-eslint-parser#parseroptionsvuefeatures) for more details.

## :computer: Editor integrations

### Visual Studio Code
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -55,7 +55,7 @@
"eslint-utils": "^2.1.0",
"natural-compare": "^1.4.0",
"semver": "^7.3.2",
"vue-eslint-parser": "^7.1.1"
"vue-eslint-parser": "^7.2.0"
},
"devDependencies": {
"@types/eslint": "^7.2.0",
Expand Down
7 changes: 7 additions & 0 deletions tests/lib/rules/no-deprecated-filter.js
Expand Up @@ -29,6 +29,13 @@ ruleTester.run('no-deprecated-filter', rule, {
{
filename: 'test.vue',
code: '<template>{{ method(msg) }}</template>'
},
{
filename: 'test.vue',
code: '<template>{{ msg | filter }}</template>',
parserOptions: {
vueFeatures: { filter: false }
}
}
],

Expand Down

0 comments on commit 805b3f5

Please sign in to comment.