Start with the vanilla eslint config that is created by npm create svelte@latest my-app
Enable rule svelte/prefer-style-directive
Create a svelte file with the provided snippet.
Observe that file can be auto-fixed through the cli by running pnpm eslint --fix file.svelte
Observe that file can be auto-fixed in the IDE by individually selecting all instance of fix this svelte/prefer-style-directive problem
.
a. EXPECTED: Observe that file can be auto-fixed in the IDE by selecting fix all svelte/prefer-style-directive problems
b. ACTUAL: Observe that file can NOT be auto-fixed in the IDE by selecting fix all svelte/prefer-style-directive problems
Link to GitHub Repo with Minimal Reproducible Example
Before You File a Bug Report Please Confirm You Have Done The Following...
What version of ESLint are you using?
8.55.0
What version of
eslint-plugin-svelte
are you using?2.35.1
What did you do?
Configuration
``` /** @type { import("eslint").Linter.FlatConfig } */ module.exports = { root: true, extends: [ 'eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:svelte/recommended' ], parser: '@typescript-eslint/parser', plugins: ['@typescript-eslint'], parserOptions: { sourceType: 'module', ecmaVersion: 2020, extraFileExtensions: ['.svelte'] }, env: { browser: true, es2017: true, node: true }, overrides: [ { files: ['*.svelte'], parser: 'svelte-eslint-parser', parserOptions: { parser: '@typescript-eslint/parser', }, }, ], rules: { 'svelte/prefer-style-directive': 'error', }, } ```https://github.com/sveltejs/eslint-plugin-svelte/assets/33713262/8767dcae-3ef7-4d77-8b08-2748ebe3c72a
Repro
npm create svelte@latest my-app
svelte/prefer-style-directive
pnpm eslint --fix file.svelte
fix this svelte/prefer-style-directive problem
fix all svelte/prefer-style-directive problems
b. ACTUAL: Observe that file can NOT be auto-fixed in the IDE by selectingfix all svelte/prefer-style-directive problems
Link to GitHub Repo with Minimal Reproducible Example
https://github.com/thenbe/repro-svelte-eslint-style
Additional comments
Issue happens in both vscode and neovim.