-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for eslint v9 (#673)
- Loading branch information
Showing
94 changed files
with
450 additions
and
302 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": patch | ||
--- | ||
|
||
feat: add support for eslint v9 |
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
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
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
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
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
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
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
5 changes: 5 additions & 0 deletions
5
tests/fixtures/rules/no-inner-declarations/invalid/.eslintrc.json
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 @@ | ||
{ | ||
"rules": { | ||
"no-var": "off" | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
tests/fixtures/rules/no-inner-declarations/invalid/_config.json
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,3 @@ | ||
{ | ||
"options": ["functions", { "blockScopedFunctions": "disallow" }] | ||
} |
3 changes: 3 additions & 0 deletions
3
tests/fixtures/rules/no-inner-declarations/invalid/_requirements.json
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,3 @@ | ||
{ | ||
"eslint": "^9.0.0-0" | ||
} |
2 changes: 1 addition & 1 deletion
2
tests/fixtures/rules/no-inner-declarations/invalid/both/_config.json
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"options": ["both"] | ||
"options": ["both", { "blockScopedFunctions": "disallow" }] | ||
} |
3 changes: 3 additions & 0 deletions
3
tests/fixtures/rules/no-inner-declarations/invalid/both/_requirements.json
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,3 @@ | ||
{ | ||
"eslint": "^9.0.0-0" | ||
} |
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
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
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
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
3 changes: 3 additions & 0 deletions
3
tests/fixtures/rules/no-inner-declarations/invalid/v8/_config.json
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,3 @@ | ||
{ | ||
"options": ["functions"] | ||
} |
3 changes: 3 additions & 0 deletions
3
tests/fixtures/rules/no-inner-declarations/invalid/v8/_requirements.json
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,3 @@ | ||
{ | ||
"eslint": "<=8" | ||
} |
3 changes: 3 additions & 0 deletions
3
tests/fixtures/rules/no-inner-declarations/invalid/v8/both/_config.json
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,3 @@ | ||
{ | ||
"options": ["both"] | ||
} |
3 changes: 3 additions & 0 deletions
3
tests/fixtures/rules/no-inner-declarations/invalid/v8/both/_requirements.json
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,3 @@ | ||
{ | ||
"eslint": "<=8" | ||
} |
28 changes: 28 additions & 0 deletions
28
tests/fixtures/rules/no-inner-declarations/invalid/v8/both/test01-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,28 @@ | ||
- message: Move function declaration to program root. | ||
line: 3 | ||
column: 3 | ||
suggestions: null | ||
- message: Move variable declaration to program root. | ||
line: 5 | ||
column: 11 | ||
suggestions: null | ||
- message: Move variable declaration to program root. | ||
line: 6 | ||
column: 31 | ||
suggestions: null | ||
- message: Move function declaration to program root. | ||
line: 8 | ||
column: 3 | ||
suggestions: null | ||
- message: Move variable declaration to function body root. | ||
line: 10 | ||
column: 5 | ||
suggestions: null | ||
- message: Move function declaration to program root. | ||
line: 15 | ||
column: 3 | ||
suggestions: null | ||
- message: Move variable declaration to function body root. | ||
line: 16 | ||
column: 13 | ||
suggestions: null |
19 changes: 19 additions & 0 deletions
19
tests/fixtures/rules/no-inner-declarations/invalid/v8/both/test01-input.svelte
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,19 @@ | ||
<script> | ||
if (test) { | ||
function doSomething() {} | ||
} | ||
if (foo) var a; | ||
if (foo) /* some comments */ var a; | ||
if (foo) { | ||
function f() { | ||
if (bar) { | ||
var a; | ||
} | ||
} | ||
} | ||
if (foo) { | ||
function f() { | ||
if (bar) var a; | ||
} | ||
} | ||
</script> |
12 changes: 12 additions & 0 deletions
12
tests/fixtures/rules/no-inner-declarations/invalid/v8/test01-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,12 @@ | ||
- message: Move function declaration to program root. | ||
line: 3 | ||
column: 3 | ||
suggestions: null | ||
- message: Move function declaration to program root. | ||
line: 8 | ||
column: 3 | ||
suggestions: null | ||
- message: Move function declaration to program root. | ||
line: 15 | ||
column: 3 | ||
suggestions: null |
19 changes: 19 additions & 0 deletions
19
tests/fixtures/rules/no-inner-declarations/invalid/v8/test01-input.svelte
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,19 @@ | ||
<script> | ||
if (test) { | ||
function doSomething() {} | ||
} | ||
if (foo) var a; | ||
if (foo) /* some comments */ var a; | ||
if (foo) { | ||
function f() { | ||
if (bar) { | ||
var a; | ||
} | ||
} | ||
} | ||
if (foo) { | ||
function f() { | ||
if (bar) var a; | ||
} | ||
} | ||
</script> |
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
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{ | ||
"parserOptions": { | ||
"parser": "@babel/eslint-parser" | ||
} | ||
"languageOptions": { | ||
"parserOptions": { | ||
"parser": "@babel/eslint-parser" | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.