Skip to content

chore: fix ci error #621

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

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/rules/html-closing-bracket-spacing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ export default createRule('html-closing-bracket-spacing', {
node.type === 'SvelteEndTag'
? 'endTag'
: node.selfClosing
? 'selfClosingTag'
: 'startTag';
? 'selfClosingTag'
: 'startTag';

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

Expand Down
4 changes: 2 additions & 2 deletions src/rules/indent-helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ export function defineVisitor(
actualUnit: mismatchCharIndexes.length
? 'whitespace'
: options.indentChar === '\t'
? 'tab'
: 'space',
? 'tab'
: 'space',
expectedIndentPlural: expectedIndent === 1 ? '' : 's',
actualIndentPlural: actualIndent === 1 ? '' : 's'
},
Expand Down
8 changes: 4 additions & 4 deletions src/shared/svelte-compile-warns/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,8 @@ function* transformScripts(context: RuleContext, text: string) {
? transformWithTypescript
: transformWithBabel
: isUseBabel(context)
? transformWithBabel
: null;
? transformWithBabel
: null;

const sourceCode = getSourceCode(context);
if (transform) {
Expand Down Expand Up @@ -431,8 +431,8 @@ function getWarningsFromCode(
...(semver.satisfies(compiler.VERSION, '>=4.0.0-0')
? { customElement: true }
: hasTagOption(getSourceCode(context).ast)
? { customElement: true }
: {})
? { customElement: true }
: {})
});

return { warnings: result.warnings as Warning[], kind: 'warn' };
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"@typescript-eslint/parser": "<6.11.0"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"@typescript-eslint/parser": "<6.11.0"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"@typescript-eslint/parser": "<6.11.0"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- prettier-ignore -->
<script lang="ts">
import foo from "./foo.json" with
{
type
:
"json"
}
</script>

<!--tests/fixtures/rules/indent/invalid/ts/ts-import-attributes01-input-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript": ">=5.3.0"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
- 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 4 spaces but found 0 spaces.
line: 5
column: 1
suggestions: null
- message: Expected indentation of 6 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 8 spaces but found 0 spaces.
line: 8
column: 1
suggestions: null
- message: Expected indentation of 10 spaces but found 0 spaces.
line: 9
column: 1
suggestions: null
- message: Expected indentation of 12 spaces but found 0 spaces.
line: 10
column: 1
suggestions: null
- message: Expected indentation of 12 spaces but found 0 spaces.
line: 11
column: 1
suggestions: null
- message: Expected indentation of 8 spaces but found 0 spaces.
line: 12
column: 1
suggestions: null
- message: Expected indentation of 4 spaces but found 0 spaces.
line: 13
column: 1
suggestions: null
- message: Expected indentation of 2 spaces but found 0 spaces.
line: 14
column: 1
suggestions: null
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!-- prettier-ignore -->
<script lang="ts">
import(
"./foo.json",
{
assert
:
{
type
:
"json"
}
}
)
</script>

<!--tests/fixtures/rules/indent/invalid/ts/ts-import-attributes02-input-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!-- prettier-ignore -->
<script lang="ts">
import(
"./foo.json",
{
assert
:
{
type
:
"json"
}
}
)
</script>

<!--tests/fixtures/rules/indent/invalid/ts/ts-import-attributes02-input-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!-- prettier-ignore -->
<script lang="ts">
export * from "mod" with
{
type
:
"json"
}
;
</script>

<!--tests/fixtures/rules/indent/invalid/ts/ts-import-attributes03-input-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript": ">=5.3.0"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!-- prettier-ignore -->
<script lang="ts">
export { foo } from "mod" with
{
type
:
"json"
}
;
</script>

<!--tests/fixtures/rules/indent/invalid/ts/ts-import-attributes04-input-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript": ">=5.3.0"
}
8 changes: 4 additions & 4 deletions tests/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ function writeFixtures(ruleName: string, inputFile: string, { force }: { force?:
path.extname(inputFile) === '.svelte'
? 'svelte-eslint-parser'
: path.extname(inputFile) === '.ts'
? '@typescript-eslint/parser'
: undefined;
? '@typescript-eslint/parser'
: undefined;
const { code, filename, options, ...verifyConfig } = config;
const result = linter.verify(
code,
Expand Down Expand Up @@ -285,8 +285,8 @@ function getConfig(ruleName: string, inputFile: string) {
path.extname(filename) === '.svelte'
? require.resolve('svelte-eslint-parser')
: path.extname(inputFile) === '.ts'
? require.resolve('@typescript-eslint/parser')
: undefined;
? require.resolve('@typescript-eslint/parser')
: undefined;

return Object.assign(
{
Expand Down