-
Notifications
You must be signed in to change notification settings - Fork 513
Overhaul linting, formatting, and testing infrastructure #5190
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
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
eb00e23
Upgrade ESLint to v9, remove rewire, add @vscode/test-cli
andyleejordan e946b75
Convert ESLint config and add Prettier
andyleejordan e6f0d72
Update TypeScript config for just type-checking
andyleejordan 1f89c0a
Setup vscode-test and deprecate Mocha
andyleejordan ca5cf18
Fix type imports and ESLint directives
andyleejordan bd4f99d
Remove unnecessary stub in tests
andyleejordan 082128b
Skip two tests that need stubs fixed
andyleejordan fccf1f6
Remove broken tests around daily build
andyleejordan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 @@ | ||
dist/ | ||
modules/ | ||
out/ |
This file contains hidden or 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,20 @@ | ||
import { defineConfig } from "@vscode/test-cli"; | ||
import os from "os"; | ||
import path from "path"; | ||
|
||
export default defineConfig({ | ||
files: "test/**/*.test.ts", | ||
// The default user data directory had too many characters for the IPC connection on macOS in CI. | ||
launchArgs: [ | ||
"--profile-temp", | ||
"--user-data-dir", | ||
path.join(os.tmpdir(), "vscode-user-data"), | ||
], | ||
workspaceFolder: "test/TestEnvironment.code-workspace", | ||
mocha: { | ||
ui: "bdd", // describe, it, etc. | ||
require: ["esbuild-register"], // transpile TypeScript on-the-fly | ||
slow: 2000, // 2 seconds for slow test | ||
timeout: 60 * 1000, // 10 minutes to allow for debugging | ||
}, | ||
}); |
This file contains hidden or 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,49 @@ | ||
import eslint from "@eslint/js"; | ||
import eslintConfigPrettier from "eslint-config-prettier/flat"; | ||
import tseslint from "typescript-eslint"; | ||
|
||
export default tseslint.config( | ||
eslint.configs.recommended, | ||
tseslint.configs.strictTypeChecked, | ||
tseslint.configs.stylisticTypeChecked, | ||
eslintConfigPrettier, | ||
{ | ||
languageOptions: { | ||
parserOptions: { | ||
projectService: true, | ||
tsconfigRootDir: import.meta.dirname, | ||
}, | ||
}, | ||
rules: { | ||
"@typescript-eslint/explicit-function-return-type": "error", | ||
"@typescript-eslint/no-empty-object-type": "off", | ||
"@typescript-eslint/no-floating-promises": [ | ||
"error", | ||
{ | ||
ignoreVoid: true, | ||
}, | ||
], | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/no-require-imports": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
argsIgnorePattern: "^_", | ||
}, | ||
], | ||
"@typescript-eslint/no-unsafe-argument": "off", | ||
"@typescript-eslint/no-unsafe-assignment": "off", | ||
"@typescript-eslint/no-unsafe-call": "off", | ||
"@typescript-eslint/no-unsafe-member-access": "off", | ||
"@typescript-eslint/no-unsafe-return": "off", | ||
"@typescript-eslint/restrict-template-expressions": "off", | ||
"@typescript-eslint/prefer-nullish-coalescing": [ | ||
"error", | ||
{ | ||
ignoreConditionalTests: true, | ||
ignoreMixedLogicalExpressions: true, | ||
}, | ||
], | ||
}, | ||
}, | ||
); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.