diff --git a/.c8rc.json b/.c8rc.json index 4f56a7ed071..e7b602ec15b 100644 --- a/.c8rc.json +++ b/.c8rc.json @@ -4,4 +4,4 @@ "include": ["src/**", "built/local/**"], "exclude": ["**/node_modules/**"], "mergeAsync": true -} \ No newline at end of file +} diff --git a/.dprint.jsonc b/.dprint.jsonc index 29b0dfb1609..312e4bf7b5a 100644 --- a/.dprint.jsonc +++ b/.dprint.jsonc @@ -51,6 +51,7 @@ ], "plugins": [ "https://plugins.dprint.dev/typescript-0.86.1.wasm", - "https://plugins.dprint.dev/prettier-0.27.0.json@3557a62b4507c55a47d8cde0683195b14d13c41dda66d0f0b0e111aed107e2fe" + "https://plugins.dprint.dev/prettier-0.27.0.json@3557a62b4507c55a47d8cde0683195b14d13c41dda66d0f0b0e111aed107e2fe", + "https://plugins.dprint.dev/json-0.17.4.wasm" ] } diff --git a/.eslintrc.json b/.eslintrc.json index 5f3d49fde96..819d042c25b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -16,7 +16,10 @@ "plugin:@typescript-eslint/stylistic" ], "plugins": [ - "@typescript-eslint", "no-null", "eslint-plugin-local", "simple-import-sort" + "@typescript-eslint", + "no-null", + "eslint-plugin-local", + "simple-import-sort" ], "ignorePatterns": [ "**/node_modules/**", @@ -113,7 +116,7 @@ "local/only-arrow-functions": [ "error", { - "allowNamedFunctions": true , + "allowNamedFunctions": true, "allowDeclarations": true } ], @@ -133,7 +136,7 @@ "overrides": [ // By default, the ESLint CLI only looks at .js files. But, it will also look at // any files which are referenced in an override config. Most users of typescript-eslint - // get this behavior by default by extending a recommended typescript-eslint config, which + // get this behavior by default by extending a recommended typescript-eslint config, which // just so happens to override some core ESLint rules. We don't extend from any config, so // explicitly reference TS files here so the CLI picks them up. // @@ -146,7 +149,8 @@ "files": ["*.mjs", "*.mts"], "rules": { // These globals don't exist outside of CJS files. - "no-restricted-globals": ["error", + "no-restricted-globals": [ + "error", { "name": "__filename" }, { "name": "__dirname" }, { "name": "require" }, diff --git a/.github/workflow-resources/.lsifrc.json b/.github/workflow-resources/.lsifrc.json index bec9a9dd7a4..0f603834e03 100644 --- a/.github/workflow-resources/.lsifrc.json +++ b/.github/workflow-resources/.lsifrc.json @@ -1,6 +1,6 @@ { - "project": "../../src/tsconfig.json", - "source": "../../package.json", - "package": "../../package.json", - "out": "../../typescript.lsif" -} \ No newline at end of file + "project": "../../src/tsconfig.json", + "source": "../../package.json", + "package": "../../package.json", + "out": "../../typescript.lsif" +} diff --git a/.vscode/extensions.json b/.vscode/extensions.json index beff1465a01..d4d882bcf76 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -8,4 +8,4 @@ "unwantedRecommendations": [ "ms-vscode.vscode-typescript-tslint-plugin" ] -} \ No newline at end of file +} diff --git a/.vscode/launch.template.json b/.vscode/launch.template.json index 6d6086ecc73..80b4c599aa4 100644 --- a/.vscode/launch.template.json +++ b/.vscode/launch.template.json @@ -1,4 +1,4 @@ -/* +/* Copy this file into '.vscode/launch.json' or merge its contents into your existing configurations. @@ -13,52 +13,52 @@ */ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "node", - "request": "launch", - "name": "Mocha Tests (currently opened test)", - "runtimeArgs": ["--nolazy"], - "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", - "args": [ - "-u", - "bdd", - "--no-timeouts", - "--colors", - "built/local/run.js", - "-f", - // You can change this to be the name of a specific test file (without the file extension) - // to consistently launch the same test - "${fileBasenameNoExtension}", - "--skip-percent", - "0" - ], - "env": { - "NODE_ENV": "testing" - }, - "outFiles": [ - "${workspaceFolder}/built/**/*.js", - "${workspaceFolder}/built/**/*.mjs", - "${workspaceFolder}/built/**/*.cjs", - "!**/node_modules/**" - ], - "sourceMaps": true, - "smartStep": true, - "preLaunchTask": "npm: build:tests", - "console": "integratedTerminal", - "customDescriptionGenerator": "'__tsDebuggerDisplay' in this ? this.__tsDebuggerDisplay(defaultValue) : defaultValue" - }, - { - // See: https://github.com/microsoft/TypeScript/wiki/Debugging-Language-Service-in-VS-Code - "type": "node", - "request": "attach", - "name": "Attach to VS Code TS Server via Port", - "processId": "${command:PickProcess}", - "customDescriptionGenerator": "'__tsDebuggerDisplay' in this ? this.__tsDebuggerDisplay(defaultValue) : defaultValue" - } - ] + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Mocha Tests (currently opened test)", + "runtimeArgs": ["--nolazy"], + "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", + "args": [ + "-u", + "bdd", + "--no-timeouts", + "--colors", + "built/local/run.js", + "-f", + // You can change this to be the name of a specific test file (without the file extension) + // to consistently launch the same test + "${fileBasenameNoExtension}", + "--skip-percent", + "0" + ], + "env": { + "NODE_ENV": "testing" + }, + "outFiles": [ + "${workspaceFolder}/built/**/*.js", + "${workspaceFolder}/built/**/*.mjs", + "${workspaceFolder}/built/**/*.cjs", + "!**/node_modules/**" + ], + "sourceMaps": true, + "smartStep": true, + "preLaunchTask": "npm: build:tests", + "console": "integratedTerminal", + "customDescriptionGenerator": "'__tsDebuggerDisplay' in this ? this.__tsDebuggerDisplay(defaultValue) : defaultValue" + }, + { + // See: https://github.com/microsoft/TypeScript/wiki/Debugging-Language-Service-in-VS-Code + "type": "node", + "request": "attach", + "name": "Attach to VS Code TS Server via Port", + "processId": "${command:PickProcess}", + "customDescriptionGenerator": "'__tsDebuggerDisplay' in this ? this.__tsDebuggerDisplay(defaultValue) : defaultValue" + } + ] } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 06ba723db58..fd27345c69a 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -49,6 +49,6 @@ "problemMatcher": [ "$tsc" ] - }, + } ] } diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json index dbda203c4fd..40ec90cd8d8 100644 --- a/scripts/tsconfig.json +++ b/scripts/tsconfig.json @@ -23,6 +23,7 @@ }, "include": [ - "**/*.mjs", "**/*.cjs" + "**/*.mjs", + "**/*.cjs" ] } diff --git a/src/.eslintrc.json b/src/.eslintrc.json index 52ffeff5ab4..697574c6a8e 100644 --- a/src/.eslintrc.json +++ b/src/.eslintrc.json @@ -6,7 +6,8 @@ }, "rules": { "@typescript-eslint/no-unnecessary-type-assertion": "error", - "no-restricted-globals": ["error", + "no-restricted-globals": [ + "error", { "name": "setTimeout" }, { "name": "clearTimeout" }, { "name": "setInterval" }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 117f52a8e2c..c3c8a58d8f5 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -5294,7 +5294,7 @@ "category": "Error", "code": 6258 }, - "Found 1 error in {0}": { + "Found 1 error in {0}": { "category": "Message", "code": 6259 }, @@ -6276,9 +6276,9 @@ "category": "Message", "code": 6930 }, - "List of file name suffixes to search when resolving a module." : { - "category": "Error", - "code": 6931 + "List of file name suffixes to search when resolving a module.": { + "category": "Error", + "code": 6931 }, "Variable '{0}' implicitly has an '{1}' type.": { diff --git a/src/compiler/tsconfig.json b/src/compiler/tsconfig.json index 6b8d0464146..cbbd3df0beb 100644 --- a/src/compiler/tsconfig.json +++ b/src/compiler/tsconfig.json @@ -4,8 +4,7 @@ "types": ["node"] }, - "references": [ - ], + "references": [], "include": ["**/*"] } diff --git a/src/harness/tsconfig.json b/src/harness/tsconfig.json index 6998e4fd6e7..f95c91b8c8a 100644 --- a/src/harness/tsconfig.json +++ b/src/harness/tsconfig.json @@ -2,7 +2,9 @@ "extends": "../tsconfig-base", "compilerOptions": { "types": [ - "node", "mocha", "chai" + "node", + "mocha", + "chai" ] }, "references": [ @@ -11,7 +13,7 @@ { "path": "../jsTyping" }, { "path": "../server" }, { "path": "../typingsInstallerCore" }, - { "path": "../deprecatedCompat" }, + { "path": "../deprecatedCompat" } ], "include": ["**/*"] diff --git a/src/server/typesMap.json b/src/server/typesMap.json index cfe7f6483c4..6c95ae9c429 100644 --- a/src/server/typesMap.json +++ b/src/server/typesMap.json @@ -361,7 +361,7 @@ "passport": "passport", "passport-local": "passport-local", "path": "pathjs", - "pdfkit":"pdfkit", + "pdfkit": "pdfkit", "peer": "peerjs", "peg": "pegjs", "photoswipe": "photoswipe", @@ -494,4 +494,4 @@ "ZeroClipboard": "zeroclipboard", "ZSchema-browser": "z-schema" } -} \ No newline at end of file +} diff --git a/src/testRunner/tsconfig.json b/src/testRunner/tsconfig.json index 89bcb24c0d5..29d2f351b62 100644 --- a/src/testRunner/tsconfig.json +++ b/src/testRunner/tsconfig.json @@ -2,7 +2,9 @@ "extends": "../tsconfig-base", "compilerOptions": { "types": [ - "node", "mocha", "chai" + "node", + "mocha", + "chai" ] }, "references": [ @@ -13,7 +15,7 @@ { "path": "../server" }, { "path": "../typingsInstallerCore" }, { "path": "../deprecatedCompat" }, - { "path": "../harness" }, + { "path": "../harness" } ], "include": ["**/*"] } diff --git a/src/tsconfig.json b/src/tsconfig.json index 004634f5683..c585d3480f2 100644 --- a/src/tsconfig.json +++ b/src/tsconfig.json @@ -16,6 +16,6 @@ { "path": "./typescript" }, { "path": "./typingsInstaller" }, { "path": "./typingsInstallerCore" }, - { "path": "./watchGuard" }, + { "path": "./watchGuard" } ] } diff --git a/src/tsserver/tsconfig.json b/src/tsserver/tsconfig.json index f24abdaf6fc..f9fb39dbede 100644 --- a/src/tsserver/tsconfig.json +++ b/src/tsserver/tsconfig.json @@ -1,6 +1,6 @@ { "extends": "../tsconfig-base", - + "compilerOptions": { "types": [ "node" @@ -10,7 +10,7 @@ { "path": "../compiler" }, { "path": "../services" }, { "path": "../jsTyping" }, - { "path": "../server" }, + { "path": "../server" } ], "include": ["**/*"] }