-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: broken indentation of if condition in
svelte/indent
rule (#802)
Previously it was indented like this: ```js if ( a === b || c === d || e === f ) { } ``` This PR will fix it so that it is indented like this: ```js if ( a === b || c === d || e === f ) { } ```
- Loading branch information
Showing
8 changed files
with
536 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'eslint-plugin-svelte': minor | ||
--- | ||
|
||
fix: broken indentation of if condition in `svelte/indent` rule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
304 changes: 304 additions & 0 deletions
304
...ages/eslint-plugin-svelte/tests/fixtures/rules/indent/invalid/script-binary02-errors.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,304 @@ | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 3 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 4 spaces but found 0 spaces. | ||
line: 4 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 6 spaces but found 0 spaces. | ||
line: 5 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 8 spaces but found 0 spaces. | ||
line: 6 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 8 spaces but found 0 spaces. | ||
line: 7 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 4 spaces but found 0 spaces. | ||
line: 8 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 9 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 10 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 11 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 4 spaces but found 0 spaces. | ||
line: 12 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 6 spaces but found 0 spaces. | ||
line: 13 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 8 spaces but found 0 spaces. | ||
line: 14 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 8 spaces but found 0 spaces. | ||
line: 15 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 8 spaces but found 0 spaces. | ||
line: 16 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 8 spaces but found 0 spaces. | ||
line: 17 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 4 spaces but found 0 spaces. | ||
line: 18 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 19 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 20 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 21 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 4 spaces but found 0 spaces. | ||
line: 22 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 6 spaces but found 0 spaces. | ||
line: 23 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 6 spaces but found 0 spaces. | ||
line: 24 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 6 spaces but found 0 spaces. | ||
line: 25 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 6 spaces but found 0 spaces. | ||
line: 26 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 6 spaces but found 0 spaces. | ||
line: 27 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 4 spaces but found 0 spaces. | ||
line: 28 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 29 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 30 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 31 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 4 spaces but found 0 spaces. | ||
line: 32 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 6 spaces but found 0 spaces. | ||
line: 33 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 6 spaces but found 0 spaces. | ||
line: 34 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 6 spaces but found 0 spaces. | ||
line: 35 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 4 spaces but found 0 spaces. | ||
line: 36 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 37 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 38 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 39 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 4 spaces but found 0 spaces. | ||
line: 40 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 6 spaces but found 0 spaces. | ||
line: 41 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 6 spaces but found 0 spaces. | ||
line: 42 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 6 spaces but found 0 spaces. | ||
line: 43 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 6 spaces but found 0 spaces. | ||
line: 44 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 6 spaces but found 0 spaces. | ||
line: 45 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 4 spaces but found 0 spaces. | ||
line: 46 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 47 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 48 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 49 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 4 spaces but found 0 spaces. | ||
line: 50 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 6 spaces but found 0 spaces. | ||
line: 51 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 8 spaces but found 0 spaces. | ||
line: 52 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 8 spaces but found 0 spaces. | ||
line: 53 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 8 spaces but found 0 spaces. | ||
line: 54 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 8 spaces but found 0 spaces. | ||
line: 55 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 8 spaces but found 0 spaces. | ||
line: 56 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 8 spaces but found 0 spaces. | ||
line: 57 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 8 spaces but found 0 spaces. | ||
line: 58 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 8 spaces but found 0 spaces. | ||
line: 59 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 4 spaces but found 0 spaces. | ||
line: 60 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 61 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 62 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 63 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 4 spaces but found 0 spaces. | ||
line: 64 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 6 spaces but found 0 spaces. | ||
line: 65 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 8 spaces but found 0 spaces. | ||
line: 66 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 10 spaces but found 0 spaces. | ||
line: 67 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 10 spaces but found 0 spaces. | ||
line: 68 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 10 spaces but found 0 spaces. | ||
line: 69 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 10 spaces but found 0 spaces. | ||
line: 70 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 10 spaces but found 0 spaces. | ||
line: 71 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 10 spaces but found 0 spaces. | ||
line: 72 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 6 spaces but found 0 spaces. | ||
line: 73 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 8 spaces but found 0 spaces. | ||
line: 74 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 8 spaces but found 0 spaces. | ||
line: 75 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 4 spaces but found 0 spaces. | ||
line: 76 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 77 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 78 | ||
column: 1 | ||
suggestions: null |
Oops, something went wrong.