Closed aphitiel closed 4 years ago
The following script is linted with error 'someStore' is assigned a value but never used no-unused-vars with svelte@3.16 but not with svelte@3.15.
error 'someStore' is assigned a value but never used no-unused-vars
<script> import {writable} from 'svelte/store'; const someStore = writable({}); </script> {$someStore}
To reproduce, I had installed the following:
"eslint": "^6.7.2", "eslint-plugin-svelte3": "^2.7.3", "svelte": "^3.16.0"
And used this minimal .eslintrc.js:
module.exports = { root: true, parserOptions: { sourceType: 'module' }, env: { es6: true, }, plugins: [ 'svelte3' ], overrides: [ { files: ['**/*.svelte'], processor: 'svelte3/svelte3' } ], rules: { 'no-unused-vars': 'error', }, };
This is a bug in the warnings emitted by Svelte - https://github.com/sveltejs/svelte/issues/4021 - It's been fixed on master but not yet released.
The following script is linted with
error 'someStore' is assigned a value but never used no-unused-vars
with svelte@3.16 but not with svelte@3.15.To reproduce, I had installed the following:
And used this minimal .eslintrc.js: