Skip to content

Bump Node.js packages and update testing infrastructure #5188

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

Closed
wants to merge 4 commits into from
Closed
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
75 changes: 0 additions & 75 deletions .eslintrc.json

This file was deleted.

8 changes: 2 additions & 6 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
{
"require": "esbuild-register",
"color": true,
"enable-source-maps": true,
"extensions": [
".js",
".jsx"
],
"require": "source-map-support/register",
"timeout": 600000,
"slow": 2000,
"spec": "test/**/*.test.js"
"spec": "test/**/*.test.ts"
}
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
save=true
; We use a public Azure Artifacts mirror
registry=https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/npm/registry/
always-auth=true
; But we don't want references to it in the lockfile
omit-lockfile-registry-resolved=true
Empty file added .prettierignore
Empty file.
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"tabWidth": 2,
"plugins": ["prettier-plugin-organize-imports"]
}
15 changes: 15 additions & 0 deletions .vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import os from "os";
import path from "path";
import { defineConfig } from "@vscode/test-cli";

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",
timeout: 60 * 1000 // 10 minutes to allow for debugging
},
});
48 changes: 48 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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,
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