Skip to content

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 8 commits into from
May 15, 2025
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
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

[*.{json,yaml,yml,code-workspace}]
indent_size = 2
75 changes: 0 additions & 75 deletions .eslintrc.json

This file was deleted.

12 changes: 0 additions & 12 deletions .mocharc.json

This file was deleted.

3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist/
modules/
out/
20 changes: 20 additions & 0 deletions .vscode-test.mjs
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
},
});
49 changes: 49 additions & 0 deletions eslint.config.mjs
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,
},
],
},
},
);
Loading
Loading