Skip to content

Commit 20dd202

Browse files
authored
test: ignore indent test for decorators with ts4.8 (#244)
* test: ignore indent test for decorators with ts4.8 * Update ci.json * Update ci.json * chore: update codesandbox config
1 parent c159bfa commit 20dd202

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

.codesandbox/ci.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"installCommand": "install-with-ignore-engines",
23
"node": "16",
34
"sandboxes": []
45
}

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"docs:preview": "yarn svelte-kit preview",
3636
"docs:watch": "yarn svelte-kit dev",
3737
"format-for-gen-file": "eslint src/types-for-node.ts src/utils/rules.ts src/configs --fix",
38+
"install-with-ignore-engines": "yarn --ignore-engines",
3839
"lint": "run-p lint:*",
3940
"lint-fix": "yarn lint:es --fix && yarn lint:style --fix",
4041
"lint:es": "eslint --cache -f friendly .",

tests/src/rules/indent.ts

+9
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ describe("use @typescript-eslint/parser@4", () => {
3333
rule as any,
3434
loadTestCases("indent", {
3535
filter(filename) {
36+
if (
37+
filename.endsWith("ts-class03-input.svelte") ||
38+
filename.endsWith("ts-decorator01-input.svelte") ||
39+
filename.endsWith("ts-decorator02-input.svelte")
40+
) {
41+
// Decorator nodes in ts4.8 are incompatible.
42+
return false
43+
}
44+
3645
return path.basename(path.dirname(filename)) === "ts"
3746
},
3847
}),

0 commit comments

Comments
 (0)