vuejs / vue-eslint-parser

The ESLint custom parser for `.vue` files.
MIT License
443 stars 74 forks source link

parser doesn't infer ecmaVersion from env #168

Closed jonaskuske closed 2 years ago

jonaskuske commented 2 years ago

When using eslint with its default parser, it is enough to specify the ECMA Version as part of the env, as it also sets parserOptions.ecmaVersion. For example, "env": { "ecma2022": true } automatically sets parserOptions.ecmaVersion to 13. This is explained in the official ESLint docs: https://eslint.org/docs/latest/user-guide/configuring/language-options#specifying-environments

When using the Vue parser that behavior does not exist, you have to set parserOptions.ecmaVersion manually.

ota-meshi commented 2 years ago

Could you please provide a minimal repository to reproduce issue?

jonaskuske commented 2 years ago

closed in favor of https://github.com/vuejs/eslint-plugin-vue/issues/1991 :)