Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
What version of ESLint are you using?
8.30.0
What version of eslint-plugin-svelte
are you using?
2.14.1
What did you do?
Configuration
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
ignorePatterns: ["*.cjs"],
settings: {
'import/parsers': {
'@typescript-eslint/parser': [ '.ts', '.tsx', '.cts', '.mts' ],
'espree': [ '.js', 'jsx', '.cjs', '.mjs' ],
}
},
rules: {
"spaced-comment": "error"
},
overrides: [
{
files: ["*.svelte"],
parser: "svelte-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
},
},
]
};
{#each f(
//asdf
d) as k}<Csdf></Csdf>{/each}
eslint . --fix
What did you expect to happen?
space added on line 2 after the //
What actually happened?
space added on line 1 after the {#
, causing a syntax error:
{# each f(
//asdf
d) as k}<Csdf></Csdf>{/each}
> eslint . --fix
C:\projects\asdf\src\main.svelte
1:2 error Parsing error: Expected if, each or await
✖ 1 problem (1 error, 0 warnings)
Link to GitHub Repo with Minimal Reproducible Example
also same issue but different rule: https://ota-meshi.github.io/eslint-plugin-svelte/playground/#eJyrVkrOT0lVslKqVk5NTM5QSNOIydPXTyxOSYvJS9FUSCxWyK61cQZy9e2q9UEqapVqAbyyES0=
Additional comments
No response
Metadata
Metadata
Assignees
Labels
No labels