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
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.46.0
What version of eslint-plugin-svelte are you using?
2.32.4
What did you do?
I linted the following outdented code using the enclosed ESLint configuration.
<script>
functiondemo1() {// This should be indented with 4 spacesconsole.log('ok');}functiondemo2() {// This should be indented with 4 spaces}functiondemo3() {// This should be indented with 4 spaces// Another lineconsole.log('ok');}functiondemo4() {// This should be indented with 4 spaces// Another line}demo1();demo2();demo3();demo4();
</script>
I expected ESLint to indent the code correctly; in my opinion, that is:
<script>
functiondemo1() {// This should be indented with 4 spacesconsole.log('ok'); }functiondemo2() {// This should be indented with 4 spaces }functiondemo3() {// This should be indented with 4 spaces// Another lineconsole.log('ok'); }functiondemo4() {// This should be indented with 4 spaces// Another line }demo1();demo2();demo3();demo4();
</script>
What actually happened?
Fixing it by running eslint --fix changed it to the following:
<script>
functiondemo1() {// This should be indented with 4 spacesconsole.log('ok'); }functiondemo2() {// This should be indented with 4 spaces }functiondemo3() {// This should be indented with 4 spaces// Another lineconsole.log('ok'); }functiondemo4() {// This should be indented with 4 spaces// Another line }demo1();demo2();demo3();demo4();
</script>
Link to GitHub Repo with Minimal Reproducible Example
The original code is in original.svelte, the expected result is in expected.svelte, and the actual output is in actual.svelte. The .eslintrc.json file contains the used (minimal) configuration.
Additional comments
I tried looking for similar issues before creating this one, but found none.
Thank you for maintaining this plugin. I use it frequently, and this is the only issue I've encountered.
The text was updated successfully, but these errors were encountered:
EXPECTED: 'svelte/indent' should not complain about indent level.
ACTUAL: 'svelte/indent' has one complaint. It complains about the indent level for line number 6 (the line containing the c key). 'svelte/indent' wants line number 6 to be indented one level less than line number 5 and one level less than line number 7.
I tried creating a playground link but the indent rule doesn't work at all there (I disabled all rules except svelte/indent). But if you paste my snippet into the rule's example page you can reproduce the issue.
Before You File a Bug Report Please Confirm You Have Done The Following...
What version of ESLint are you using?
8.46.0
What version of
eslint-plugin-svelte
are you using?2.32.4
What did you do?
I linted the following outdented code using the enclosed ESLint configuration.
What did you expect to happen?
I expected ESLint to indent the code correctly; in my opinion, that is:
What actually happened?
Fixing it by running
eslint --fix
changed it to the following:Link to GitHub Repo with Minimal Reproducible Example
Repository: https://github.com/garraflavatra/svelte-eslint-comment-repro.
The original code is in
original.svelte
, the expected result is inexpected.svelte
, and the actual output is inactual.svelte
. The.eslintrc.json
file contains the used (minimal) configuration.Additional comments
I tried looking for similar issues before creating this one, but found none.
Thank you for maintaining this plugin. I use it frequently, and this is the only issue I've encountered.
The text was updated successfully, but these errors were encountered: