Skip to content

Commit ca39dcd

Browse files
authored
chore: fix ci error (#621)
1 parent 27fe1f5 commit ca39dcd

16 files changed

+147
-12
lines changed

src/rules/html-closing-bracket-spacing.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ export default createRule('html-closing-bracket-spacing', {
8484
node.type === 'SvelteEndTag'
8585
? 'endTag'
8686
: node.selfClosing
87-
? 'selfClosingTag'
88-
: 'startTag';
87+
? 'selfClosingTag'
88+
: 'startTag';
8989

9090
if (options[tagType] === 'ignore') return;
9191

src/rules/indent-helpers/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ export function defineVisitor(
127127
actualUnit: mismatchCharIndexes.length
128128
? 'whitespace'
129129
: options.indentChar === '\t'
130-
? 'tab'
131-
: 'space',
130+
? 'tab'
131+
: 'space',
132132
expectedIndentPlural: expectedIndent === 1 ? '' : 's',
133133
actualIndentPlural: actualIndent === 1 ? '' : 's'
134134
},

src/shared/svelte-compile-warns/index.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,8 @@ function* transformScripts(context: RuleContext, text: string) {
385385
? transformWithTypescript
386386
: transformWithBabel
387387
: isUseBabel(context)
388-
? transformWithBabel
389-
: null;
388+
? transformWithBabel
389+
: null;
390390

391391
const sourceCode = getSourceCode(context);
392392
if (transform) {
@@ -431,8 +431,8 @@ function getWarningsFromCode(
431431
...(semver.satisfies(compiler.VERSION, '>=4.0.0-0')
432432
? { customElement: true }
433433
: hasTagOption(getSourceCode(context).ast)
434-
? { customElement: true }
435-
: {})
434+
? { customElement: true }
435+
: {})
436436
});
437437

438438
return { warnings: result.warnings as Warning[], kind: 'warn' };
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"@typescript-eslint/parser": "<6.11.0"
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"@typescript-eslint/parser": "<6.11.0"
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"@typescript-eslint/parser": "<6.11.0"
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- prettier-ignore -->
2+
<script lang="ts">
3+
import foo from "./foo.json" with
4+
{
5+
type
6+
:
7+
"json"
8+
}
9+
</script>
10+
11+
<!--tests/fixtures/rules/indent/invalid/ts/ts-import-attributes01-input-->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"typescript": ">=5.3.0"
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
- message: Expected indentation of 2 spaces but found 0 spaces.
2+
line: 3
3+
column: 1
4+
suggestions: null
5+
- message: Expected indentation of 4 spaces but found 0 spaces.
6+
line: 4
7+
column: 1
8+
suggestions: null
9+
- message: Expected indentation of 4 spaces but found 0 spaces.
10+
line: 5
11+
column: 1
12+
suggestions: null
13+
- message: Expected indentation of 6 spaces but found 0 spaces.
14+
line: 6
15+
column: 1
16+
suggestions: null
17+
- message: Expected indentation of 8 spaces but found 0 spaces.
18+
line: 7
19+
column: 1
20+
suggestions: null
21+
- message: Expected indentation of 8 spaces but found 0 spaces.
22+
line: 8
23+
column: 1
24+
suggestions: null
25+
- message: Expected indentation of 10 spaces but found 0 spaces.
26+
line: 9
27+
column: 1
28+
suggestions: null
29+
- message: Expected indentation of 12 spaces but found 0 spaces.
30+
line: 10
31+
column: 1
32+
suggestions: null
33+
- message: Expected indentation of 12 spaces but found 0 spaces.
34+
line: 11
35+
column: 1
36+
suggestions: null
37+
- message: Expected indentation of 8 spaces but found 0 spaces.
38+
line: 12
39+
column: 1
40+
suggestions: null
41+
- message: Expected indentation of 4 spaces but found 0 spaces.
42+
line: 13
43+
column: 1
44+
suggestions: null
45+
- message: Expected indentation of 2 spaces but found 0 spaces.
46+
line: 14
47+
column: 1
48+
suggestions: null
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!-- prettier-ignore -->
2+
<script lang="ts">
3+
import(
4+
"./foo.json",
5+
{
6+
assert
7+
:
8+
{
9+
type
10+
:
11+
"json"
12+
}
13+
}
14+
)
15+
</script>
16+
17+
<!--tests/fixtures/rules/indent/invalid/ts/ts-import-attributes02-input-->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!-- prettier-ignore -->
2+
<script lang="ts">
3+
import(
4+
"./foo.json",
5+
{
6+
assert
7+
:
8+
{
9+
type
10+
:
11+
"json"
12+
}
13+
}
14+
)
15+
</script>
16+
17+
<!--tests/fixtures/rules/indent/invalid/ts/ts-import-attributes02-input-->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!-- prettier-ignore -->
2+
<script lang="ts">
3+
export * from "mod" with
4+
{
5+
type
6+
:
7+
"json"
8+
}
9+
;
10+
</script>
11+
12+
<!--tests/fixtures/rules/indent/invalid/ts/ts-import-attributes03-input-->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"typescript": ">=5.3.0"
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!-- prettier-ignore -->
2+
<script lang="ts">
3+
export { foo } from "mod" with
4+
{
5+
type
6+
:
7+
"json"
8+
}
9+
;
10+
</script>
11+
12+
<!--tests/fixtures/rules/indent/invalid/ts/ts-import-attributes04-input-->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"typescript": ">=5.3.0"
3+
}

tests/utils/utils.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ function writeFixtures(ruleName: string, inputFile: string, { force }: { force?:
205205
path.extname(inputFile) === '.svelte'
206206
? 'svelte-eslint-parser'
207207
: path.extname(inputFile) === '.ts'
208-
? '@typescript-eslint/parser'
209-
: undefined;
208+
? '@typescript-eslint/parser'
209+
: undefined;
210210
const { code, filename, options, ...verifyConfig } = config;
211211
const result = linter.verify(
212212
code,
@@ -285,8 +285,8 @@ function getConfig(ruleName: string, inputFile: string) {
285285
path.extname(filename) === '.svelte'
286286
? require.resolve('svelte-eslint-parser')
287287
: path.extname(inputFile) === '.ts'
288-
? require.resolve('@typescript-eslint/parser')
289-
: undefined;
288+
? require.resolve('@typescript-eslint/parser')
289+
: undefined;
290290

291291
return Object.assign(
292292
{

0 commit comments

Comments
 (0)