Skip to content

Commit 629cfae

Browse files
committed
chore(lint): don't ignore vscode test files (#13535)
1 parent 34d3cde commit 629cfae

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

editors/vscode/tests/test-helpers.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,10 @@ export async function writeToFixtureFile(file: string, content: string, workspac
119119
await window.showTextDocument(fileUri);
120120

121121
for (const char of content) {
122+
// oxlint-disable eslint/no-await-in-loop -- simulate key presses
122123
await commands.executeCommand('type', { text: char });
123124
await sleep(50);
125+
// oxlint-enable
124126
}
125127
}
126128

@@ -131,3 +133,4 @@ export async function waitForDiagnosticChange(): Promise<void> {
131133
})
132134
);
133135
}
136+

oxlintrc.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@
1616
"correctness": "error",
1717
"perf": "error"
1818
},
19+
"overrides": [
20+
{
21+
"files": ["**/editors/vscode/tests/*.spec.ts"],
22+
"rules": {
23+
// VSCode uses `vscode-test-cli`, which uses `mocha`.
24+
// Ignore specific rules, instead of copying the plugins array.
25+
"vitest/expect-expect": "off"
26+
}
27+
}
28+
],
1929
"ignorePatterns": [
2030
"**/fixtures/**",
2131
"**/generated/**",
@@ -24,7 +34,6 @@
2434
"crates/oxc_semantic/tests/**",
2535
"tasks/e2e/**", // TODO
2636
"napi/**", // TODO
27-
"editors/vscode/tests/**", // TODO,
2837
"tasks/lint_rules/src/oxlint-rules.mjs", // TODO
2938
"tasks/lint_rules/src/main.mjs" // TODO
3039
]

0 commit comments

Comments
 (0)