From 81d9f4f38cddcf0250dbb165c104457415aa9fc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CJamesHenry=E2=80=9D?= Date: Fri, 3 May 2024 15:40:35 +0200 Subject: [PATCH] chore: refactor tsconfigs to use project references --- .../@nx-eslint-npm-17.3.1-a2f85d8c50.patch | 14 -- eslint.config.mjs | 11 +- nx.json | 6 + package.json | 12 +- packages/ast-spec/package.json | 3 +- .../tests/BinaryOperatorToText.type-test.ts | 1 + .../ast-spec/tests/util/serializers/Node.ts | 2 +- packages/ast-spec/tsconfig.build.json | 7 +- packages/ast-spec/tsconfig.json | 17 +- packages/ast-spec/tsconfig.spec.json | 30 +++ packages/eslint-plugin-internal/package.json | 7 +- .../tsconfig.build.json | 20 +- packages/eslint-plugin-internal/tsconfig.json | 20 +- packages/eslint-plugin/package.json | 3 +- .../rules/naming-convention-utils/enums.ts | 14 +- .../src/rules/naming-convention.ts | 2 +- .../src/util/explicitReturnTypeUtils.ts | 3 +- packages/eslint-plugin/src/util/index.ts | 3 +- packages/eslint-plugin/src/util/misc.ts | 4 +- packages/eslint-plugin/tsconfig.build.json | 27 +- packages/eslint-plugin/tsconfig.json | 20 +- packages/integration-tests/package.json | 3 +- .../integration-tests/tsconfig.build.json | 9 +- packages/integration-tests/tsconfig.json | 16 +- packages/integration-tests/tsconfig.spec.json | 24 ++ packages/parser/package.json | 3 +- packages/parser/src/index.ts | 9 +- packages/parser/src/parser.ts | 6 +- packages/parser/tsconfig.build.json | 18 +- packages/parser/tsconfig.json | 17 +- packages/parser/tsconfig.spec.json | 25 ++ packages/repo-tools/package.json | 3 +- packages/repo-tools/tsconfig.build.json | 12 +- packages/repo-tools/tsconfig.json | 16 +- .../package.json | 5 +- .../tsconfig.build.json | 17 +- .../tsconfig.json | 13 +- packages/rule-tester/package.json | 3 +- packages/rule-tester/tests/RuleTester.test.ts | 12 +- packages/rule-tester/tsconfig.build.json | 12 +- packages/rule-tester/tsconfig.json | 15 +- packages/rule-tester/tsconfig.spec.json | 25 ++ packages/scope-manager/package.json | 3 +- packages/scope-manager/project.json | 11 - packages/scope-manager/src/analyze.ts | 3 +- .../src/definition/Definition.ts | 2 +- packages/scope-manager/src/index.ts | 7 +- .../src/referencer/ClassVisitor.ts | 2 +- .../src/referencer/PatternVisitor.ts | 3 +- .../scope-manager/src/referencer/Reference.ts | 3 +- .../src/referencer/Referencer.ts | 4 +- .../scope-manager/src/referencer/Visitor.ts | 6 +- .../src/referencer/VisitorBase.ts | 6 +- .../scope-manager/src/referencer/index.ts | 3 +- .../src/scope/FunctionExpressionNameScope.ts | 2 +- .../scope-manager/src/scope/FunctionScope.ts | 5 +- .../scope-manager/src/scope/GlobalScope.ts | 2 +- packages/scope-manager/src/scope/Scope.ts | 2 +- packages/scope-manager/src/scope/WithScope.ts | 2 +- .../src/variable/ImplicitLibVariable.ts | 3 +- packages/scope-manager/src/variable/index.ts | 6 +- .../es6-destructuring-assignments.test.ts | 10 + .../scope-manager/tests/test-utils/parse.ts | 6 +- .../test-utils/serializers/baseSerializer.ts | 2 +- packages/scope-manager/tsconfig.build.json | 23 +- packages/scope-manager/tsconfig.json | 13 +- packages/scope-manager/tsconfig.spec.json | 13 +- packages/type-utils/package.json | 3 +- packages/type-utils/tsconfig.build.json | 12 +- packages/type-utils/tsconfig.json | 16 +- packages/type-utils/tsconfig.spec.json | 25 ++ packages/types/package.json | 3 +- packages/types/src/lib.ts | 2 +- packages/types/src/parser-options.ts | 2 +- packages/types/tsconfig.build.json | 8 +- packages/types/tsconfig.json | 13 +- packages/typescript-eslint/package.json | 3 +- .../typescript-eslint/tsconfig.build.json | 12 +- packages/typescript-eslint/tsconfig.json | 17 +- packages/typescript-eslint/tsconfig.spec.json | 27 ++ packages/typescript-estree/package.json | 3 +- packages/typescript-estree/src/convert.ts | 16 +- .../WatchCompilerHostOfConfigFile.ts | 2 +- .../src/create-program/shared.ts | 10 +- packages/typescript-estree/src/index.ts | 10 +- packages/typescript-estree/src/parser.ts | 3 +- .../typescript-estree/tsconfig.build.json | 17 +- packages/typescript-estree/tsconfig.json | 16 +- packages/typescript-estree/tsconfig.spec.json | 25 ++ packages/utils/package.json | 3 +- .../src/eslint-utils/InferTypesFromRule.ts | 2 +- packages/utils/src/ts-eslint/AST.ts | 2 +- packages/utils/src/ts-eslint/ParserOptions.ts | 2 +- packages/utils/src/ts-eslint/RuleTester.ts | 4 +- packages/utils/tsconfig.build.json | 18 +- packages/utils/tsconfig.json | 11 +- packages/visitor-keys/package.json | 3 +- packages/visitor-keys/src/index.ts | 3 +- packages/visitor-keys/src/visitor-keys.ts | 3 +- packages/visitor-keys/tsconfig.build.json | 6 +- packages/visitor-keys/tsconfig.json | 12 +- packages/website-eslint/package.json | 13 +- packages/website-eslint/tsconfig.json | 20 +- packages/website/package.json | 5 +- packages/website/tsconfig.json | 10 +- tsconfig.base.json | 25 +- tsconfig.json | 68 +++-- yarn.lock | 236 ++++++++++-------- 108 files changed, 859 insertions(+), 463 deletions(-) delete mode 100644 .yarn/patches/@nx-eslint-npm-17.3.1-a2f85d8c50.patch create mode 100644 packages/ast-spec/tsconfig.spec.json create mode 100644 packages/integration-tests/tsconfig.spec.json create mode 100644 packages/parser/tsconfig.spec.json create mode 100644 packages/rule-tester/tsconfig.spec.json create mode 100644 packages/type-utils/tsconfig.spec.json create mode 100644 packages/typescript-eslint/tsconfig.spec.json create mode 100644 packages/typescript-estree/tsconfig.spec.json diff --git a/.yarn/patches/@nx-eslint-npm-17.3.1-a2f85d8c50.patch b/.yarn/patches/@nx-eslint-npm-17.3.1-a2f85d8c50.patch deleted file mode 100644 index 66c1c932b81..00000000000 --- a/.yarn/patches/@nx-eslint-npm-17.3.1-a2f85d8c50.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src/executors/lint/utility/eslint-utils.js b/src/executors/lint/utility/eslint-utils.js -index e5c40146ef3560047c0e3db88c80f8bf5042602a..86388a67f570249c2a23df47662a878ed774968b 100644 ---- a/src/executors/lint/utility/eslint-utils.js -+++ b/src/executors/lint/utility/eslint-utils.js -@@ -38,7 +38,8 @@ async function resolveAndInstantiateESLint(eslintConfigPath, options, useFlatCon - * not be any html files in the project, so keeping it true would break linting every time - */ - errorOnUnmatchedPattern: false, -- reportUnusedDisableDirectives: options.reportUnusedDisableDirectives || undefined, -+ // https://github.com/nrwl/nx/pull/21405 -+ // reportUnusedDisableDirectives: options.reportUnusedDisableDirectives || undefined, - }; - if (useFlatConfig) { - if (typeof options.useEslintrc !== 'undefined') { diff --git a/eslint.config.mjs b/eslint.config.mjs index bb2c0c49104..a522cfde3f4 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -85,15 +85,8 @@ export default tseslint.config( project: [ 'tsconfig.json', 'packages/*/tsconfig.json', - /** - * We are currently in the process of transitioning to nx's out of the box structure and - * so need to manually specify converted packages' tsconfig.build.json and tsconfig.spec.json - * files here for now in addition to the tsconfig.json glob pattern. - * - * TODO(#4665): Clean this up once all packages have been transitioned. - */ - 'packages/scope-manager/tsconfig.build.json', - 'packages/scope-manager/tsconfig.spec.json', + 'packages/*/tsconfig.build.json', + 'packages/*/tsconfig.spec.json', ], tsconfigRootDir: __dirname, warnOnUnsupportedTypeScriptVersion: false, diff --git a/nx.json b/nx.json index ff26dcf768d..22e5f723d42 100644 --- a/nx.json +++ b/nx.json @@ -1,6 +1,12 @@ { "$schema": "./node_modules/nx/schemas/nx-schema.json", "nxCloudAccessToken": "YjIzMmMxMWItMjhiMS00NWY2LTk1NWYtYWU3YWQ0YjE4YjBlfHJlYWQ=", + "plugins": [ + { + "plugin": "@nx/js/typescript", + "exclude": ["*", "packages/integration-tests/fixtures/**"] + } + ], "release": { "projects": ["*"], "changelog": { diff --git a/package.json b/package.json index 15f47600feb..fc3f72faf85 100644 --- a/package.json +++ b/package.json @@ -64,9 +64,10 @@ "@babel/types": "^7.24.0", "@eslint/eslintrc": "^2.1.4", "@eslint/js": "^8.57.0", - "@nx/eslint": "18.2.3", - "@nx/jest": "18.2.3", - "@nx/workspace": "18.2.3", + "@nx/eslint": "19.0.0-beta.9", + "@nx/jest": "19.0.0-beta.9", + "@nx/js": "19.0.0-beta.9", + "@nx/workspace": "19.0.0-beta.9", "@swc/core": "^1.4.12", "@swc/jest": "^0.2.36", "@types/babel__code-frame": "^7.0.6", @@ -112,7 +113,7 @@ "markdownlint-cli": "^0.39.0", "ncp": "^2.0.0", "netlify": "^13.1.14", - "nx": "18.2.3", + "nx": "19.0.0-beta.9", "prettier": "3.2.5", "pretty-format": "^29.7.0", "raw-loader": "^4.0.2", @@ -141,8 +142,7 @@ "pretty-format": "^29", "react-split-pane@^0.1.92": "patch:react-split-pane@npm%3A0.1.92#./.yarn/patches/react-split-pane-npm-0.1.92-93dbf51dff.patch", "tsx": "^4.7.2", - "typescript": "5.4.3", - "@nx/eslint@17.3.1": "patch:@nx/eslint@npm%3A17.3.1#./.yarn/patches/@nx-eslint-npm-17.3.1-a2f85d8c50.patch" + "typescript": "5.4.3" }, "packageManager": "yarn@3.8.1" } diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 9adf56e9121..ea5acc3373f 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -36,8 +36,7 @@ "clean-fixtures": "rimraf -g \"./src/**/fixtures/**/snapshots\"", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "lint": "npx nx lint", - "test": "jest", - "typecheck": "tsc -p tsconfig.json --noEmit" + "test": "jest" }, "funding": { "type": "opencollective", diff --git a/packages/ast-spec/tests/BinaryOperatorToText.type-test.ts b/packages/ast-spec/tests/BinaryOperatorToText.type-test.ts index 95f993b9e4d..bf14b128695 100644 --- a/packages/ast-spec/tests/BinaryOperatorToText.type-test.ts +++ b/packages/ast-spec/tests/BinaryOperatorToText.type-test.ts @@ -12,6 +12,7 @@ type BinaryOperatorWithoutInvalidTypes = Exclude< | SyntaxKind.CommaToken // -> SequenceExpression | SyntaxKind.QuestionQuestionToken // -> LogicalExpression >; + type _Test = { readonly [T in BinaryOperatorWithoutInvalidTypes]: BinaryOperatorToText[T]; // If there are any BinaryOperator members that don't have a corresponding diff --git a/packages/ast-spec/tests/util/serializers/Node.ts b/packages/ast-spec/tests/util/serializers/Node.ts index a0fe170f450..e3bda1872e3 100644 --- a/packages/ast-spec/tests/util/serializers/Node.ts +++ b/packages/ast-spec/tests/util/serializers/Node.ts @@ -54,7 +54,7 @@ const serializer: NewPlugin = { const loc = node.loc; const range = node.range; - const outputLines = []; + const outputLines: string[] = []; const childIndentation = indentation + config.indent; const printValue = (value: unknown): string => diff --git a/packages/ast-spec/tsconfig.build.json b/packages/ast-spec/tsconfig.build.json index 2812814bb30..d4ceb62e34d 100644 --- a/packages/ast-spec/tsconfig.build.json +++ b/packages/ast-spec/tsconfig.build.json @@ -1,10 +1,9 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": true, - "jsx": "preserve", - "outDir": "./dist", - "rootDir": "./src", + "rootDir": "src", + "outDir": "dist", + "emitDeclarationOnly": false, "resolveJsonModule": true }, "include": ["src", "typings"], diff --git a/packages/ast-spec/tsconfig.json b/packages/ast-spec/tsconfig.json index f1eefac4eb9..33414b7f1ec 100644 --- a/packages/ast-spec/tsconfig.json +++ b/packages/ast-spec/tsconfig.json @@ -1,10 +1,15 @@ { - "extends": "./tsconfig.build.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": false, - "rootDir": "." + "outDir": "../../dist/out-tsc/ast-spec" }, - "include": ["src", "typings", "tests", "tools", "**/fixtures/**/config.ts"], - "exclude": ["**/fixtures/**/fixture.ts", "**/fixtures/**/fixture.tsx"], - "references": [{ "path": "../typescript-estree/tsconfig.build.json" }] + "files": [], + "references": [ + { + "path": "./tsconfig.build.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] } diff --git a/packages/ast-spec/tsconfig.spec.json b/packages/ast-spec/tsconfig.spec.json new file mode 100644 index 00000000000..381385a9fe4 --- /dev/null +++ b/packages/ast-spec/tsconfig.spec.json @@ -0,0 +1,30 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc/ast-spec", + "types": ["jest", "node"], + "noImplicitAny": false + }, + "exclude": ["tests/fixtures"], + "include": [ + "tests", + "tools", + "**/*.test.ts", + "**/*.spec.ts", + "**/*.test.tsx", + "**/*.spec.tsx", + "**/*.test.js", + "**/*.spec.js", + "**/*.test.jsx", + "**/*.spec.jsx", + "**/*.d.ts" + ], + "references": [ + { + "path": "../typescript-estree/tsconfig.build.json" + }, + { + "path": "./tsconfig.build.json" + } + ] +} diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index 9293536a65a..411eef5c8e4 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -5,13 +5,12 @@ "main": "dist/index.js", "types": "index.d.ts", "scripts": { - "build": "tsc -b tsconfig.build.json", - "clean": "tsc -b tsconfig.build.json --clean", + "build": "npx tsc -b tsconfig.build.json", + "clean": "npx tsc -b tsconfig.build.json --clean", "postclean": "rimraf dist && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "lint": "npx nx lint", - "test": "jest --coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" + "test": "jest --coverage" }, "dependencies": { "@prettier/sync": "^0.5.1", diff --git a/packages/eslint-plugin-internal/tsconfig.build.json b/packages/eslint-plugin-internal/tsconfig.build.json index 744454d20b2..00baaa7c4d1 100644 --- a/packages/eslint-plugin-internal/tsconfig.build.json +++ b/packages/eslint-plugin-internal/tsconfig.build.json @@ -1,13 +1,25 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - // specifically disable declarations for the plugin + // specifically disable declarations for the plugin (which requires disabling composite) + "composite": false, "declaration": false, "declarationMap": false, - "outDir": "./dist", - "rootDir": "./src", + "emitDeclarationOnly": false, + "rootDir": "src", + "outDir": "dist", "resolveJsonModule": true }, "include": ["src", "typings"], - "references": [{ "path": "../utils/tsconfig.build.json" }] + "references": [ + { + "path": "../rule-tester/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" + }, + { + "path": "../type-utils/tsconfig.build.json" + } + ] } diff --git a/packages/eslint-plugin-internal/tsconfig.json b/packages/eslint-plugin-internal/tsconfig.json index 83713e5c8bf..03051233e62 100644 --- a/packages/eslint-plugin-internal/tsconfig.json +++ b/packages/eslint-plugin-internal/tsconfig.json @@ -1,10 +1,24 @@ { - "extends": "./tsconfig.build.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { + // specifically disable declarations for the plugin (which requires disabling composite) "composite": false, - "target": "ES2022", + "emitDeclarationOnly": false, + "noEmit": true, + "declaration": false, + "declarationMap": false, "rootDir": "." }, "include": ["src", "typings", "tests", "index.d.ts"], - "references": [{ "path": "../utils/tsconfig.build.json" }] + "references": [ + { + "path": "../rule-tester/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" + }, + { + "path": "../type-utils/tsconfig.build.json" + } + ] } diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 7fc93549150..41dfbe859d5 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -57,8 +57,7 @@ "generate:configs": "npx nx run repo-tools:generate-configs", "lint": "npx nx lint", "test": "cross-env NODE_OPTIONS=\"--experimental-vm-modules\" jest --coverage --logHeapUsage", - "test-single": "cross-env NODE_OPTIONS=\"--experimental-vm-modules\" jest --no-coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" + "test-single": "cross-env NODE_OPTIONS=\"--experimental-vm-modules\" jest --no-coverage" }, "dependencies": { "@eslint-community/regexpp": "^4.10.0", diff --git a/packages/eslint-plugin/src/rules/naming-convention-utils/enums.ts b/packages/eslint-plugin/src/rules/naming-convention-utils/enums.ts index c30029882e1..bbe7a3f0509 100644 --- a/packages/eslint-plugin/src/rules/naming-convention-utils/enums.ts +++ b/packages/eslint-plugin/src/rules/naming-convention-utils/enums.ts @@ -134,17 +134,19 @@ enum TypeModifiers { type TypeModifiersString = keyof typeof TypeModifiers; export { - IndividualAndMetaSelectorsString, MetaSelectors, - MetaSelectorsString, Modifiers, - ModifiersString, PredefinedFormats, - PredefinedFormatsString, Selectors, - SelectorsString, TypeModifiers, - TypeModifiersString, UnderscoreOptions, +}; +export type { + IndividualAndMetaSelectorsString, + MetaSelectorsString, + ModifiersString, + PredefinedFormatsString, + SelectorsString, + TypeModifiersString, UnderscoreOptionsString, }; diff --git a/packages/eslint-plugin/src/rules/naming-convention.ts b/packages/eslint-plugin/src/rules/naming-convention.ts index 635e1a625b8..5f111090176 100644 --- a/packages/eslint-plugin/src/rules/naming-convention.ts +++ b/packages/eslint-plugin/src/rules/naming-convention.ts @@ -784,4 +784,4 @@ function requiresQuoting( return _requiresQuoting(name, target); } -export { MessageIds, Options }; +export type { MessageIds, Options }; diff --git a/packages/eslint-plugin/src/util/explicitReturnTypeUtils.ts b/packages/eslint-plugin/src/util/explicitReturnTypeUtils.ts index 2604e6185cc..1b096564895 100644 --- a/packages/eslint-plugin/src/util/explicitReturnTypeUtils.ts +++ b/packages/eslint-plugin/src/util/explicitReturnTypeUtils.ts @@ -355,9 +355,8 @@ export { checkFunctionExpressionReturnType, checkFunctionReturnType, doesImmediatelyReturnFunctionExpression, - FunctionExpression, - FunctionNode, isTypedFunctionExpression, isValidFunctionExpressionReturnType, ancestorHasReturnType, }; +export type { FunctionExpression, FunctionNode }; diff --git a/packages/eslint-plugin/src/util/index.ts b/packages/eslint-plugin/src/util/index.ts index 1f8d657cd54..5c5bb34937c 100644 --- a/packages/eslint-plugin/src/util/index.ts +++ b/packages/eslint-plugin/src/util/index.ts @@ -37,7 +37,6 @@ export { isObjectNotArray, getParserServices, nullThrows, - InferMessageIdsTypeFromRule, - InferOptionsTypeFromRule, NullThrowsReasons, }; +export type { InferMessageIdsTypeFromRule, InferOptionsTypeFromRule }; diff --git a/packages/eslint-plugin/src/util/misc.ts b/packages/eslint-plugin/src/util/misc.ts index 9ba55c9d87f..b7af0336994 100644 --- a/packages/eslint-plugin/src/util/misc.ts +++ b/packages/eslint-plugin/src/util/misc.ts @@ -233,8 +233,6 @@ function isParenlessArrowFunction( export { arrayGroupByToMap, arraysAreEqual, - Equal, - ExcludeKeys, findFirstResult, formatWordList, getEnumNames, @@ -244,8 +242,8 @@ export { isRestParameterDeclaration, isParenlessArrowFunction, MemberNameType, - RequireKeys, typeNodeRequiresParentheses, upperCaseFirst, findLastIndex, }; +export type { Equal, ExcludeKeys, RequireKeys }; diff --git a/packages/eslint-plugin/tsconfig.build.json b/packages/eslint-plugin/tsconfig.build.json index 49f58646073..fb20bc4c774 100644 --- a/packages/eslint-plugin/tsconfig.build.json +++ b/packages/eslint-plugin/tsconfig.build.json @@ -1,19 +1,32 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - // specifically disable declarations for the plugin + // specifically disable declarations for the plugin (which requires disabling composite) // see reasoning in packages/eslint-plugin/rules.d.ts + "composite": false, "declaration": false, "declarationMap": false, - "outDir": "./dist", - "rootDir": "./src", + "emitDeclarationOnly": false, + "rootDir": "src", + "outDir": "dist", "resolveJsonModule": true }, "include": ["src", "typings"], "references": [ - { "path": "../utils/tsconfig.build.json" }, - { "path": "../parser/tsconfig.build.json" }, - { "path": "../scope-manager/tsconfig.build.json" }, - { "path": "../type-utils/tsconfig.build.json" } + { + "path": "../utils/tsconfig.build.json" + }, + { + "path": "../parser/tsconfig.build.json" + }, + { + "path": "../rule-tester/tsconfig.build.json" + }, + { + "path": "../scope-manager/tsconfig.build.json" + }, + { + "path": "../type-utils/tsconfig.build.json" + } ] } diff --git a/packages/eslint-plugin/tsconfig.json b/packages/eslint-plugin/tsconfig.json index ae5a5e0f988..e20ba57770a 100644 --- a/packages/eslint-plugin/tsconfig.json +++ b/packages/eslint-plugin/tsconfig.json @@ -1,14 +1,30 @@ { - "extends": "./tsconfig.build.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { + "outDir": "../../dist/out-tsc/eslint-plugin", + // specifically disable declarations for the plugin (which requires disabling composite) + // see reasoning in packages/eslint-plugin/rules.d.ts "composite": false, + "emitDeclarationOnly": false, + "noEmit": true, + "declaration": false, + "declarationMap": false, "rootDir": "." }, - "include": ["src", "typings", "tests", "tools", "index.d.ts", "rules.d.ts"], + "include": [ + "src", + "typings", + "tests", + "tools", + "index.d.ts", + "rules.d.ts", + "eslint-recommended-raw.d.ts" + ], "references": [ { "path": "../utils/tsconfig.build.json" }, { "path": "../parser/tsconfig.build.json" }, { "path": "../rule-schema-to-typescript-types/tsconfig.build.json" }, + { "path": "../rule-tester/tsconfig.build.json" }, { "path": "../scope-manager/tsconfig.build.json" }, { "path": "../type-utils/tsconfig.build.json" } ] diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index a61f6924df2..0479e1855d4 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -5,8 +5,7 @@ "scripts": { "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "lint": "npx nx lint", - "test": "jest --no-coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" + "test": "jest --no-coverage" }, "devDependencies": { "jest": "29.7.0", diff --git a/packages/integration-tests/tsconfig.build.json b/packages/integration-tests/tsconfig.build.json index e7d657f8c5b..d4eb4bb3b7f 100644 --- a/packages/integration-tests/tsconfig.build.json +++ b/packages/integration-tests/tsconfig.build.json @@ -1,13 +1,8 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - // specifically disable declarations for the plugin - "declaration": false, - "declarationMap": false, - "outDir": "./dist", - "rootDir": "./src", + "outDir": "dist", "resolveJsonModule": true }, - "include": ["src", "typings"], - "references": [] + "include": ["typings", "tools"] } diff --git a/packages/integration-tests/tsconfig.json b/packages/integration-tests/tsconfig.json index 23640f1c418..9d84e73d8ea 100644 --- a/packages/integration-tests/tsconfig.json +++ b/packages/integration-tests/tsconfig.json @@ -1,9 +1,15 @@ { - "extends": "./tsconfig.build.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": false, - "rootDir": "." + "outDir": "../../dist/out-tsc/integration-tests" }, - "include": ["src", "typings", "tests", "jest.config.js", "tools"], - "references": [] + "files": [], + "references": [ + { + "path": "./tsconfig.build.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] } diff --git a/packages/integration-tests/tsconfig.spec.json b/packages/integration-tests/tsconfig.spec.json new file mode 100644 index 00000000000..d01707fa567 --- /dev/null +++ b/packages/integration-tests/tsconfig.spec.json @@ -0,0 +1,24 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc/integration-tests", + "types": ["jest", "node"] + }, + "include": [ + "tests", + "**/*.test.ts", + "**/*.spec.ts", + "**/*.test.tsx", + "**/*.spec.tsx", + "**/*.test.js", + "**/*.spec.js", + "**/*.test.jsx", + "**/*.spec.jsx", + "**/*.d.ts" + ], + "references": [ + { + "path": "./tsconfig.build.json" + } + ] +} diff --git a/packages/parser/package.json b/packages/parser/package.json index d552dcc0e10..2e17d478868 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -45,8 +45,7 @@ "postclean": "rimraf dist && rimraf _ts4.3 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "lint": "npx nx lint", - "test": "jest --coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" + "test": "jest --coverage" }, "peerDependencies": { "eslint": "^8.56.0" diff --git a/packages/parser/src/index.ts b/packages/parser/src/index.ts index 9ccf6b17ed8..e7c20528b15 100644 --- a/packages/parser/src/index.ts +++ b/packages/parser/src/index.ts @@ -1,11 +1,14 @@ -export { parse, parseForESLint, ParserOptions } from './parser'; export { + clearCaches, + createProgram, +} from '@typescript-eslint/typescript-estree'; +export type { ParserServices, ParserServicesWithTypeInformation, ParserServicesWithoutTypeInformation, - clearCaches, - createProgram, } from '@typescript-eslint/typescript-estree'; +export { parse, parseForESLint } from './parser'; +export type { ParserOptions } from './parser'; // note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access diff --git a/packages/parser/src/parser.ts b/packages/parser/src/parser.ts index 6aa369134a0..58297dcfc03 100644 --- a/packages/parser/src/parser.ts +++ b/packages/parser/src/parser.ts @@ -3,8 +3,7 @@ import type { ScopeManager, } from '@typescript-eslint/scope-manager'; import { analyze } from '@typescript-eslint/scope-manager'; -import type { Lib, TSESTree } from '@typescript-eslint/types'; -import { ParserOptions } from '@typescript-eslint/types'; +import type { Lib, ParserOptions, TSESTree } from '@typescript-eslint/types'; import type { ParserServices, TSESTreeOptions, @@ -177,4 +176,5 @@ function parseForESLint( return { ast, services, scopeManager, visitorKeys }; } -export { parse, parseForESLint, ParserOptions }; +export { parse, parseForESLint }; +export type { ParserOptions }; diff --git a/packages/parser/tsconfig.build.json b/packages/parser/tsconfig.build.json index 4a72f7a3d46..ad5b1e53ea3 100644 --- a/packages/parser/tsconfig.build.json +++ b/packages/parser/tsconfig.build.json @@ -1,15 +1,21 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": true, - "outDir": "./dist", - "rootDir": "./src", + "rootDir": "src", + "outDir": "dist", + "emitDeclarationOnly": false, "resolveJsonModule": true }, "include": ["src"], "references": [ - { "path": "../scope-manager/tsconfig.build.json" }, - { "path": "../types/tsconfig.build.json" }, - { "path": "../typescript-estree/tsconfig.build.json" } + { + "path": "../scope-manager/tsconfig.build.json" + }, + { + "path": "../types/tsconfig.build.json" + }, + { + "path": "../typescript-estree/tsconfig.build.json" + } ] } diff --git a/packages/parser/tsconfig.json b/packages/parser/tsconfig.json index eebdf92705d..d0033ffc464 100644 --- a/packages/parser/tsconfig.json +++ b/packages/parser/tsconfig.json @@ -1,14 +1,15 @@ { - "extends": "./tsconfig.build.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": false, - "rootDir": "." + "outDir": "../../dist/out-tsc/parser" }, - "include": ["src", "tests", "tools"], - "exclude": ["tests/fixtures"], + "files": [], "references": [ - { "path": "../scope-manager/tsconfig.build.json" }, - { "path": "../types/tsconfig.build.json" }, - { "path": "../typescript-estree/tsconfig.build.json" } + { + "path": "./tsconfig.build.json" + }, + { + "path": "./tsconfig.spec.json" + } ] } diff --git a/packages/parser/tsconfig.spec.json b/packages/parser/tsconfig.spec.json new file mode 100644 index 00000000000..c1a3a0760c9 --- /dev/null +++ b/packages/parser/tsconfig.spec.json @@ -0,0 +1,25 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc/parser", + "types": ["jest", "node"] + }, + "exclude": ["tests/fixtures"], + "include": [ + "tests", + "**/*.test.ts", + "**/*.spec.ts", + "**/*.test.tsx", + "**/*.spec.tsx", + "**/*.test.js", + "**/*.spec.js", + "**/*.test.jsx", + "**/*.spec.jsx", + "**/*.d.ts" + ], + "references": [ + { + "path": "./tsconfig.build.json" + } + ] +} diff --git a/packages/repo-tools/package.json b/packages/repo-tools/package.json index 8e1ded99a68..d20008d9e87 100644 --- a/packages/repo-tools/package.json +++ b/packages/repo-tools/package.json @@ -12,8 +12,7 @@ "generate-lib": "npx tsx ./src/generate-lib.mts", "lint": "npx nx lint", "postinstall-script": "npx tsx ./src/postinstall.mts", - "test": "npx jest --coverage", - "typecheck": "npx tsc -p tsconfig.json --noEmit" + "test": "npx jest --coverage" }, "devDependencies": { "@nx/devkit": "*", diff --git a/packages/repo-tools/tsconfig.build.json b/packages/repo-tools/tsconfig.build.json index 992e2f19be7..93a02bb2301 100644 --- a/packages/repo-tools/tsconfig.build.json +++ b/packages/repo-tools/tsconfig.build.json @@ -3,12 +3,14 @@ "compilerOptions": { // repo tools are executed with tsx "allowImportingTsExtensions": true, - "noEmit": true, - "composite": true, - "outDir": "./dist", - "rootDir": "./src", + "rootDir": "src", + "outDir": "dist", "resolveJsonModule": true }, "include": ["src", "typings"], - "references": [] + "references": [ + { + "path": "../utils/tsconfig.build.json" + } + ] } diff --git a/packages/repo-tools/tsconfig.json b/packages/repo-tools/tsconfig.json index 60f0b96451e..3728177c0f9 100644 --- a/packages/repo-tools/tsconfig.json +++ b/packages/repo-tools/tsconfig.json @@ -1,12 +1,12 @@ { - "extends": "./tsconfig.build.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { - // repo tools are executed with tsx - "allowImportingTsExtensions": true, - "noEmit": true, - "composite": false, - "rootDir": "." + "outDir": "../../dist/out-tsc/repo-tools" }, - "include": ["src", "tests", "typings"], - "references": [] + "files": [], + "references": [ + { + "path": "./tsconfig.build.json" + } + ] } diff --git a/packages/rule-schema-to-typescript-types/package.json b/packages/rule-schema-to-typescript-types/package.json index 44821ab65c2..380f4b0537f 100644 --- a/packages/rule-schema-to-typescript-types/package.json +++ b/packages/rule-schema-to-typescript-types/package.json @@ -24,14 +24,13 @@ "homepage": "https://typescript-eslint.io", "license": "MIT", "scripts": { - "build": "tsc -b tsconfig.build.json", + "build": "npx tsc -b tsconfig.build.json", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "generate-contributors": "tsx ./src/generate-contributors.ts", "generate-sponsors": "tsx ./src/generate-sponsors.ts", "lint": "npx nx lint", "postinstall-script": "tsx ./src/postinstall.ts", - "test": "npx jest --coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" + "test": "npx jest --coverage" }, "dependencies": { "@typescript-eslint/type-utils": "7.8.0", diff --git a/packages/rule-schema-to-typescript-types/tsconfig.build.json b/packages/rule-schema-to-typescript-types/tsconfig.build.json index b9ac3e1b977..b08be0b3f05 100644 --- a/packages/rule-schema-to-typescript-types/tsconfig.build.json +++ b/packages/rule-schema-to-typescript-types/tsconfig.build.json @@ -1,11 +1,18 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": true, - "outDir": "./dist", - "rootDir": "./src", + "rootDir": "src", + "outDir": "dist", + "emitDeclarationOnly": false, "resolveJsonModule": true }, - "include": ["src", "typings"], - "references": [] + "include": ["src"], + "references": [ + { + "path": "../utils/tsconfig.build.json" + }, + { + "path": "../type-utils/tsconfig.build.json" + } + ] } diff --git a/packages/rule-schema-to-typescript-types/tsconfig.json b/packages/rule-schema-to-typescript-types/tsconfig.json index 06b94d057fa..f710c5a22da 100644 --- a/packages/rule-schema-to-typescript-types/tsconfig.json +++ b/packages/rule-schema-to-typescript-types/tsconfig.json @@ -1,9 +1,12 @@ { - "extends": "./tsconfig.build.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": false, - "rootDir": "." + "outDir": "../../dist/out-tsc/rule-schema-to-typescript-types" }, - "include": ["src", "tests", "typings"], - "references": [] + "files": [], + "references": [ + { + "path": "./tsconfig.build.json" + } + ] } diff --git a/packages/rule-tester/package.json b/packages/rule-tester/package.json index e929e8081e8..441ee87acee 100644 --- a/packages/rule-tester/package.json +++ b/packages/rule-tester/package.json @@ -43,8 +43,7 @@ "lint": "npx nx lint", "pretest-eslint-base": "tsc -b tsconfig.build.json", "test-eslint-base": "mocha --require source-map-support/register ./tests/eslint-base/eslint-base.test.js", - "test": "npx jest --coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" + "test": "npx jest --coverage" }, "//": "NOTE - AJV is out-of-date, but it's intentionally synced with ESLint - https://github.com/eslint/eslint/blob/ad9dd6a933fd098a0d99c6a9aa059850535c23ee/package.json#L70", "dependencies": { diff --git a/packages/rule-tester/tests/RuleTester.test.ts b/packages/rule-tester/tests/RuleTester.test.ts index 2cfc3678ad5..fa80b66c11d 100644 --- a/packages/rule-tester/tests/RuleTester.test.ts +++ b/packages/rule-tester/tests/RuleTester.test.ts @@ -74,8 +74,6 @@ const mockedAfterAll = jest.mocked(RuleTester.afterAll); const mockedDescribe = jest.mocked(RuleTester.describe); const mockedDescribeSkip = jest.mocked(RuleTester.describeSkip); const mockedIt = jest.mocked(RuleTester.it); -const _mockedItOnly = jest.mocked(RuleTester.itOnly); -const _mockedItSkip = jest.mocked(RuleTester.itSkip); const runRuleForItemSpy = jest.spyOn( RuleTester.prototype, // @ts-expect-error -- method is private @@ -92,7 +90,9 @@ const EMPTY_PROGRAM: TSESTree.Program = { tokens: [], range: [0, 0], }; -runRuleForItemSpy.mockImplementation((_1, _2, testCase) => { +// TODO: Fix need for any +// eslint-disable-next-line @typescript-eslint/no-explicit-any +runRuleForItemSpy.mockImplementation((_1, _2, testCase: any) => { return { messages: 'errors' in testCase @@ -134,7 +134,9 @@ const NOOP_RULE: RuleModule<'error'> = { }; function getTestConfigFromCall(): unknown[] { - return runRuleForItemSpy.mock.calls.map(c => { + // TODO: Fix need for any + // eslint-disable-next-line @typescript-eslint/no-explicit-any + return runRuleForItemSpy.mock.calls.map((c: any) => { return { ...c[2], filename: c[2].filename?.replaceAll('\\', '/') }; }); } @@ -283,7 +285,7 @@ describe('RuleTester', () => { it('schedules the parser caches to be cleared afterAll', () => { // it should schedule the afterAll expect(mockedAfterAll).toHaveBeenCalledTimes(0); - const _ruleTester = new RuleTester({ + new RuleTester({ parser: '@typescript-eslint/parser', parserOptions: { project: 'tsconfig.json', diff --git a/packages/rule-tester/tsconfig.build.json b/packages/rule-tester/tsconfig.build.json index 782f14402ae..1bd809981c7 100644 --- a/packages/rule-tester/tsconfig.build.json +++ b/packages/rule-tester/tsconfig.build.json @@ -1,11 +1,15 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": true, - "outDir": "./dist", - "rootDir": "./src", + "rootDir": "src", + "outDir": "dist", + "emitDeclarationOnly": false, "resolveJsonModule": true }, "include": ["src", "typings"], - "references": [{ "path": "../utils/tsconfig.build.json" }] + "references": [ + { + "path": "../utils/tsconfig.build.json" + } + ] } diff --git a/packages/rule-tester/tsconfig.json b/packages/rule-tester/tsconfig.json index 9cea515ba6b..bf87f1a8864 100644 --- a/packages/rule-tester/tsconfig.json +++ b/packages/rule-tester/tsconfig.json @@ -1,8 +1,15 @@ { - "extends": "./tsconfig.build.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": false, - "rootDir": "." + "outDir": "../../dist/out-tsc/rule-tester" }, - "include": ["src", "typings", "tests", "tools"] + "files": [], + "references": [ + { + "path": "./tsconfig.build.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] } diff --git a/packages/rule-tester/tsconfig.spec.json b/packages/rule-tester/tsconfig.spec.json new file mode 100644 index 00000000000..caa179f827c --- /dev/null +++ b/packages/rule-tester/tsconfig.spec.json @@ -0,0 +1,25 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc/rule-tester", + "types": ["jest", "node"] + }, + "exclude": ["tests/fixtures"], + "include": [ + "tests", + "**/*.test.ts", + "**/*.spec.ts", + "**/*.test.tsx", + "**/*.spec.tsx", + "**/*.test.js", + "**/*.spec.js", + "**/*.test.jsx", + "**/*.spec.jsx", + "**/*.d.ts" + ], + "references": [ + { + "path": "./tsconfig.build.json" + } + ] +} diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index 1ea6d9c32c6..50aadb2b1ee 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -42,8 +42,7 @@ "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "generate-lib": "npx nx generate-lib", "lint": "npx nx lint", - "test": "npx nx test --code-coverage", - "typecheck": "npx nx typecheck" + "test": "npx nx test --code-coverage" }, "dependencies": { "@typescript-eslint/types": "7.8.0", diff --git a/packages/scope-manager/project.json b/packages/scope-manager/project.json index 690b6f2ca7f..fa0969f7919 100644 --- a/packages/scope-manager/project.json +++ b/packages/scope-manager/project.json @@ -18,17 +18,6 @@ ] } }, - "typecheck": { - "executor": "nx:run-commands", - "options": { - "parallel": true, - "cwd": "packages/scope-manager", - "commands": [ - "tsc -p tsconfig.build.json --noEmit", - "tsc -p tsconfig.spec.json --noEmit" - ] - } - }, "clean": { "executor": "nx:run-commands", "options": { diff --git a/packages/scope-manager/src/analyze.ts b/packages/scope-manager/src/analyze.ts index 307adfe0905..cd1ce6fdee6 100644 --- a/packages/scope-manager/src/analyze.ts +++ b/packages/scope-manager/src/analyze.ts @@ -110,4 +110,5 @@ function analyze( return scopeManager; } -export { analyze, AnalyzeOptions }; +export { analyze }; +export type { AnalyzeOptions }; diff --git a/packages/scope-manager/src/definition/Definition.ts b/packages/scope-manager/src/definition/Definition.ts index 35b380ee662..7d614862dca 100644 --- a/packages/scope-manager/src/definition/Definition.ts +++ b/packages/scope-manager/src/definition/Definition.ts @@ -23,4 +23,4 @@ type Definition = | TypeDefinition | VariableDefinition; -export { Definition }; +export type { Definition }; diff --git a/packages/scope-manager/src/index.ts b/packages/scope-manager/src/index.ts index 8dc52ac4ac8..3ebc1e03573 100644 --- a/packages/scope-manager/src/index.ts +++ b/packages/scope-manager/src/index.ts @@ -1,9 +1,10 @@ -export { analyze, AnalyzeOptions } from './analyze'; +export { analyze } from './analyze'; +export type { AnalyzeOptions } from './analyze'; export * from './definition'; export { Reference } from './referencer/Reference'; export { Visitor } from './referencer/Visitor'; -export { - PatternVisitor, +export { PatternVisitor } from './referencer/PatternVisitor'; +export type { PatternVisitorCallback, PatternVisitorOptions, } from './referencer/PatternVisitor'; diff --git a/packages/scope-manager/src/referencer/ClassVisitor.ts b/packages/scope-manager/src/referencer/ClassVisitor.ts index 94cb7ab5981..d388199317e 100644 --- a/packages/scope-manager/src/referencer/ClassVisitor.ts +++ b/packages/scope-manager/src/referencer/ClassVisitor.ts @@ -27,7 +27,7 @@ class ClassVisitor extends Visitor { classVisitor.visitClass(node); } - visit(node: TSESTree.Node | null | undefined): void { + override visit(node: TSESTree.Node | null | undefined): void { // make sure we only handle the nodes we are designed to handle if (node && node.type in this) { super.visit(node); diff --git a/packages/scope-manager/src/referencer/PatternVisitor.ts b/packages/scope-manager/src/referencer/PatternVisitor.ts index 51564882ef8..66ad69d7038 100644 --- a/packages/scope-manager/src/referencer/PatternVisitor.ts +++ b/packages/scope-manager/src/referencer/PatternVisitor.ts @@ -138,4 +138,5 @@ class PatternVisitor extends VisitorBase { } } -export { PatternVisitor, PatternVisitorCallback, PatternVisitorOptions }; +export { PatternVisitor }; +export type { PatternVisitorCallback, PatternVisitorOptions }; diff --git a/packages/scope-manager/src/referencer/Reference.ts b/packages/scope-manager/src/referencer/Reference.ts index d74b628d8cc..2c0183bd323 100644 --- a/packages/scope-manager/src/referencer/Reference.ts +++ b/packages/scope-manager/src/referencer/Reference.ts @@ -146,4 +146,5 @@ class Reference { } } -export { Reference, ReferenceFlag, ReferenceTypeFlag, ReferenceImplicitGlobal }; +export { Reference, ReferenceFlag, ReferenceTypeFlag }; +export type { ReferenceImplicitGlobal }; diff --git a/packages/scope-manager/src/referencer/Referencer.ts b/packages/scope-manager/src/referencer/Referencer.ts index dac19c71a2c..b6f07f7c13c 100644 --- a/packages/scope-manager/src/referencer/Referencer.ts +++ b/packages/scope-manager/src/referencer/Referencer.ts @@ -326,6 +326,7 @@ class Referencer extends Visitor { let left = node.left; switch (left.type) { case AST_NODE_TYPES.TSAsExpression: + // eslint-disable-next-line no-fallthrough -- This is intentional for identical node handling case AST_NODE_TYPES.TSTypeAssertion: // explicitly visit the type annotation this.visitType(left.typeAnnotation); @@ -815,4 +816,5 @@ class Referencer extends Visitor { } } -export { Referencer, ReferencerOptions }; +export { Referencer }; +export type { ReferencerOptions }; diff --git a/packages/scope-manager/src/referencer/Visitor.ts b/packages/scope-manager/src/referencer/Visitor.ts index bbcf348734d..9f2f807c858 100644 --- a/packages/scope-manager/src/referencer/Visitor.ts +++ b/packages/scope-manager/src/referencer/Visitor.ts @@ -5,7 +5,8 @@ import type { PatternVisitorOptions, } from './PatternVisitor'; import { PatternVisitor } from './PatternVisitor'; -import { VisitorBase, VisitorOptions } from './VisitorBase'; +import type { VisitorOptions } from './VisitorBase'; +import { VisitorBase } from './VisitorBase'; interface VisitPatternOptions extends PatternVisitorOptions { processRightHandNodes?: boolean; @@ -42,4 +43,5 @@ class Visitor extends VisitorBase { } } -export { Visitor, VisitorBase, VisitorOptions }; +export { Visitor, VisitorBase }; +export type { VisitorOptions }; diff --git a/packages/scope-manager/src/referencer/VisitorBase.ts b/packages/scope-manager/src/referencer/VisitorBase.ts index 43af065b4c6..fe1324420b4 100644 --- a/packages/scope-manager/src/referencer/VisitorBase.ts +++ b/packages/scope-manager/src/referencer/VisitorBase.ts @@ -1,5 +1,6 @@ import type { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/types'; -import { VisitorKeys, visitorKeys } from '@typescript-eslint/visitor-keys'; +import type { VisitorKeys } from '@typescript-eslint/visitor-keys'; +import { visitorKeys } from '@typescript-eslint/visitor-keys'; interface VisitorOptions { childVisitorKeys?: VisitorKeys | null; @@ -83,4 +84,5 @@ abstract class VisitorBase { } } -export { VisitorBase, VisitorOptions, VisitorKeys }; +export { VisitorBase }; +export type { VisitorOptions, VisitorKeys }; diff --git a/packages/scope-manager/src/referencer/index.ts b/packages/scope-manager/src/referencer/index.ts index 6ac29bd3e0e..7c43a0aac89 100644 --- a/packages/scope-manager/src/referencer/index.ts +++ b/packages/scope-manager/src/referencer/index.ts @@ -1 +1,2 @@ -export { Referencer, ReferencerOptions } from './Referencer'; +export { Referencer } from './Referencer'; +export type { ReferencerOptions } from './Referencer'; diff --git a/packages/scope-manager/src/scope/FunctionExpressionNameScope.ts b/packages/scope-manager/src/scope/FunctionExpressionNameScope.ts index d3c8825a306..0779bb3a3f1 100644 --- a/packages/scope-manager/src/scope/FunctionExpressionNameScope.ts +++ b/packages/scope-manager/src/scope/FunctionExpressionNameScope.ts @@ -11,7 +11,7 @@ class FunctionExpressionNameScope extends ScopeBase< TSESTree.FunctionExpression, Scope > { - public readonly functionExpressionScope: true; + public override readonly functionExpressionScope: true; constructor( scopeManager: ScopeManager, upperScope: FunctionExpressionNameScope['upper'], diff --git a/packages/scope-manager/src/scope/FunctionScope.ts b/packages/scope-manager/src/scope/FunctionScope.ts index 8e8b405cd6a..2d370d21e14 100644 --- a/packages/scope-manager/src/scope/FunctionScope.ts +++ b/packages/scope-manager/src/scope/FunctionScope.ts @@ -45,7 +45,10 @@ class FunctionScope extends ScopeBase< // const x = 2 // console.log(a) // } - protected isValidResolution(ref: Reference, variable: Variable): boolean { + protected override isValidResolution( + ref: Reference, + variable: Variable, + ): boolean { // If `options.globalReturn` is true, `this.block` becomes a Program node. if (this.block.type === AST_NODE_TYPES.Program) { return true; diff --git a/packages/scope-manager/src/scope/GlobalScope.ts b/packages/scope-manager/src/scope/GlobalScope.ts index 6bf32a12f53..8942fabbad1 100644 --- a/packages/scope-manager/src/scope/GlobalScope.ts +++ b/packages/scope-manager/src/scope/GlobalScope.ts @@ -52,7 +52,7 @@ class GlobalScope extends ScopeBase< ); } - public close(scopeManager: ScopeManager): Scope | null { + public override close(scopeManager: ScopeManager): Scope | null { assert(this.leftToResolve); for (const ref of this.leftToResolve) { diff --git a/packages/scope-manager/src/scope/Scope.ts b/packages/scope-manager/src/scope/Scope.ts index 87999d4b74b..0f5090f1919 100644 --- a/packages/scope-manager/src/scope/Scope.ts +++ b/packages/scope-manager/src/scope/Scope.ts @@ -37,4 +37,4 @@ type Scope = | TypeScope | WithScope; -export { Scope }; +export type { Scope }; diff --git a/packages/scope-manager/src/scope/WithScope.ts b/packages/scope-manager/src/scope/WithScope.ts index 7058ab70faa..07e348959be 100644 --- a/packages/scope-manager/src/scope/WithScope.ts +++ b/packages/scope-manager/src/scope/WithScope.ts @@ -18,7 +18,7 @@ class WithScope extends ScopeBase< ) { super(scopeManager, ScopeType.with, upperScope, block, false); } - close(scopeManager: ScopeManager): Scope | null { + override close(scopeManager: ScopeManager): Scope | null { if (this.shouldStaticallyClose()) { return super.close(scopeManager); } diff --git a/packages/scope-manager/src/variable/ImplicitLibVariable.ts b/packages/scope-manager/src/variable/ImplicitLibVariable.ts index 2ebb8fef0ee..a7823fe7e2a 100644 --- a/packages/scope-manager/src/variable/ImplicitLibVariable.ts +++ b/packages/scope-manager/src/variable/ImplicitLibVariable.ts @@ -42,4 +42,5 @@ class ImplicitLibVariable extends ESLintScopeVariable implements Variable { } } -export { ImplicitLibVariable, ImplicitLibVariableOptions }; +export { ImplicitLibVariable }; +export type { ImplicitLibVariableOptions }; diff --git a/packages/scope-manager/src/variable/index.ts b/packages/scope-manager/src/variable/index.ts index 912aebcf05c..ede1872accf 100644 --- a/packages/scope-manager/src/variable/index.ts +++ b/packages/scope-manager/src/variable/index.ts @@ -1,6 +1,4 @@ export { ESLintScopeVariable } from './ESLintScopeVariable'; -export { - ImplicitLibVariable, - ImplicitLibVariableOptions, -} from './ImplicitLibVariable'; +export { ImplicitLibVariable } from './ImplicitLibVariable'; +export type { ImplicitLibVariableOptions } from './ImplicitLibVariable'; export { Variable } from './Variable'; diff --git a/packages/scope-manager/tests/eslint-scope/es6-destructuring-assignments.test.ts b/packages/scope-manager/tests/eslint-scope/es6-destructuring-assignments.test.ts index 225c240a0c0..618f95537ad 100644 --- a/packages/scope-manager/tests/eslint-scope/es6-destructuring-assignments.test.ts +++ b/packages/scope-manager/tests/eslint-scope/es6-destructuring-assignments.test.ts @@ -157,8 +157,12 @@ describe('ES6 destructuring assignments', () => { expect(scope.references).toHaveLength(0); expect(scope['implicit'].leftToBeResolved).toHaveLength(2); expect(scope['implicit'].leftToBeResolved[0].identifier.name).toBe('d'); + // TODO: Investigate lint error + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument expectToBeForScope(scope['implicit'].leftToBeResolved[0].from); expect(scope['implicit'].leftToBeResolved[1].identifier.name).toBe('array'); + // TODO: Investigate lint error + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument expectToBeForScope(scope['implicit'].leftToBeResolved[1].from); scope = scopeManager.scopes[2]; @@ -280,10 +284,16 @@ describe('ES6 destructuring assignments', () => { expect(scope.references).toHaveLength(0); expect(scope['implicit'].leftToBeResolved).toHaveLength(3); expect(scope['implicit'].leftToBeResolved[0].identifier.name).toBe('d'); + // TODO: Investigate lint error + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument expectToBeForScope(scope['implicit'].leftToBeResolved[0].from); expect(scope['implicit'].leftToBeResolved[1].identifier.name).toBe('e'); + // TODO: Investigate lint error + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument expectToBeForScope(scope['implicit'].leftToBeResolved[1].from); expect(scope['implicit'].leftToBeResolved[2].identifier.name).toBe('array'); + // TODO: Investigate lint error + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument expectToBeForScope(scope['implicit'].leftToBeResolved[2].from); scope = scopeManager.scopes[2]; diff --git a/packages/scope-manager/tests/test-utils/parse.ts b/packages/scope-manager/tests/test-utils/parse.ts index 1ba739d66ed..50a75a98d10 100644 --- a/packages/scope-manager/tests/test-utils/parse.ts +++ b/packages/scope-manager/tests/test-utils/parse.ts @@ -1,6 +1,7 @@ import * as tseslint from '@typescript-eslint/typescript-estree'; -import { analyze, AnalyzeOptions } from '../../src/analyze'; +import type { AnalyzeOptions } from '../../src/analyze'; +import { analyze } from '../../src/analyze'; type SourceType = AnalyzeOptions['sourceType']; @@ -59,4 +60,5 @@ function parseAndAnalyze( return { ast, scopeManager }; } -export { parse, parseAndAnalyze, AnalyzeOptions }; +export { parse, parseAndAnalyze }; +export type { AnalyzeOptions }; diff --git a/packages/scope-manager/tests/test-utils/serializers/baseSerializer.ts b/packages/scope-manager/tests/test-utils/serializers/baseSerializer.ts index cb619d683a5..ec13bb792d5 100644 --- a/packages/scope-manager/tests/test-utils/serializers/baseSerializer.ts +++ b/packages/scope-manager/tests/test-utils/serializers/baseSerializer.ts @@ -50,7 +50,7 @@ function createSerializer( SEEN_THINGS.add(thing); } - const outputLines = []; + const outputLines: string[] = []; const childIndentation = indentation + config.indent; for (const key of keys) { let value = thing[key as string]; diff --git a/packages/scope-manager/tsconfig.build.json b/packages/scope-manager/tsconfig.build.json index b407e24d704..17e4796b1ac 100644 --- a/packages/scope-manager/tsconfig.build.json +++ b/packages/scope-manager/tsconfig.build.json @@ -1,17 +1,18 @@ { - "extends": "./tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": true, - "outDir": "./dist", - "rootDir": "./src", - "resolveJsonModule": true, - "declaration": true, - "types": ["node", "jest"] + "rootDir": "src", + "outDir": "dist", + "emitDeclarationOnly": false, + "resolveJsonModule": true }, - "include": ["src", "typings"], - "exclude": ["**/*.spec.ts", "**/*.test.ts"], + "include": ["src"], "references": [ - { "path": "../types/tsconfig.build.json" }, - { "path": "../visitor-keys/tsconfig.build.json" } + { + "path": "../types/tsconfig.build.json" + }, + { + "path": "../visitor-keys/tsconfig.build.json" + } ] } diff --git a/packages/scope-manager/tsconfig.json b/packages/scope-manager/tsconfig.json index c25e84fa6c6..4dbdbb72885 100644 --- a/packages/scope-manager/tsconfig.json +++ b/packages/scope-manager/tsconfig.json @@ -1,7 +1,10 @@ { "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc/scope-manager", + "noImplicitAny": false + }, "files": [], - "include": [], "references": [ { "path": "./tsconfig.build.json" @@ -9,11 +12,5 @@ { "path": "./tsconfig.spec.json" } - ], - "compilerOptions": { - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": false - } + ] } diff --git a/packages/scope-manager/tsconfig.spec.json b/packages/scope-manager/tsconfig.spec.json index 46896b9eaf3..1fa9aff5b63 100644 --- a/packages/scope-manager/tsconfig.spec.json +++ b/packages/scope-manager/tsconfig.spec.json @@ -1,9 +1,9 @@ { - "extends": "./tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", - "module": "Node16", - "types": ["jest", "node"] + "outDir": "../../dist/out-tsc/scope-manager", + "types": ["jest", "node"], + "noImplicitAny": false }, "exclude": ["tests/fixtures"], "include": [ @@ -18,5 +18,10 @@ "**/*.test.jsx", "**/*.spec.jsx", "**/*.d.ts" + ], + "references": [ + { + "path": "./tsconfig.build.json" + } ] } diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index d5f71f74fba..a9833bfe7d6 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -42,8 +42,7 @@ "postclean": "rimraf dist && rimraf _ts3.4 && rimraf _ts4.3 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "lint": "npx nx lint", - "test": "jest --coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" + "test": "jest --coverage" }, "dependencies": { "@typescript-eslint/typescript-estree": "7.8.0", diff --git a/packages/type-utils/tsconfig.build.json b/packages/type-utils/tsconfig.build.json index 782f14402ae..1bd809981c7 100644 --- a/packages/type-utils/tsconfig.build.json +++ b/packages/type-utils/tsconfig.build.json @@ -1,11 +1,15 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": true, - "outDir": "./dist", - "rootDir": "./src", + "rootDir": "src", + "outDir": "dist", + "emitDeclarationOnly": false, "resolveJsonModule": true }, "include": ["src", "typings"], - "references": [{ "path": "../utils/tsconfig.build.json" }] + "references": [ + { + "path": "../utils/tsconfig.build.json" + } + ] } diff --git a/packages/type-utils/tsconfig.json b/packages/type-utils/tsconfig.json index 93bec73e74a..157261a8f90 100644 --- a/packages/type-utils/tsconfig.json +++ b/packages/type-utils/tsconfig.json @@ -1,9 +1,15 @@ { - "extends": "./tsconfig.build.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": false, - "rootDir": "." + "outDir": "../../dist/out-tsc/type-utils" }, - "include": ["src", "typings", "tests", "tools"], - "references": [{ "path": "../utils/tsconfig.build.json" }] + "files": [], + "references": [ + { + "path": "./tsconfig.build.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] } diff --git a/packages/type-utils/tsconfig.spec.json b/packages/type-utils/tsconfig.spec.json new file mode 100644 index 00000000000..4b25ac115d7 --- /dev/null +++ b/packages/type-utils/tsconfig.spec.json @@ -0,0 +1,25 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc/type-utils", + "types": ["jest", "node"] + }, + "exclude": ["tests/fixtures"], + "include": [ + "tests", + "**/*.test.ts", + "**/*.spec.ts", + "**/*.test.tsx", + "**/*.spec.tsx", + "**/*.test.js", + "**/*.spec.js", + "**/*.test.jsx", + "**/*.spec.jsx", + "**/*.d.ts" + ], + "references": [ + { + "path": "./tsconfig.build.json" + } + ] +} diff --git a/packages/types/package.json b/packages/types/package.json index d1e87a4ad6f..328c8e5e930 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -44,8 +44,7 @@ "postclean": "rimraf dist && rimraf src/generated && rimraf _ts3.4 && rimraf _ts4.3 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "generate-lib": "npx nx run scope-manager:generate-lib", - "lint": "npx nx lint", - "typecheck": "tsc -p tsconfig.json --noEmit" + "lint": "npx nx lint" }, "nx": { "targets": { diff --git a/packages/types/src/lib.ts b/packages/types/src/lib.ts index a63601f2165..f9bc56ded9a 100644 --- a/packages/types/src/lib.ts +++ b/packages/types/src/lib.ts @@ -98,4 +98,4 @@ type Lib = | 'esnext.full' | 'lib'; -export { Lib }; +export type { Lib }; diff --git a/packages/types/src/parser-options.ts b/packages/types/src/parser-options.ts index e9600df308e..eb681d2a066 100644 --- a/packages/types/src/parser-options.ts +++ b/packages/types/src/parser-options.ts @@ -83,7 +83,7 @@ interface ParserOptions { [additionalProperties: string]: unknown; } -export { +export type { CacheDurationSeconds, DebugLevel, EcmaVersion, diff --git a/packages/types/tsconfig.build.json b/packages/types/tsconfig.build.json index b9ac3e1b977..174d132ccb0 100644 --- a/packages/types/tsconfig.build.json +++ b/packages/types/tsconfig.build.json @@ -1,11 +1,11 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": true, - "outDir": "./dist", - "rootDir": "./src", + "rootDir": "src", + "outDir": "dist", + "emitDeclarationOnly": false, "resolveJsonModule": true }, - "include": ["src", "typings"], + "include": ["src"], "references": [] } diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json index d1305674c8b..0dfad4e320d 100644 --- a/packages/types/tsconfig.json +++ b/packages/types/tsconfig.json @@ -1,9 +1,12 @@ { - "extends": "./tsconfig.build.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": false, - "rootDir": "." + "outDir": "../../dist/out-tsc/types" }, - "include": ["src", "typings", "tests", "tools"], - "references": [] + "include": ["src", "tools"], + "references": [ + { + "path": "./tsconfig.build.json" + } + ] } diff --git a/packages/typescript-eslint/package.json b/packages/typescript-eslint/package.json index 4402f7e4820..098073bd2d5 100644 --- a/packages/typescript-eslint/package.json +++ b/packages/typescript-eslint/package.json @@ -48,8 +48,7 @@ "postclean": "rimraf dist && rimraf _ts4.3 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "lint": "nx lint", - "test": "jest --coverage --passWithNoTests", - "typecheck": "tsc -p tsconfig.json --noEmit" + "test": "jest --coverage --passWithNoTests" }, "peerDependencies": { "eslint": "^8.56.0" diff --git a/packages/typescript-eslint/tsconfig.build.json b/packages/typescript-eslint/tsconfig.build.json index 8833d225ce3..5d16be4a517 100644 --- a/packages/typescript-eslint/tsconfig.build.json +++ b/packages/typescript-eslint/tsconfig.build.json @@ -1,11 +1,15 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": true, - "outDir": "./dist", - "rootDir": "./src", + "rootDir": "src", + "outDir": "dist", + "emitDeclarationOnly": false, "resolveJsonModule": true }, "include": ["src"], - "references": [{ "path": "../parser/tsconfig.build.json" }] + "references": [ + { + "path": "../parser/tsconfig.build.json" + } + ] } diff --git a/packages/typescript-eslint/tsconfig.json b/packages/typescript-eslint/tsconfig.json index ac9e78203f6..fd982999941 100644 --- a/packages/typescript-eslint/tsconfig.json +++ b/packages/typescript-eslint/tsconfig.json @@ -1,10 +1,15 @@ { - "extends": "./tsconfig.build.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": false, - "rootDir": "." + "outDir": "../../dist/out-tsc/typescript-eslint" }, - "include": ["src", "tests", "tools"], - "exclude": ["tests/fixtures"], - "references": [{ "path": "../parser/tsconfig.build.json" }] + "files": [], + "references": [ + { + "path": "./tsconfig.build.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] } diff --git a/packages/typescript-eslint/tsconfig.spec.json b/packages/typescript-eslint/tsconfig.spec.json new file mode 100644 index 00000000000..397791270e1 --- /dev/null +++ b/packages/typescript-eslint/tsconfig.spec.json @@ -0,0 +1,27 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc/typescript-eslint", + "types": ["jest", "node"], + "noImplicitAny": false + }, + "exclude": ["tests/fixtures"], + "include": [ + "tests", + "tools", + "**/*.test.ts", + "**/*.spec.ts", + "**/*.test.tsx", + "**/*.spec.tsx", + "**/*.test.js", + "**/*.spec.js", + "**/*.test.jsx", + "**/*.spec.jsx", + "**/*.d.ts" + ], + "references": [ + { + "path": "./tsconfig.build.json" + } + ] +} diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 6c9ed74ba13..0eb2be58f70 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -50,8 +50,7 @@ "postclean": "rimraf dist && rimraf _ts4.3 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "lint": "npx nx lint", - "test": "jest --coverage --runInBand --verbose", - "typecheck": "tsc -p tsconfig.json --noEmit" + "test": "jest --coverage --runInBand --verbose" }, "dependencies": { "@typescript-eslint/types": "7.8.0", diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 9d068cbf243..1035f0be70a 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -601,8 +601,9 @@ export class Converter { // this is intentional we can ignore conversion if `:` is in first character if (colonIndex > 0) { const range = getRange(node, this.ast); - // @ts-expect-error -- TypeScript@<5.1 doesn't have ts.JsxNamespacedName - const result = this.createNode(node, { + // TODO: Fix as any usage + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + const result = this.createNode(node as any, { type: AST_NODE_TYPES.JSXNamespacedName, namespace: this.createNode(node, { type: AST_NODE_TYPES.JSXIdentifier, @@ -1283,6 +1284,7 @@ export class Converter { } case SyntaxKind.GetAccessor: + // eslint-disable-next-line no-fallthrough -- This is intentional for identical node handling case SyntaxKind.SetAccessor: { if ( node.parent.kind === SyntaxKind.InterfaceDeclaration || @@ -1756,7 +1758,7 @@ export class Converter { } // Classes - + // eslint-disable-next-line no-fallthrough -- This is intentional for identical node handling case SyntaxKind.ClassDeclaration: if ( !node.name && @@ -2652,7 +2654,8 @@ export class Converter { getTextForTokenKind(node.readonlyToken.kind)), typeAnnotation: node.type && this.convertChild(node.type), typeParameter: this.convertChild(node.typeParameter), - }); + // TODO: Fix type error + } as TSESTree.TSMappedType); } case SyntaxKind.ParenthesizedExpression: @@ -2726,7 +2729,7 @@ export class Converter { ), }); } - + // eslint-disable-next-line no-fallthrough -- This is intentional for identical node handling case SyntaxKind.FunctionType: { // eslint-disable-next-line deprecation/deprecation const { modifiers } = node; @@ -2902,7 +2905,8 @@ export class Converter { declare: hasModifier(SyntaxKind.DeclareKeyword, node), id: this.convertChild(node.name), members: node.members.map(el => this.convertChild(el)), - }); + // TODO: Fix type error + } as TSESTree.TSEnumDeclaration); return this.fixExports(node, result); } diff --git a/packages/typescript-estree/src/create-program/WatchCompilerHostOfConfigFile.ts b/packages/typescript-estree/src/create-program/WatchCompilerHostOfConfigFile.ts index 04799b89580..21d0c24516f 100644 --- a/packages/typescript-estree/src/create-program/WatchCompilerHostOfConfigFile.ts +++ b/packages/typescript-estree/src/create-program/WatchCompilerHostOfConfigFile.ts @@ -35,4 +35,4 @@ interface WatchCompilerHostOfConfigFile extraFileExtensions?: readonly ts.FileExtensionInfo[]; } -export { WatchCompilerHostOfConfigFile }; +export type { WatchCompilerHostOfConfigFile }; diff --git a/packages/typescript-estree/src/create-program/shared.ts b/packages/typescript-estree/src/create-program/shared.ts index 84784797051..647d4c3b848 100644 --- a/packages/typescript-estree/src/create-program/shared.ts +++ b/packages/typescript-estree/src/create-program/shared.ts @@ -127,15 +127,17 @@ function createHash(content: string): string { } export { - ASTAndDefiniteProgram, - ASTAndNoProgram, - ASTAndProgram, CORE_COMPILER_OPTIONS, canonicalDirname, - CanonicalPath, createDefaultCompilerOptionsFromExtra, createHash, ensureAbsolutePath, getCanonicalFileName, getAstFromProgram, }; +export type { + ASTAndDefiniteProgram, + ASTAndNoProgram, + ASTAndProgram, + CanonicalPath, +}; diff --git a/packages/typescript-estree/src/index.ts b/packages/typescript-estree/src/index.ts index c86262b7cd9..d52c0828930 100644 --- a/packages/typescript-estree/src/index.ts +++ b/packages/typescript-estree/src/index.ts @@ -1,10 +1,6 @@ -export { - AST, - parse, - parseAndGenerateServices, - ParseAndGenerateServicesResult, -} from './parser'; -export { +export { parse, parseAndGenerateServices } from './parser'; +export type { AST, ParseAndGenerateServicesResult } from './parser'; +export type { ParserServices, ParserServicesWithTypeInformation, ParserServicesWithoutTypeInformation, diff --git a/packages/typescript-estree/src/parser.ts b/packages/typescript-estree/src/parser.ts index b4931a6da36..7079b267c08 100644 --- a/packages/typescript-estree/src/parser.ts +++ b/packages/typescript-estree/src/parser.ts @@ -288,11 +288,10 @@ function parseAndGenerateServices( } export { - AST, parse, parseAndGenerateServices, - ParseAndGenerateServicesResult, clearDefaultProjectMatchedFiles, clearProgramCache, clearParseAndGenerateServicesCalls, }; +export type { AST, ParseAndGenerateServicesResult }; diff --git a/packages/typescript-estree/tsconfig.build.json b/packages/typescript-estree/tsconfig.build.json index 191f1df748a..80b5ebd83ab 100644 --- a/packages/typescript-estree/tsconfig.build.json +++ b/packages/typescript-estree/tsconfig.build.json @@ -1,15 +1,18 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": true, - "outDir": "./dist", - "rootDir": "./src", - "resolveJsonModule": true, - "removeComments": false + "rootDir": "src", + "outDir": "dist", + "emitDeclarationOnly": false, + "resolveJsonModule": true }, "include": ["src", "typings"], "references": [ - { "path": "../types/tsconfig.build.json" }, - { "path": "../visitor-keys/tsconfig.build.json" } + { + "path": "../types/tsconfig.build.json" + }, + { + "path": "../visitor-keys/tsconfig.build.json" + } ] } diff --git a/packages/typescript-estree/tsconfig.json b/packages/typescript-estree/tsconfig.json index bc1141dd051..7c3bdfe6e18 100644 --- a/packages/typescript-estree/tsconfig.json +++ b/packages/typescript-estree/tsconfig.json @@ -1,13 +1,15 @@ { - "extends": "./tsconfig.build.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": false, - "rootDir": "." + "outDir": "../../dist/out-tsc/typescript-estree" }, - "include": ["src", "typings", "tests", "tools"], - "exclude": ["tests/fixtures/**/*"], + "files": [], "references": [ - { "path": "../types/tsconfig.build.json" }, - { "path": "../visitor-keys/tsconfig.build.json" } + { + "path": "./tsconfig.build.json" + }, + { + "path": "./tsconfig.spec.json" + } ] } diff --git a/packages/typescript-estree/tsconfig.spec.json b/packages/typescript-estree/tsconfig.spec.json new file mode 100644 index 00000000000..bf0d46e48ea --- /dev/null +++ b/packages/typescript-estree/tsconfig.spec.json @@ -0,0 +1,25 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc/typescript-estree", + "types": ["jest", "node"] + }, + "exclude": ["tests/fixtures"], + "include": [ + "tests", + "**/*.test.ts", + "**/*.spec.ts", + "**/*.test.tsx", + "**/*.spec.tsx", + "**/*.test.js", + "**/*.spec.js", + "**/*.test.jsx", + "**/*.spec.jsx", + "**/*.d.ts" + ], + "references": [ + { + "path": "./tsconfig.build.json" + } + ] +} diff --git a/packages/utils/package.json b/packages/utils/package.json index f9dde8dd21e..dcf9e76bb70 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -63,8 +63,7 @@ "postclean": "rimraf dist && rimraf _ts3.4 && rimraf _ts4.3 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "lint": "npx nx lint", - "test": "jest --coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" + "test": "jest --coverage" }, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", diff --git a/packages/utils/src/eslint-utils/InferTypesFromRule.ts b/packages/utils/src/eslint-utils/InferTypesFromRule.ts index c716912cdf1..bb9c143364d 100644 --- a/packages/utils/src/eslint-utils/InferTypesFromRule.ts +++ b/packages/utils/src/eslint-utils/InferTypesFromRule.ts @@ -20,4 +20,4 @@ type InferMessageIdsTypeFromRule = ? MessageIds : unknown; -export { InferOptionsTypeFromRule, InferMessageIdsTypeFromRule }; +export type { InferOptionsTypeFromRule, InferMessageIdsTypeFromRule }; diff --git a/packages/utils/src/ts-eslint/AST.ts b/packages/utils/src/ts-eslint/AST.ts index 4cace04f13f..a8462faa890 100644 --- a/packages/utils/src/ts-eslint/AST.ts +++ b/packages/utils/src/ts-eslint/AST.ts @@ -12,4 +12,4 @@ namespace AST { export type Range = TSESTree.Range; } -export { AST }; +export type { AST }; diff --git a/packages/utils/src/ts-eslint/ParserOptions.ts b/packages/utils/src/ts-eslint/ParserOptions.ts index 5a64049f335..12fa08ba635 100644 --- a/packages/utils/src/ts-eslint/ParserOptions.ts +++ b/packages/utils/src/ts-eslint/ParserOptions.ts @@ -1,4 +1,4 @@ -export { +export type { DebugLevel, EcmaVersion, ParserOptions, diff --git a/packages/utils/src/ts-eslint/RuleTester.ts b/packages/utils/src/ts-eslint/RuleTester.ts index 11696716222..42ea087f34b 100644 --- a/packages/utils/src/ts-eslint/RuleTester.ts +++ b/packages/utils/src/ts-eslint/RuleTester.ts @@ -200,10 +200,10 @@ declare class RuleTesterBase { class RuleTester extends (ESLintRuleTester as typeof RuleTesterBase) {} -export { +export { RuleTester }; +export type { InvalidTestCase, SuggestionOutput, - RuleTester, RuleTesterConfig, RuleTesterTestFrameworkFunction, RunTests, diff --git a/packages/utils/tsconfig.build.json b/packages/utils/tsconfig.build.json index e5c1077c5e5..ea04d6c5932 100644 --- a/packages/utils/tsconfig.build.json +++ b/packages/utils/tsconfig.build.json @@ -1,15 +1,21 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": true, - "outDir": "./dist", - "rootDir": "./src", + "rootDir": "src", + "outDir": "dist", + "emitDeclarationOnly": false, "resolveJsonModule": true }, "include": ["src", "typings"], "references": [ - { "path": "../scope-manager/tsconfig.build.json" }, - { "path": "../types/tsconfig.build.json" }, - { "path": "../typescript-estree/tsconfig.build.json" } + { + "path": "../scope-manager/tsconfig.build.json" + }, + { + "path": "../types/tsconfig.build.json" + }, + { + "path": "../typescript-estree/tsconfig.build.json" + } ] } diff --git a/packages/utils/tsconfig.json b/packages/utils/tsconfig.json index 20ea2496c6b..42c5024cc22 100644 --- a/packages/utils/tsconfig.json +++ b/packages/utils/tsconfig.json @@ -1,13 +1,12 @@ { - "extends": "./tsconfig.build.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": false, - "rootDir": "." + "outDir": "../../dist/out-tsc/utils" }, "include": ["src", "typings", "tests", "tools"], "references": [ - { "path": "../scope-manager/tsconfig.build.json" }, - { "path": "../types/tsconfig.build.json" }, - { "path": "../typescript-estree/tsconfig.build.json" } + { + "path": "./tsconfig.build.json" + } ] } diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index 30df303d290..ba6e163476b 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -43,8 +43,7 @@ "postclean": "rimraf dist && rimraf _ts3.4 && rimraf _ts4.3 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "lint": "npx nx lint", - "test": "jest --coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" + "test": "jest --coverage" }, "dependencies": { "@typescript-eslint/types": "7.8.0", diff --git a/packages/visitor-keys/src/index.ts b/packages/visitor-keys/src/index.ts index 04aa6515863..32439b9d379 100644 --- a/packages/visitor-keys/src/index.ts +++ b/packages/visitor-keys/src/index.ts @@ -1,2 +1,3 @@ export { getKeys } from './get-keys'; -export { visitorKeys, VisitorKeys } from './visitor-keys'; +export { visitorKeys } from './visitor-keys'; +export type { VisitorKeys } from './visitor-keys'; diff --git a/packages/visitor-keys/src/visitor-keys.ts b/packages/visitor-keys/src/visitor-keys.ts index 04aa32e5af2..1cdc54c0c3d 100644 --- a/packages/visitor-keys/src/visitor-keys.ts +++ b/packages/visitor-keys/src/visitor-keys.ts @@ -275,4 +275,5 @@ const additionalKeys: AdditionalKeys = { const visitorKeys: VisitorKeys = eslintVisitorKeys.unionWith(additionalKeys); -export { visitorKeys, VisitorKeys }; +export type { VisitorKeys }; +export { visitorKeys }; diff --git a/packages/visitor-keys/tsconfig.build.json b/packages/visitor-keys/tsconfig.build.json index 215a0282df2..0f2483b57f3 100644 --- a/packages/visitor-keys/tsconfig.build.json +++ b/packages/visitor-keys/tsconfig.build.json @@ -1,9 +1,9 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": true, - "outDir": "./dist", - "rootDir": "./src", + "rootDir": "src", + "outDir": "dist", + "emitDeclarationOnly": false, "resolveJsonModule": true }, "include": ["src", "typings"] diff --git a/packages/visitor-keys/tsconfig.json b/packages/visitor-keys/tsconfig.json index 9cea515ba6b..445a7045138 100644 --- a/packages/visitor-keys/tsconfig.json +++ b/packages/visitor-keys/tsconfig.json @@ -1,8 +1,12 @@ { - "extends": "./tsconfig.build.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": false, - "rootDir": "." + "outDir": "../../dist/out-tsc/visitor-keys" }, - "include": ["src", "typings", "tests", "tools"] + "include": ["src", "typings", "tests", "tools"], + "references": [ + { + "path": "./tsconfig.build.json" + } + ] } diff --git a/packages/website-eslint/package.json b/packages/website-eslint/package.json index 44939997816..b63876ec2eb 100644 --- a/packages/website-eslint/package.json +++ b/packages/website-eslint/package.json @@ -19,20 +19,19 @@ "scripts": { "build": "yarn tsx ./build.ts", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "npx nx lint", - "typecheck": "tsc --noEmit" + "lint": "npx nx lint" }, "dependencies": { + "@typescript-eslint/eslint-plugin": "7.8.0", + "@typescript-eslint/scope-manager": "7.8.0", "@typescript-eslint/types": "7.8.0", - "@typescript-eslint/utils": "7.8.0" + "@typescript-eslint/typescript-estree": "7.8.0", + "@typescript-eslint/utils": "7.8.0", + "@typescript-eslint/visitor-keys": "7.8.0" }, "devDependencies": { "@eslint/js": "*", - "@typescript-eslint/eslint-plugin": "7.8.0", "@typescript-eslint/parser": "7.8.0", - "@typescript-eslint/scope-manager": "7.8.0", - "@typescript-eslint/typescript-estree": "7.8.0", - "@typescript-eslint/visitor-keys": "7.8.0", "esbuild": "~0.20.2", "eslint": "*", "esquery": "*", diff --git a/packages/website-eslint/tsconfig.json b/packages/website-eslint/tsconfig.json index aeafdb4d3f3..b5a6009b29e 100644 --- a/packages/website-eslint/tsconfig.json +++ b/packages/website-eslint/tsconfig.json @@ -1,13 +1,21 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { + "outDir": "../../dist/out-tsc/website-eslint", "allowJs": true, - // opt-in files for checking - "checkJs": false, - // build is done via esbuild - "noEmit": true, - "skipLibCheck": true + "skipLibCheck": true, + "noImplicitAny": false }, "include": ["src", "types", "build.ts"], - "references": [] + "references": [ + { + "path": "../scope-manager/tsconfig.build.json" + }, + { + "path": "../typescript-estree/tsconfig.build.json" + }, + { + "path": "../visitor-keys/tsconfig.build.json" + } + ] } diff --git a/packages/website/package.json b/packages/website/package.json index 07d5f9f92e0..151c7a0ac7e 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -12,8 +12,7 @@ "lint": "npx nx lint", "serve": "docusaurus serve", "start": "npx nx start", - "swizzle": "docusaurus swizzle", - "typecheck": "tsc -b ./tsconfig.json" + "swizzle": "docusaurus swizzle" }, "dependencies": { "@babel/runtime": "^7.24.4", @@ -26,6 +25,7 @@ "@mdx-js/react": "^3.0.1", "@prettier/sync": "*", "@typescript-eslint/parser": "7.8.0", + "@typescript-eslint/rule-schema-to-typescript-types": "7.8.0", "@typescript-eslint/website-eslint": "7.8.0", "clsx": "^2.1.0", "eslint": "*", @@ -50,7 +50,6 @@ "@types/react-helmet": "^6.1.11", "@types/react-router-dom": "^5.3.3", "@typescript-eslint/eslint-plugin": "7.8.0", - "@typescript-eslint/rule-schema-to-typescript-types": "7.8.0", "@typescript-eslint/types": "7.8.0", "copy-webpack-plugin": "^12.0.0", "cross-fetch": "*", diff --git a/packages/website/tsconfig.json b/packages/website/tsconfig.json index fd5a209a978..548d97d2acf 100644 --- a/packages/website/tsconfig.json +++ b/packages/website/tsconfig.json @@ -1,13 +1,16 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { + // disable composite and emitDeclarationOnly for docusaurus usage + "composite": false, + "emitDeclarationOnly": false, + "noEmit": true, "module": "ESNext", "moduleResolution": "Bundler", "allowJs": true, "esModuleInterop": true, "jsx": "react", "lib": ["DOM", "ESNext"], - "noEmit": true, "noImplicitAny": false, "resolveJsonModule": true, "baseUrl": ".", @@ -25,5 +28,10 @@ "sidebars/*.js", "./*.mts", "./*.ts" + ], + "references": [ + { + "path": "../rule-schema-to-typescript-types/tsconfig.build.json" + } ] } diff --git a/tsconfig.base.json b/tsconfig.base.json index a00dd38697a..51c354ac0f0 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1,21 +1,34 @@ { "compilerOptions": { + "allowJs": false, "allowSyntheticDefaultImports": true, "allowUnreachableCode": false, "allowUnusedLabels": false, + "composite": true, "declaration": true, "declarationMap": true, + "emitDeclarationOnly": true, + "emitDecoratorMetadata": false, "esModuleInterop": true, - "lib": ["ES2021"], - "module": "Node16", - "moduleResolution": "Node16", + "experimentalDecorators": false, + "forceConsistentCasingInFileNames": true, + "incremental": true, + "isolatedModules": true, + "lib": ["es2022"], + "module": "NodeNext", + "noEmitOnError": true, + "noImplicitOverride": true, "noImplicitReturns": true, - "paths": {}, + "noFallthroughCasesInSwitch": false, + "noUnusedLocals": false, "pretty": true, - "resolveJsonModule": true, + "removeComments": false, + "resolveJsonModule": false, + "skipDefaultLibCheck": false, "skipLibCheck": true, "sourceMap": true, "strict": true, - "target": "ES2021" + "target": "es2022", + "verbatimModuleSyntax": false } } diff --git a/tsconfig.json b/tsconfig.json index cea4b651f67..9725fb90a96 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,18 +1,58 @@ { - "compilerOptions": { - "types": ["@types/node"], - "noEmit": true, - "allowJs": true - }, "extends": "./tsconfig.base.json", - "include": [ - "typings", - "tools/**/*.ts", - "tools/**/*.mts", - "eslint.config.js", - "eslint.config.mjs", - "jest.config.base.js", - "jest.config.js", - "jest.preset.js" + "compileOnSave": false, + "files": [], + "references": [ + { + "path": "./packages/ast-spec" + }, + { + "path": "./packages/eslint-plugin" + }, + { + "path": "./packages/eslint-plugin-internal" + }, + { + "path": "./packages/integration-tests" + }, + { + "path": "./packages/parser" + }, + { + "path": "./packages/repo-tools" + }, + { + "path": "./packages/rule-schema-to-typescript-types" + }, + { + "path": "./packages/rule-tester" + }, + { + "path": "./packages/scope-manager" + }, + { + "path": "./packages/type-utils" + }, + { + "path": "./packages/types" + }, + { + "path": "./packages/typescript-eslint" + }, + { + "path": "./packages/typescript-estree" + }, + { + "path": "./packages/utils" + }, + { + "path": "./packages/visitor-keys" + }, + { + "path": "./packages/website" + }, + { + "path": "./packages/website-eslint" + } ] } diff --git a/yarn.lock b/yarn.lock index 5fd1b3ac69c..f22de063522 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3922,42 +3922,51 @@ __metadata: languageName: node linkType: hard -"@nrwl/jest@npm:18.2.3": - version: 18.2.3 - resolution: "@nrwl/jest@npm:18.2.3" +"@nrwl/devkit@npm:19.0.0-beta.9": + version: 19.0.0-beta.9 + resolution: "@nrwl/devkit@npm:19.0.0-beta.9" dependencies: - "@nx/jest": 18.2.3 - checksum: 269105dc494105b4aa217c42c2a4f31bd3ce6a9c862bd563a2a46ba7c892b62c9ae459e6671cbb3721a78a7e96df599751c4f6a302b279c708a4b79ec5848f08 + "@nx/devkit": 19.0.0-beta.9 + checksum: a8a44f551eb7997bb597cfd5e2550e99c05ad78681cfabf84be014347ef1646ab9bc5c615bd5e84bf4da7ecd48f980db25c37e293100c01ba36e03cc5f509752 languageName: node linkType: hard -"@nrwl/js@npm:18.2.3": - version: 18.2.3 - resolution: "@nrwl/js@npm:18.2.3" +"@nrwl/jest@npm:19.0.0-beta.9": + version: 19.0.0-beta.9 + resolution: "@nrwl/jest@npm:19.0.0-beta.9" dependencies: - "@nx/js": 18.2.3 - checksum: ea3fe76c43eec4f48d66b4d8905836a9a94d4a86e325ef4416ea74e524c7a27a42cd3a8ddd2c9ed3650a9582a4a3798a58591112a7abb28c6c45a22c9fa93548 + "@nx/jest": 19.0.0-beta.9 + checksum: eb30c34403381e9df9661d50e48fe994c3fc6144a33fb823113a2c03f3b3a8b0cff751d02f3729aac95fdc401293a5ad5ddb3d312b36ae73b36535df7fc617fa languageName: node linkType: hard -"@nrwl/tao@npm:18.2.3": - version: 18.2.3 - resolution: "@nrwl/tao@npm:18.2.3" +"@nrwl/js@npm:19.0.0-beta.9": + version: 19.0.0-beta.9 + resolution: "@nrwl/js@npm:19.0.0-beta.9" dependencies: - nx: 18.2.3 + "@nx/js": 19.0.0-beta.9 + checksum: 95349085631cea9010dfea55d2b4ac6637def476b3cdcbbeacb393150fb964d963e70c0065e8817197c62b05d01f93a35e791ec876c549fcc5ad701f8462cd84 + languageName: node + linkType: hard + +"@nrwl/tao@npm:19.0.0-beta.9": + version: 19.0.0-beta.9 + resolution: "@nrwl/tao@npm:19.0.0-beta.9" + dependencies: + nx: 19.0.0-beta.9 tslib: ^2.3.0 bin: tao: index.js - checksum: 14fdd21fb9c526879917efa8763cbe243db12cf7b755a74ae6c4596d8cdba08bf9416526a6e1347bba8f23ca36947b626e2e46504b29c809d30a4a3a95e68efb + checksum: b2e1c7607d86584251977eaf94f8f6ef90113525fab33fc8a67e05f90f81e36af0d979862a7faf91c47b2105bfdf407e6e337f08b6242282f5f804ce6735efd0 languageName: node linkType: hard -"@nrwl/workspace@npm:18.2.3": - version: 18.2.3 - resolution: "@nrwl/workspace@npm:18.2.3" +"@nrwl/workspace@npm:19.0.0-beta.9": + version: 19.0.0-beta.9 + resolution: "@nrwl/workspace@npm:19.0.0-beta.9" dependencies: - "@nx/workspace": 18.2.3 - checksum: 13b798b9f87a4b7b7a6f5f128d0a32464acca2066ac1668fe31c7fabfe4d31436246d93f247d6a7a8a18ce922f275912f543f013ff3462d636003e2ec2383a5d + "@nx/workspace": 19.0.0-beta.9 + checksum: c5d236e75d4e04f9ab4cfe4049654bd9fe21778485c4eec468fe884f64ed32008b7d9ed04f3e6da6aa391af86e9bc5d352dbce35c1d4f9480c7dbee8c8a72c95 languageName: node linkType: hard @@ -3979,13 +3988,32 @@ __metadata: languageName: node linkType: hard -"@nx/eslint@npm:18.2.3": - version: 18.2.3 - resolution: "@nx/eslint@npm:18.2.3" +"@nx/devkit@npm:19.0.0-beta.9": + version: 19.0.0-beta.9 + resolution: "@nx/devkit@npm:19.0.0-beta.9" dependencies: - "@nx/devkit": 18.2.3 - "@nx/js": 18.2.3 - "@nx/linter": 18.2.3 + "@nrwl/devkit": 19.0.0-beta.9 + ejs: ^3.1.7 + enquirer: ~2.3.6 + ignore: ^5.0.4 + minimatch: 9.0.3 + semver: ^7.5.3 + tmp: ~0.2.1 + tslib: ^2.3.0 + yargs-parser: 21.1.1 + peerDependencies: + nx: ">= 17 <= 20" + checksum: 564cc1e600c78a53acce5a0b79babd40fe58f71347c4557d071126c339fb902e59869cb8da9df28d02a5cbff5170d9e76ab43a70879d8fe2aa489aca31e09bde + languageName: node + linkType: hard + +"@nx/eslint@npm:19.0.0-beta.9": + version: 19.0.0-beta.9 + resolution: "@nx/eslint@npm:19.0.0-beta.9" + dependencies: + "@nx/devkit": 19.0.0-beta.9 + "@nx/js": 19.0.0-beta.9 + "@nx/linter": 19.0.0-beta.9 eslint: ^8.0.0 tslib: ^2.3.0 typescript: ~5.4.2 @@ -3994,19 +4022,19 @@ __metadata: peerDependenciesMeta: js-yaml: optional: true - checksum: a8afa659e1fe27ca9bb221ac001b189fa650abea6c172b4234cdc380468b44720f29c23effe87a62e2b4568766ea774971d37bbcd5439137cc616f023a8d279e + checksum: 8a1c93a7d8150941bd3499c63b3572a79e319ce4abf72a1eaf658928597cc5cf37c70fae1c7842a4e170ea704f8553de7055301706b015fd7106d6d573ee2093 languageName: node linkType: hard -"@nx/jest@npm:18.2.3": - version: 18.2.3 - resolution: "@nx/jest@npm:18.2.3" +"@nx/jest@npm:19.0.0-beta.9": + version: 19.0.0-beta.9 + resolution: "@nx/jest@npm:19.0.0-beta.9" dependencies: "@jest/reporters": ^29.4.1 "@jest/test-result": ^29.4.1 - "@nrwl/jest": 18.2.3 - "@nx/devkit": 18.2.3 - "@nx/js": 18.2.3 + "@nrwl/jest": 19.0.0-beta.9 + "@nx/devkit": 19.0.0-beta.9 + "@nx/js": 19.0.0-beta.9 "@phenomnomnominal/tsquery": ~5.0.1 chalk: ^4.1.0 identity-obj-proxy: 3.0.0 @@ -4017,13 +4045,13 @@ __metadata: resolve.exports: 1.1.0 tslib: ^2.3.0 yargs-parser: 21.1.1 - checksum: 0d437a669c31bf85a3b65fcc7caf2a0ad28e2f8249dc05e257171d79ad926ff22359ba99c22547743791367dc12ecd633d606c7f5f9340f4065185fde8427612 + checksum: e4b45513736fa8f3dac1428588a146c8d02a9a78314fe486915ebf7149a796faa1aef7d703e1d94251d4b4b7d285f9b72332470c6ff8170cf11f36d89391e2f1 languageName: node linkType: hard -"@nx/js@npm:18.2.3": - version: 18.2.3 - resolution: "@nx/js@npm:18.2.3" +"@nx/js@npm:19.0.0-beta.9": + version: 19.0.0-beta.9 + resolution: "@nx/js@npm:19.0.0-beta.9" dependencies: "@babel/core": ^7.23.2 "@babel/plugin-proposal-decorators": ^7.22.7 @@ -4032,10 +4060,9 @@ __metadata: "@babel/preset-env": ^7.23.2 "@babel/preset-typescript": ^7.22.5 "@babel/runtime": ^7.22.6 - "@nrwl/js": 18.2.3 - "@nx/devkit": 18.2.3 - "@nx/workspace": 18.2.3 - "@phenomnomnominal/tsquery": ~5.0.1 + "@nrwl/js": 19.0.0-beta.9 + "@nx/devkit": 19.0.0-beta.9 + "@nx/workspace": 19.0.0-beta.9 babel-plugin-const-enum: ^1.0.1 babel-plugin-macros: ^2.8.0 babel-plugin-transform-typescript-metadata: ^0.3.1 @@ -4060,101 +4087,101 @@ __metadata: peerDependenciesMeta: verdaccio: optional: true - checksum: daedb71a5c39dd81a7db14f503b230207ce72515fce710299213a47e2711baa48bd3c7123ad53b64b9e6140e03534c6b0f224650a26f1584e5fa9b86a07001a1 + checksum: 76bbfd9dd70204296d9134010e6004ffcf3ab2f3944e196490ed4d3837052ba87b14b1de1341deef4a1e7bbd08181de3b4048c9138eedd0f8554e60d0237af9a languageName: node linkType: hard -"@nx/linter@npm:18.2.3": - version: 18.2.3 - resolution: "@nx/linter@npm:18.2.3" +"@nx/linter@npm:19.0.0-beta.9": + version: 19.0.0-beta.9 + resolution: "@nx/linter@npm:19.0.0-beta.9" dependencies: - "@nx/eslint": 18.2.3 - checksum: 8e90ac61253d872ffe521a511ec40d881ea9bc3d68c2aee0ca585717a987f940245a526638840b4627af488dc239c0a368b3cfaf1f4ac51472adfdd21209bc85 + "@nx/eslint": 19.0.0-beta.9 + checksum: 6a2c519ca21e28195e9445ee0d07cc5ec54e4b15ac54d3af01675313d25403eb8940327d98c077df0357b8fb0b215d26bc9265e9c457f899e06ef695f41285d1 languageName: node linkType: hard -"@nx/nx-darwin-arm64@npm:18.2.3": - version: 18.2.3 - resolution: "@nx/nx-darwin-arm64@npm:18.2.3" +"@nx/nx-darwin-arm64@npm:19.0.0-beta.9": + version: 19.0.0-beta.9 + resolution: "@nx/nx-darwin-arm64@npm:19.0.0-beta.9" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@nx/nx-darwin-x64@npm:18.2.3": - version: 18.2.3 - resolution: "@nx/nx-darwin-x64@npm:18.2.3" +"@nx/nx-darwin-x64@npm:19.0.0-beta.9": + version: 19.0.0-beta.9 + resolution: "@nx/nx-darwin-x64@npm:19.0.0-beta.9" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@nx/nx-freebsd-x64@npm:18.2.3": - version: 18.2.3 - resolution: "@nx/nx-freebsd-x64@npm:18.2.3" +"@nx/nx-freebsd-x64@npm:19.0.0-beta.9": + version: 19.0.0-beta.9 + resolution: "@nx/nx-freebsd-x64@npm:19.0.0-beta.9" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@nx/nx-linux-arm-gnueabihf@npm:18.2.3": - version: 18.2.3 - resolution: "@nx/nx-linux-arm-gnueabihf@npm:18.2.3" +"@nx/nx-linux-arm-gnueabihf@npm:19.0.0-beta.9": + version: 19.0.0-beta.9 + resolution: "@nx/nx-linux-arm-gnueabihf@npm:19.0.0-beta.9" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@nx/nx-linux-arm64-gnu@npm:18.2.3": - version: 18.2.3 - resolution: "@nx/nx-linux-arm64-gnu@npm:18.2.3" +"@nx/nx-linux-arm64-gnu@npm:19.0.0-beta.9": + version: 19.0.0-beta.9 + resolution: "@nx/nx-linux-arm64-gnu@npm:19.0.0-beta.9" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@nx/nx-linux-arm64-musl@npm:18.2.3": - version: 18.2.3 - resolution: "@nx/nx-linux-arm64-musl@npm:18.2.3" +"@nx/nx-linux-arm64-musl@npm:19.0.0-beta.9": + version: 19.0.0-beta.9 + resolution: "@nx/nx-linux-arm64-musl@npm:19.0.0-beta.9" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@nx/nx-linux-x64-gnu@npm:18.2.3": - version: 18.2.3 - resolution: "@nx/nx-linux-x64-gnu@npm:18.2.3" +"@nx/nx-linux-x64-gnu@npm:19.0.0-beta.9": + version: 19.0.0-beta.9 + resolution: "@nx/nx-linux-x64-gnu@npm:19.0.0-beta.9" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@nx/nx-linux-x64-musl@npm:18.2.3": - version: 18.2.3 - resolution: "@nx/nx-linux-x64-musl@npm:18.2.3" +"@nx/nx-linux-x64-musl@npm:19.0.0-beta.9": + version: 19.0.0-beta.9 + resolution: "@nx/nx-linux-x64-musl@npm:19.0.0-beta.9" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@nx/nx-win32-arm64-msvc@npm:18.2.3": - version: 18.2.3 - resolution: "@nx/nx-win32-arm64-msvc@npm:18.2.3" +"@nx/nx-win32-arm64-msvc@npm:19.0.0-beta.9": + version: 19.0.0-beta.9 + resolution: "@nx/nx-win32-arm64-msvc@npm:19.0.0-beta.9" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@nx/nx-win32-x64-msvc@npm:18.2.3": - version: 18.2.3 - resolution: "@nx/nx-win32-x64-msvc@npm:18.2.3" +"@nx/nx-win32-x64-msvc@npm:19.0.0-beta.9": + version: 19.0.0-beta.9 + resolution: "@nx/nx-win32-x64-msvc@npm:19.0.0-beta.9" conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"@nx/workspace@npm:18.2.3": - version: 18.2.3 - resolution: "@nx/workspace@npm:18.2.3" +"@nx/workspace@npm:19.0.0-beta.9": + version: 19.0.0-beta.9 + resolution: "@nx/workspace@npm:19.0.0-beta.9" dependencies: - "@nrwl/workspace": 18.2.3 - "@nx/devkit": 18.2.3 + "@nrwl/workspace": 19.0.0-beta.9 + "@nx/devkit": 19.0.0-beta.9 chalk: ^4.1.0 enquirer: ~2.3.6 - nx: 18.2.3 + nx: 19.0.0-beta.9 tslib: ^2.3.0 yargs-parser: 21.1.1 - checksum: 01cf5a329455fdd49367424da7c641c1d294b86005b11de83fe69a8d5d49ea5f1826b96066a58e1968894d0f46a317837de5aa89de647d81d78cc11924e05758 + checksum: 5eddb5ac085927b21663c757ff385d7dee719b0253554a6b01608db0ec1b9a2f4af52446b0b4963d7c07fbd3be5ec6d8b716d131bf1c1b3a20eca8aeea31e4f6 languageName: node linkType: hard @@ -5779,9 +5806,10 @@ __metadata: "@babel/types": ^7.24.0 "@eslint/eslintrc": ^2.1.4 "@eslint/js": ^8.57.0 - "@nx/eslint": 18.2.3 - "@nx/jest": 18.2.3 - "@nx/workspace": 18.2.3 + "@nx/eslint": 19.0.0-beta.9 + "@nx/jest": 19.0.0-beta.9 + "@nx/js": 19.0.0-beta.9 + "@nx/workspace": 19.0.0-beta.9 "@swc/core": ^1.4.12 "@swc/jest": ^0.2.36 "@types/babel__code-frame": ^7.0.6 @@ -5827,7 +5855,7 @@ __metadata: markdownlint-cli: ^0.39.0 ncp: ^2.0.0 netlify: ^13.1.14 - nx: 18.2.3 + nx: 19.0.0-beta.9 prettier: 3.2.5 pretty-format: ^29.7.0 raw-loader: ^4.0.2 @@ -15284,21 +15312,21 @@ __metadata: languageName: node linkType: hard -"nx@npm:18.2.3": - version: 18.2.3 - resolution: "nx@npm:18.2.3" - dependencies: - "@nrwl/tao": 18.2.3 - "@nx/nx-darwin-arm64": 18.2.3 - "@nx/nx-darwin-x64": 18.2.3 - "@nx/nx-freebsd-x64": 18.2.3 - "@nx/nx-linux-arm-gnueabihf": 18.2.3 - "@nx/nx-linux-arm64-gnu": 18.2.3 - "@nx/nx-linux-arm64-musl": 18.2.3 - "@nx/nx-linux-x64-gnu": 18.2.3 - "@nx/nx-linux-x64-musl": 18.2.3 - "@nx/nx-win32-arm64-msvc": 18.2.3 - "@nx/nx-win32-x64-msvc": 18.2.3 +"nx@npm:19.0.0-beta.9": + version: 19.0.0-beta.9 + resolution: "nx@npm:19.0.0-beta.9" + dependencies: + "@nrwl/tao": 19.0.0-beta.9 + "@nx/nx-darwin-arm64": 19.0.0-beta.9 + "@nx/nx-darwin-x64": 19.0.0-beta.9 + "@nx/nx-freebsd-x64": 19.0.0-beta.9 + "@nx/nx-linux-arm-gnueabihf": 19.0.0-beta.9 + "@nx/nx-linux-arm64-gnu": 19.0.0-beta.9 + "@nx/nx-linux-arm64-musl": 19.0.0-beta.9 + "@nx/nx-linux-x64-gnu": 19.0.0-beta.9 + "@nx/nx-linux-x64-musl": 19.0.0-beta.9 + "@nx/nx-win32-arm64-msvc": 19.0.0-beta.9 + "@nx/nx-win32-x64-msvc": 19.0.0-beta.9 "@yarnpkg/lockfile": ^1.1.0 "@yarnpkg/parsers": 3.0.0-rc.46 "@zkochan/js-yaml": 0.0.6 @@ -15364,7 +15392,7 @@ __metadata: bin: nx: bin/nx.js nx-cloud: bin/nx-cloud.js - checksum: 94a369845dd5b931faa216cb0018744115ab9e98fc633b7ae57c1d957da1bc4c8f45da49c657f40d33d2caf521e15606c13649a75a047e45140f53cbce0197af + checksum: 56a159350778a10c477d0209ba0ea7a8351f13086bd3cf10d577c86e8ef422b9e7e826ea5a3adf260c4b7402f695488fd5ae9d7a136eaff7743c54c766b8e6ec languageName: node linkType: hard