You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two quite the same files: index.js and index.svelte.
If you run npx eslint index.js, you will see no errors.
But if you run npx eslint index.svelte you will see "Parser error", which comes from eslint-plugin-svelte3 when it tries to parse the file.
It seems like eslint-plugin-svelte3 should use the parser (including it's settings) described at the .eslintrc.js.
The text was updated successfully, but these errors were encountered:
Before ESLint gets ahold of the component and parses it according to whatever you specify in that configuration, the Svelte compiler does need to be run on the component (to extract information about what variables are used in the template, etc.), and Svelte doesn't support the optional chaining syntax yet. You'd need a preprocessor for Svelte to be able to compile the component, but there's currently no way to tell this plugin about that preprocessor. See #10.
I've created the test project with
.eslintrc.js
that usesbabel-eslint
parser:https://github.com/ekulikov-flocktory/eslint-plugin-svelte3-test
There are two quite the same files:
index.js
andindex.svelte
.If you run
npx eslint index.js
, you will see no errors.But if you run
npx eslint index.svelte
you will see "Parser error", which comes fromeslint-plugin-svelte3
when it tries to parse the file.It seems like
eslint-plugin-svelte3
should use the parser (including it's settings) described at the.eslintrc.js
.The text was updated successfully, but these errors were encountered: