Closed hopperelec closed 8 months ago
You need to set a correct ecmaVersion
for ESLint. Maybe we can add ecmaVersion: 'latest'
into the base config? cc @ota-meshi
This plugin still supports ESLint v7, so we can't use "latest"
. The next major version will drop support for old ESLint and we'll be able to use it.
Ah, thank you! For some reason I thought that parser-related settings in the ESLint root only applied to the the built-in parser, hence me thinking it was an issue with this plugin. I think if I had a bit more experience with ESLint I probably would have recognized this, so I don't think this really needs "fixed" by the plugin.
Before You File a Bug Report Please Confirm You Have Done The Following...
*.svelte
file linting does not work with the parser alone. You should also use eslint-plugin-svelte with it.)What version of ESLint are you using?
8.53.0
What version of
eslint-plugin-svelte
andsvelte-eslint-parser
are you using?What did you do?
package.json
.eslintrc.js
test.svelte
What did you expect to happen?
No error, because that is valid JS syntax
What actually happened?
...\src\test.svelte
5:19 error Parsing error: Unexpected token .
Link to GitHub Repo with Minimal Reproducible Example
https://github.com/HopperElec/svelte-eslint-parser-mre
Additional comments
No response