-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indentation bug when using svelte/indent
(RangeError: Maximum call stack size exceeded
)
#998
Comments
FYI, this makes Which greatly reduces my developer productivity as I have to spend time manually fixing indentations |
Why don't you use prettier for this? |
@baseballyama I don't really want to add another tool to my stack I am familiar with ESLint |
@baseballyama out of curiosity, how difficult would it be to entirely avoid indenting-related issues in I'm sure this would remove a lot of maintenance overhead, if the (There is only one slight issue, is that I prefer the |
Thankfully, I can ignore the "svelte/indent": ["error", {
indentScript: false,
ignoredNodes: ["SvelteScriptElement"],
alignAttributesVertically: true,
indent: 4,
}] However, only issue is that I am unable to catch linting rules for when the script is indented (where I prefer no indentation) |
eslint-plugin-svelte/packages/eslint-plugin-svelte/src/rules/indent-helpers/index.ts Lines 206 to 210 in 99e67b3
I think it might be better to remove the ES/TS visitors and just let other ESLints handle such formatting rules, but perhaps merely have a setting for |
We welcome your PR. |
When I get some time, I'll give it a shot if you believe it is the right direction? Since we no longer need to spend as much time worrying about the formatting of I also think it would be generally more reliable and preferable to users that rely on other eslint packages which are specifically tailored to the JS/TS code. Personally, I think |
Before You File a Bug Report Please Confirm You Have Done The Following...
What version of ESLint are you using?
9.17.0
What version of
eslint-plugin-svelte
are you using?2.46.1
What did you do?
Configuration
What did you expect to happen?
ESLint should not crash
What actually happened?
Link to GitHub Repo with Minimal Reproducible Example
https://github.com/AlbertMarashi/svelte-indent-bug
Additional comments
No response
The text was updated successfully, but these errors were encountered: