diff --git a/.github/actions/prepare-build/action.yml b/.github/actions/prepare-build/action.yml index e88bd2cfb93b..d191358d6503 100644 --- a/.github/actions/prepare-build/action.yml +++ b/.github/actions/prepare-build/action.yml @@ -22,7 +22,7 @@ runs: if: steps['build-cache'].outputs.cache-hit == 'true' shell: bash run: | - npx nx run types:build + yarn nx run types:build env: SKIP_AST_SPEC_REBUILD: true @@ -31,6 +31,6 @@ runs: shell: bash # Website will be built by the Netlify GitHub App run: | - npx nx run-many --target=build --parallel --exclude=website --exclude=website-eslint + yarn nx run-many --target=build --parallel --exclude=website --exclude=website-eslint env: SKIP_AST_SPEC_REBUILD: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 398c05e17baa..2ded66ac31b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -198,12 +198,12 @@ jobs: # we don't collect coverage on other node versions so they run faster - name: Run unit tests with coverage for ${{ matrix.package }} if: env.PRIMARY_NODE_VERSION == matrix.node-version && matrix.os == 'ubuntu-latest' - run: npx nx run ${{ matrix.package }}:test -- --coverage + run: yarn nx run ${{ matrix.package }}:test -- --coverage env: CI: true - name: Run unit tests for ${{ matrix.package }} if: env.PRIMARY_NODE_VERSION != matrix.node-version || matrix.os != 'ubuntu-latest' - run: npx nx test ${{ matrix.package }} + run: yarn nx test ${{ matrix.package }} env: CI: true @@ -238,7 +238,7 @@ jobs: - name: Build uses: ./.github/actions/prepare-build - name: Run unit tests for ${{ matrix.package }} - run: npx nx test ${{ matrix.package }} --coverage=false + run: yarn nx test ${{ matrix.package }} --coverage=false env: CI: true TYPESCRIPT_ESLINT_PROJECT_SERVICE: true diff --git a/knip.ts b/knip.ts index 4ab6787999d8..9f2a79146687 100644 --- a/knip.ts +++ b/knip.ts @@ -22,14 +22,17 @@ export default { workspaces: { '.': { entry: ['tools/release/changelog-renderer.js', 'tools/scripts/**/*.mts'], - ignore: ['tools/scripts/typings/typescript.d.ts', 'typings/*.d.ts'], ignoreDependencies: [ - '@nx/js', '@nx/workspace', - 'make-dir', // imported for type purposes only 'website', ], + + project: [ + 'tools/scripts/**/*.mts', + '!tools/scripts/typings/typescript.d.ts', + '!typings/*.d.ts', + ], }, 'packages/ast-spec': { ignore: [ diff --git a/nx.json b/nx.json index b48badbaad3f..167f99ebcc2a 100644 --- a/nx.json +++ b/nx.json @@ -100,6 +100,7 @@ "cache": true }, "lint": { + "executor": "@nx/eslint:lint", "dependsOn": ["eslint-plugin-internal:build", "typescript-eslint:build"], "inputs": [ "default", @@ -135,9 +136,10 @@ ], "production": [ "default", - "!{projectRoot}/**/?(*.)+(test).[jt]s?(x)?(.snap)", + "!{projectRoot}/**/?(*.)+(test).?(m|c)[jt]s?(x)?(.snap|.shot)", + "!{projectRoot}/tests", "!{projectRoot}/tsconfig.spec.json", - "!{projectRoot}/vitest.config.m[jt]s", + "!{projectRoot}/vitest.config.mts", "!{projectRoot}/src/test-setup.[jt]s" ] } diff --git a/package.json b/package.json index 5ea26cb0ba81..a3d9c5c307bd 100644 --- a/package.json +++ b/package.json @@ -22,30 +22,30 @@ }, "homepage": "https://typescript-eslint.io", "scripts": { - "build": "npx nx run-many --target=build --exclude website --exclude website-eslint", + "build": "nx run-many --target=build --exclude website --exclude website-eslint", "check-clean-workspace-after-install": "git diff --quiet --exit-code", "check-format": "prettier --check .", "check-spelling": "cspell --config=.cspell.json \"**/*.{md,mdx,ts,mts,cts,js,cjs,mjs,tsx,jsx}\" --no-progress --show-context --show-suggestions", - "clean": "npx nx run-many --target=clean", - "format": "prettier --write .", - "generate-breaking-changes": "npx nx run eslint-plugin:generate-breaking-changes", - "generate-configs": "npx nx generate-configs", - "generate-contributors": "npx nx generate-contributors", - "generate-lib": "npx nx generate-lib", - "generate-sponsors": "npx nx generate-sponsors", - "generate-website-dts": "npx nx run website:generate-website-dts", + "clean": "nx run-many --target=clean --parallel=20", + "format": "prettier --ignore-path=$PROJECT_CWD/.prettierignore --config=$PROJECT_CWD/.prettierrc.json --write $INIT_CWD", + "generate-breaking-changes": "nx run eslint-plugin:generate-breaking-changes", + "generate-configs": "nx generate-configs", + "generate-contributors": "nx generate-contributors", + "generate-lib": "nx generate-lib", + "generate-sponsors": "nx generate-sponsors", + "generate-website-dts": "nx run website:generate-website-dts", "lint-fix": "yarn lint --fix", "lint-markdown-fix": "yarn lint-markdown --fix", "lint-markdown": "markdownlint \"**/*.md\" --config=.markdownlint.json --ignore-path=.markdownlintignore", - "lint-stylelint": "npx nx lint website stylelint", - "lint": "npx nx lint eslint-plugin --skip-nx-cache && npx nx run-many --target=lint --exclude eslint-plugin", + "lint-stylelint": "nx lint website stylelint", + "lint": "nx run-many --target=lint", "postinstall": "tsx tools/scripts/postinstall.mts", - "pre-commit": "yarn lint-staged", + "pre-commit": "lint-staged", "release": "tsx tools/release/release.mts", - "start": "npx nx run website:start", - "test": "npx nx run-many --target=test --exclude integration-tests --exclude website --exclude website-eslint", - "test-integration": "npx nx run integration-tests:test", - "typecheck": "npx nx run-many --target=typecheck" + "start": "nx run website:start", + "test": "nx run-many --target=test --exclude integration-tests --exclude website --exclude website-eslint", + "test-integration": "nx run integration-tests:test", + "typecheck": "nx run-many --target=typecheck" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -59,6 +59,7 @@ "@eslint/js": "^9.26.0", "@nx/devkit": "20.7.2", "@nx/eslint": "20.7.2", + "@nx/js": "20.7.2", "@nx/vite": "20.7.2", "@nx/workspace": "20.7.2", "@swc/core": "^1.4.12", @@ -70,6 +71,7 @@ "@types/yargs": "^17.0.32", "@typescript-eslint/eslint-plugin": "workspace:^", "@typescript-eslint/eslint-plugin-internal": "workspace:^", + "@typescript-eslint/parser": "workspace:^", "@typescript-eslint/scope-manager": "workspace:^", "@typescript-eslint/types": "workspace:^", "@typescript-eslint/typescript-estree": "workspace:^", @@ -94,7 +96,6 @@ "husky": "^9.1.4", "knip": "^5.41.1", "lint-staged": "^15.2.2", - "make-dir": "^4.0.0", "markdownlint-cli": "^0.44.0", "nx": "20.7.2", "prettier": "3.5.0", @@ -116,7 +117,6 @@ "eslint-plugin-eslint-plugin@^5.5.0": "patch:eslint-plugin-eslint-plugin@npm%3A5.5.1#./.yarn/patches/eslint-plugin-eslint-plugin-npm-5.5.1-4206c2506d.patch", "prettier": "3.5.0", "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", - "tmp": "0.2.1", "tsx": "^4.7.2", "typescript": "5.8.2" }, diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index a2c017d52f42..f2532092d1e2 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -34,10 +34,10 @@ "build": "tsc -b tsconfig.build.json && api-extractor run --local --config=$INIT_CWD/api-extractor.json", "clean": "rimraf dist/ coverage/", "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", + "format": "yarn run -T format", + "lint": "yarn run -BT nx lint", "test": "vitest --run --config=$INIT_CWD/vitest.config.mts", - "check-types": "npx nx typecheck" + "check-types": "yarn run -BT nx typecheck" }, "funding": { "type": "opencollective", @@ -56,7 +56,6 @@ "@vitest/utils": "^3.1.3", "eslint": "*", "glob": "*", - "prettier": "^3.2.5", "rimraf": "*", "typescript": "*", "vitest": "^3.1.3" diff --git a/packages/ast-spec/project.json b/packages/ast-spec/project.json index 5e0432b40f39..d6c8c081f226 100644 --- a/packages/ast-spec/project.json +++ b/packages/ast-spec/project.json @@ -10,8 +10,7 @@ "outputs": ["{projectRoot}/dist/**/*.ts"] }, "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "@nx/eslint:lint" }, "test": { "executor": "@nx/vite:test", diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index 458bee57df6a..c2cde3c76ee8 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -14,13 +14,12 @@ "homepage": "https://typescript-eslint.io", "license": "MIT", "scripts": { - "build": "npx tsc -b tsconfig.build.json", - "clean": "npx tsc -b tsconfig.build.json --clean", - "postclean": "rimraf dist/ coverage/", - "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "npx nx lint", + "build": "tsc -b tsconfig.build.json", + "clean": "rimraf dist/ coverage/", + "format": "yarn run -T format", + "lint": "yarn run -BT nx lint", "test": "vitest --run --config=$INIT_CWD/vitest.config.mts", - "check-types": "npx nx typecheck" + "check-types": "yarn run -BT nx typecheck" }, "dependencies": { "@prettier/sync": "^0.5.1", diff --git a/packages/eslint-plugin-internal/project.json b/packages/eslint-plugin-internal/project.json index e7e8fe15571b..f0bfaacd26b6 100644 --- a/packages/eslint-plugin-internal/project.json +++ b/packages/eslint-plugin-internal/project.json @@ -6,8 +6,7 @@ "sourceRoot": "packages/eslint-plugin-internal/src", "targets": { "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "@nx/eslint:lint" }, "test": { "executor": "@nx/vite:test" diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index c27d09067eab..f198f162124c 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -51,13 +51,13 @@ "scripts": { "build": "tsc -b tsconfig.build.json", "clean": "rimraf dist/ coverage/", - "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "generate:breaking-changes": "tsx tools/generate-breaking-changes.mts", - "generate:configs": "npx nx generate-configs repo", - "lint": "npx nx lint", + "format": "yarn run -T format", + "generate-breaking-changes": "tsx tools/generate-breaking-changes.mts", + "generate-configs": "yarn run -T generate-configs", + "lint": "yarn run -BT nx lint", "test": "vitest --run --config=$INIT_CWD/vitest.config.mts", "test-single": "vitest --run --config=$INIT_CWD/vitest.config.mts --no-coverage", - "check-types": "npx nx typecheck" + "check-types": "yarn run -BT nx typecheck" }, "dependencies": { "@eslint-community/regexpp": "^4.10.0", @@ -85,7 +85,7 @@ "mdast-util-from-markdown": "^2.0.0", "mdast-util-mdx": "^3.0.0", "micromark-extension-mdxjs": "^3.0.0", - "prettier": "^3.2.5", + "prettier": "^3.5.3", "rimraf": "*", "title-case": "^4.0.0", "tsx": "*", diff --git a/packages/eslint-plugin/project.json b/packages/eslint-plugin/project.json index 3dbae67d7435..acfd65a8f79c 100644 --- a/packages/eslint-plugin/project.json +++ b/packages/eslint-plugin/project.json @@ -19,9 +19,10 @@ "executor": "@nx/vite:test" }, "generate-breaking-changes": { + "dependsOn": ["type-utils:build"], "executor": "nx:run-script", "options": { - "script": "generate:breaking-changes" + "script": "generate-breaking-changes" } } } diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index 602d44d36f8f..250cd92b8b07 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -12,10 +12,10 @@ "homepage": "https://typescript-eslint.io", "license": "MIT", "scripts": { - "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "npx nx lint", + "format": "yarn run -T format", + "lint": "yarn run -BT nx lint", "test": "vitest --run --config=$INIT_CWD/vitest.config.mts", - "check-types": "npx nx typecheck" + "check-types": "yarn run -BT nx typecheck" }, "devDependencies": { "@vitest/coverage-v8": "^3.1.3", diff --git a/packages/integration-tests/project.json b/packages/integration-tests/project.json index a34197dff37d..7686e219f332 100644 --- a/packages/integration-tests/project.json +++ b/packages/integration-tests/project.json @@ -7,8 +7,7 @@ "implicitDependencies": ["typescript-eslint"], "targets": { "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "@nx/eslint:lint" }, "test": { "executor": "@nx/vite:test" diff --git a/packages/parser/package.json b/packages/parser/package.json index ca32c3eb4d7e..c0e124b4f28d 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -41,10 +41,10 @@ "scripts": { "build": "tsc -b tsconfig.build.json", "clean": "rimraf dist/ coverage/", - "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "npx nx lint", + "format": "yarn run -T format", + "lint": "yarn run -BT nx lint", "test": "vitest --run --config=$INIT_CWD/vitest.config.mts", - "check-types": "npx nx typecheck" + "check-types": "yarn run -BT nx typecheck" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", @@ -60,7 +60,6 @@ "devDependencies": { "@vitest/coverage-v8": "^3.1.3", "glob": "*", - "prettier": "^3.2.5", "rimraf": "*", "typescript": "*", "vitest": "^3.1.3" diff --git a/packages/parser/project.json b/packages/parser/project.json index 6b9e1efe5f09..fe0a92487dde 100644 --- a/packages/parser/project.json +++ b/packages/parser/project.json @@ -6,8 +6,7 @@ "sourceRoot": "packages/parser/src", "targets": { "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "@nx/eslint:lint" }, "test": { "executor": "@nx/vite:test" diff --git a/packages/rule-schema-to-typescript-types/package.json b/packages/rule-schema-to-typescript-types/package.json index 513496d1e58e..f2e18a13c669 100644 --- a/packages/rule-schema-to-typescript-types/package.json +++ b/packages/rule-schema-to-typescript-types/package.json @@ -25,10 +25,11 @@ "license": "MIT", "scripts": { "build": "tsc -b tsconfig.build.json", - "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "npx nx lint", + "clean": "rimraf dist/ coverage/", + "format": "yarn run -T format", + "lint": "yarn run -BT nx lint", "test": "vitest --run --config=$INIT_CWD/vitest.config.mts", - "check-types": "npx nx typecheck" + "check-types": "yarn run -BT nx typecheck" }, "dependencies": { "@typescript-eslint/type-utils": "8.32.1", diff --git a/packages/rule-schema-to-typescript-types/project.json b/packages/rule-schema-to-typescript-types/project.json index 283f31ed4538..954e08a4001c 100644 --- a/packages/rule-schema-to-typescript-types/project.json +++ b/packages/rule-schema-to-typescript-types/project.json @@ -6,8 +6,7 @@ "sourceRoot": "packages/rule-schema-to-typescript-types/src", "targets": { "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "@nx/eslint:lint" } } } diff --git a/packages/rule-tester/package.json b/packages/rule-tester/package.json index 90a565184644..1689bdd5372e 100644 --- a/packages/rule-tester/package.json +++ b/packages/rule-tester/package.json @@ -36,14 +36,13 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", - "clean": "tsc -b tsconfig.build.json --clean", - "postclean": "rimraf dist/ coverage/", - "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "npx nx lint", + "clean": "rimraf dist/ coverage/", + "format": "yarn run -T format", + "lint": "yarn run -BT 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": "vitest --run --config=$INIT_CWD/vitest.config.mts", - "check-types": "npx nx typecheck" + "check-types": "yarn run -BT nx typecheck" }, "//": "NOTE - AJV is out-of-date, but it's intentionally synced with ESLint - https://github.com/eslint/eslint/blob/ad9dd6a933fd098a0d99c6a9aa059850535c23ee/package.json#L70", "dependencies": { @@ -63,10 +62,12 @@ "@types/lodash.merge": "4.6.9", "@vitest/coverage-v8": "^3.1.3", "chai": "^5.2.0", + "eslint": "*", "eslint-visitor-keys": "^4.2.0", "espree": "^10.3.0", "esprima": "^4.0.1", "mocha": "^11.0.0", + "rimraf": "*", "sinon": "^20.0.0", "source-map-support": "^0.5.21", "typescript": "*", diff --git a/packages/rule-tester/project.json b/packages/rule-tester/project.json index cbcfa8914c33..0dfef3253a40 100644 --- a/packages/rule-tester/project.json +++ b/packages/rule-tester/project.json @@ -6,8 +6,7 @@ "sourceRoot": "packages/rule-tester/src", "targets": { "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "@nx/eslint:lint" }, "test": { "executor": "@nx/vite:test" diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index 4f586adc78a2..bba61ba408a7 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -40,11 +40,11 @@ "build": "tsc -b tsconfig.build.json", "clean": "rimraf dist/ coverage/", "clean-fixtures": "rimraf -g \"./src/**/fixtures/**/snapshots\"", - "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "generate-lib": "npx nx generate-lib repo", - "lint": "npx nx lint", + "format": "yarn run -T format", + "generate-lib": "yarn run -BT nx generate-lib repo", + "lint": "yarn run -BT nx lint", "test": "vitest --run --config=$INIT_CWD/vitest.config.mts", - "check-types": "npx nx typecheck" + "check-types": "yarn run -BT nx typecheck" }, "dependencies": { "@typescript-eslint/types": "8.32.1", @@ -55,7 +55,6 @@ "@vitest/coverage-v8": "^3.1.3", "@vitest/pretty-format": "^3.1.3", "glob": "*", - "prettier": "^3.2.5", "rimraf": "*", "typescript": "*", "vitest": "^3.1.3" diff --git a/packages/scope-manager/project.json b/packages/scope-manager/project.json index 059f34126073..ae939212a2d0 100644 --- a/packages/scope-manager/project.json +++ b/packages/scope-manager/project.json @@ -6,8 +6,7 @@ "projectType": "library", "targets": { "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "@nx/eslint:lint" }, "test": { "executor": "@nx/vite:test" diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index d6bb070d6cfd..0505936ce0b8 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -38,10 +38,10 @@ "scripts": { "build": "tsc -b tsconfig.build.json", "clean": "rimraf dist/ coverage/", - "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "npx nx lint", + "format": "yarn run -T format", + "lint": "yarn run -BT nx lint", "test": "vitest --run --config=$INIT_CWD/vitest.config.mts", - "check-types": "npx nx typecheck" + "check-types": "yarn run -BT nx typecheck" }, "dependencies": { "@typescript-eslint/typescript-estree": "8.32.1", @@ -58,7 +58,6 @@ "@vitest/coverage-v8": "^3.1.3", "ajv": "^6.12.6", "eslint": "*", - "prettier": "^3.2.5", "rimraf": "*", "typescript": "*", "vitest": "^3.1.3" diff --git a/packages/type-utils/project.json b/packages/type-utils/project.json index 8c91c0ace943..a1fe512b9900 100644 --- a/packages/type-utils/project.json +++ b/packages/type-utils/project.json @@ -6,8 +6,7 @@ "sourceRoot": "packages/type-utils/src", "targets": { "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "@nx/eslint:lint" }, "test": { "executor": "@nx/vite:test" diff --git a/packages/types/package.json b/packages/types/package.json index b64cbdeb108f..aa3254dc94e5 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -39,36 +39,15 @@ "scripts": { "copy-ast-spec": "tsx ./tools/copy-ast-spec.mts", "build": "tsc -b tsconfig.build.json", - "clean": "tsc -b tsconfig.build.json --clean", - "postclean": "rimraf dist/ src/generated/ 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", + "clean": "rimraf dist/ src/generated/ coverage/", + "format": "yarn run -T format", + "generate-lib": "yarn run -BT nx run scope-manager:generate-lib", + "lint": "yarn run -BT nx lint", "test": "vitest --run --config=$INIT_CWD/vitest.config.mts", - "check-types": "npx nx typecheck" - }, - "nx": { - "targets": { - "copy-ast-spec": { - "dependsOn": [ - "^build" - ], - "outputs": [ - "{projectRoot}/src/generated" - ], - "cache": true - }, - "build": { - "dependsOn": [ - "^build", - "copy-ast-spec" - ] - } - } + "check-types": "yarn run -BT nx typecheck" }, "devDependencies": { "@vitest/coverage-v8": "^3.1.3", - "prettier": "^3.2.5", "rimraf": "*", "tsx": "*", "typescript": "*", diff --git a/packages/types/project.json b/packages/types/project.json index da87602e0a30..e40c639f06e7 100644 --- a/packages/types/project.json +++ b/packages/types/project.json @@ -4,11 +4,17 @@ "projectType": "library", "root": "packages/types", "sourceRoot": "packages/types/src", - "implicitDependencies": ["ast-spec"], "targets": { + "copy-ast-spec": { + "dependsOn": ["ast-spec:build"], + "outputs": ["{projectRoot}/src/generated"], + "cache": true + }, + "build": { + "dependsOn": ["copy-ast-spec"] + }, "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "@nx/eslint:lint" } } } diff --git a/packages/typescript-eslint/package.json b/packages/typescript-eslint/package.json index 9eb271206573..98370ddace83 100644 --- a/packages/typescript-eslint/package.json +++ b/packages/typescript-eslint/package.json @@ -44,10 +44,10 @@ "scripts": { "build": "tsc -b tsconfig.build.json", "clean": "rimraf dist/ coverage/", - "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "nx lint", + "format": "yarn run -T format", + "lint": "yarn run -BT nx lint", "test": "vitest --run --config=$INIT_CWD/vitest.config.mts", - "check-types": "npx nx typecheck" + "check-types": "yarn run -BT nx typecheck" }, "dependencies": { "@typescript-eslint/eslint-plugin": "8.32.1", @@ -60,7 +60,6 @@ }, "devDependencies": { "@vitest/coverage-v8": "^3.1.3", - "prettier": "^3.2.5", "rimraf": "*", "typescript": "*", "vitest": "^3.1.3" diff --git a/packages/typescript-eslint/project.json b/packages/typescript-eslint/project.json index 121581ef2b13..a2f82e64ac22 100644 --- a/packages/typescript-eslint/project.json +++ b/packages/typescript-eslint/project.json @@ -6,8 +6,7 @@ "sourceRoot": "packages/typescript-eslint/src", "targets": { "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "@nx/eslint:lint" }, "test": { "executor": "@nx/vite:test" diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 958ba78b17ae..5ebc1ff50d89 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -46,10 +46,10 @@ "scripts": { "build": "tsc -b tsconfig.build.json", "clean": "rimraf dist/ coverage/", - "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "npx nx lint", + "format": "yarn run -T format", + "lint": "yarn run -BT nx lint", "test": "vitest --run --config=$INIT_CWD/vitest.config.mts", - "check-types": "npx nx typecheck" + "check-types": "yarn run -BT nx typecheck" }, "dependencies": { "@typescript-eslint/types": "8.32.1", @@ -65,7 +65,6 @@ "@types/is-glob": "^4.0.4", "@vitest/coverage-v8": "^3.1.3", "glob": "*", - "prettier": "^3.2.5", "rimraf": "*", "typescript": "*", "vitest": "^3.1.3" diff --git a/packages/typescript-estree/project.json b/packages/typescript-estree/project.json index f0c767ee7c9a..4c49900749bf 100644 --- a/packages/typescript-estree/project.json +++ b/packages/typescript-estree/project.json @@ -6,8 +6,7 @@ "sourceRoot": "packages/typescript-estree/src", "targets": { "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "@nx/eslint:lint" }, "test": { "executor": "@nx/vite:test" diff --git a/packages/utils/package.json b/packages/utils/package.json index 59cc23f0ad5a..99d3729f7cd1 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -54,12 +54,11 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", - "clean": "tsc -b tsconfig.build.json --clean", - "postclean": "rimraf dist/ coverage/", - "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "npx nx lint", + "clean": "rimraf dist/ coverage/", + "format": "yarn run -T format", + "lint": "yarn run -BT nx lint", "test": "vitest --run --config=$INIT_CWD/vitest.config.mts", - "check-types": "npx nx typecheck" + "check-types": "yarn run -BT nx typecheck" }, "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", @@ -73,7 +72,6 @@ }, "devDependencies": { "@vitest/coverage-v8": "^3.1.3", - "prettier": "^3.2.5", "rimraf": "*", "typescript": "*", "vitest": "^3.1.3" diff --git a/packages/utils/project.json b/packages/utils/project.json index b5a83f94b080..7fe1a2d09486 100644 --- a/packages/utils/project.json +++ b/packages/utils/project.json @@ -6,8 +6,7 @@ "sourceRoot": "packages/utils/src", "targets": { "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "@nx/eslint:lint" }, "test": { "executor": "@nx/vite:test", diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index 612ce782ef59..8c2574a19926 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -38,12 +38,11 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", - "clean": "tsc -b tsconfig.build.json --clean", - "postclean": "rimraf dist/ coverage/", - "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "npx nx lint", + "clean": "rimraf dist/ coverage/", + "format": "yarn run -T format", + "lint": "yarn run -BT nx lint", "test": "vitest --run --config=$INIT_CWD/vitest.config.mts", - "check-types": "npx nx typecheck" + "check-types": "yarn run -BT nx typecheck" }, "dependencies": { "@typescript-eslint/types": "8.32.1", @@ -51,7 +50,6 @@ }, "devDependencies": { "@vitest/coverage-v8": "^3.1.3", - "prettier": "^3.2.5", "rimraf": "*", "typescript": "*", "vitest": "^3.1.3" diff --git a/packages/visitor-keys/project.json b/packages/visitor-keys/project.json index 208a8c73ee21..62e1f7fee8d3 100644 --- a/packages/visitor-keys/project.json +++ b/packages/visitor-keys/project.json @@ -6,8 +6,7 @@ "sourceRoot": "packages/visitor-keys/src", "targets": { "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "@nx/eslint:lint" }, "test": { "executor": "@nx/vite:test" diff --git a/packages/website-eslint/package.json b/packages/website-eslint/package.json index 3a85f9c3b20b..fa7d8b903898 100644 --- a/packages/website-eslint/package.json +++ b/packages/website-eslint/package.json @@ -28,9 +28,10 @@ }, "scripts": { "build": "tsx ./build.mts", - "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "npx nx lint", - "check-types": "npx nx typecheck" + "clean": "rimraf dist/", + "format": "yarn run -T format", + "lint": "yarn run -BT nx lint", + "check-types": "yarn run -BT nx typecheck" }, "devDependencies": { "@eslint/js": "*", @@ -42,7 +43,7 @@ "esbuild": "~0.25.0", "eslint": "*", "esquery": "*", - "prettier": "^3.2.5", + "rimraf": "*", "tsx": "*" } } diff --git a/packages/website-eslint/project.json b/packages/website-eslint/project.json index 52ed1e539c3e..838eec579bf4 100644 --- a/packages/website-eslint/project.json +++ b/packages/website-eslint/project.json @@ -1,12 +1,12 @@ { "name": "website-eslint", "$schema": "../../node_modules/nx/schemas/project-schema.json", - "type": "library", - "implicitDependencies": [], + "projectType": "library", + "root": "packages/website-eslint", + "sourceRoot": "packages/website-eslint/src", "targets": { "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "@nx/eslint:lint" } } } diff --git a/packages/website/package.json b/packages/website/package.json index 9fdb887577ce..84e9bbf241c7 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -14,15 +14,16 @@ "scripts": { "build": "docusaurus build", "clear": "docusaurus clear", - "format": "prettier --write \"./**/*.{md,mdx,ts,js,tsx,jsx}\" --ignore-path ../../.prettierignore", + "clean": "rimraf dist/ build/ .docusaurus/ && yarn run clear", + "format": "yarn run -T format", "generate-website-dts": "tsx ./tools/generate-website-dts.mts", "stylelint": "stylelint \"src/**/*.css\"", "stylelint:fix": "stylelint \"src/**/*.css\" --fix", - "lint": "npx nx lint", + "lint": "yarn run -BT nx lint", "serve": "docusaurus serve", - "start": "npx nx start", + "start": "yarn run -BT nx start", "swizzle": "docusaurus swizzle", - "check-types": "npx nx typecheck" + "check-types": "yarn run -BT nx typecheck" }, "dependencies": { "@babel/runtime": "^7.24.4", @@ -52,9 +53,6 @@ "typedoc-plugin-markdown": "^4.6.3", "typescript": "*" }, - "resolutions": { - "react": "^18.2.0" - }, "devDependencies": { "@docusaurus/module-type-aliases": "^3.2.1", "@types/mdast": "^4.0.3", diff --git a/packages/website/project.json b/packages/website/project.json index c9b3f62d96f5..8ba9d038bdf5 100644 --- a/packages/website/project.json +++ b/packages/website/project.json @@ -1,20 +1,20 @@ { "name": "website", "$schema": "../../node_modules/nx/schemas/project-schema.json", - "type": "library", - "implicitDependencies": [], + "projectType": "library", + "root": "packages/website", + "sourceRoot": "packages/website/src", "targets": { "start": { "dependsOn": ["website-eslint:build"], "executor": "nx:run-commands", "options": { - "cwd": "packages/website", + "cwd": "{projectRoot}", "command": "docusaurus start" } }, "lint": { - "executor": "@nx/eslint:lint", - "outputs": ["{options.outputFile}"] + "executor": "@nx/eslint:lint" } } } diff --git a/project.json b/project.json index 8aa79709f045..a92e8d6ab900 100644 --- a/project.json +++ b/project.json @@ -1,10 +1,16 @@ { - "$schema": "node_modules/nx/schemas/project-schema.json", + "$schema": "./node_modules/nx/schemas/project-schema.json", "name": "repo", + "projectType": "library", + "root": ".", + "sourceRoot": ".", "// These targets are used for repo level utils and checking repo files which do not belong to specific published packages": {}, "targets": { + "clean": { + "command": "rimraf dist/ coverage/ .eslintcache" + }, "typecheck": { - "command": "tsc -b ./tsconfig.repo-config-files.json", + "command": "tsc -b tsconfig.repo-config-files.json", "dependsOn": ["types:copy-ast-spec"], "outputs": ["{workspaceRoot}/dist"] }, @@ -15,13 +21,15 @@ } }, "generate-configs": { - "command": "tsx tools/scripts/generate-configs.mts" + "command": "tsx tools/scripts/generate-configs.mts", + "dependsOn": ["eslint-plugin:build"] }, "generate-contributors": { "command": "tsx tools/scripts/generate-contributors.mts" }, "generate-lib": { - "command": "tsx tools/scripts/generate-lib.mts" + "command": "tsx tools/scripts/generate-lib.mts", + "dependsOn": ["typescript-eslint:build", "eslint-plugin-internal:build"] }, "generate-sponsors": { "command": "tsx tools/scripts/generate-sponsors.mts" diff --git a/yarn.lock b/yarn.lock index eb4c70f161e8..49103bcf9de2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -547,7 +547,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.25.4, @babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.0, @babel/parser@npm:^7.26.2": +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.0, @babel/parser@npm:^7.26.2": version: 7.27.2 resolution: "@babel/parser@npm:7.27.2" dependencies: @@ -558,6 +558,17 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.25.4": + version: 7.27.1 + resolution: "@babel/parser@npm:7.27.1" + dependencies: + "@babel/types": ^7.27.1 + bin: + parser: ./bin/babel-parser.js + checksum: 36042c744c4648a8cebf5579a0f8dc6c056648a5b017c1f1c896ce99468764dad91dfc3dd215684e0e4e648a28b62cdd2e6537b34f4a83dda01cb97a846166b0 + languageName: node + linkType: hard + "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^7.25.9": version: 7.25.9 resolution: "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:7.25.9" @@ -5500,7 +5511,6 @@ __metadata: "@vitest/utils": ^3.1.3 eslint: "*" glob: "*" - prettier: ^3.2.5 rimraf: "*" typescript: "*" vitest: ^3.1.3 @@ -5549,7 +5559,7 @@ __metadata: mdast-util-mdx: ^3.0.0 micromark-extension-mdxjs: ^3.0.0 natural-compare: ^1.4.0 - prettier: ^3.2.5 + prettier: ^3.5.3 rimraf: "*" title-case: ^4.0.0 ts-api-utils: ^2.1.0 @@ -5573,7 +5583,7 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/parser@8.32.1, @typescript-eslint/parser@workspace:*, @typescript-eslint/parser@workspace:packages/parser": +"@typescript-eslint/parser@8.32.1, @typescript-eslint/parser@workspace:*, @typescript-eslint/parser@workspace:^, @typescript-eslint/parser@workspace:packages/parser": version: 0.0.0-use.local resolution: "@typescript-eslint/parser@workspace:packages/parser" dependencies: @@ -5584,7 +5594,6 @@ __metadata: "@vitest/coverage-v8": ^3.1.3 debug: ^4.3.4 glob: "*" - prettier: ^3.2.5 rimraf: "*" typescript: "*" vitest: ^3.1.3 @@ -5620,12 +5629,14 @@ __metadata: "@vitest/coverage-v8": ^3.1.3 ajv: ^6.12.6 chai: ^5.2.0 + eslint: "*" eslint-visitor-keys: ^4.2.0 espree: ^10.3.0 esprima: ^4.0.1 json-stable-stringify-without-jsonify: ^1.0.1 lodash.merge: 4.6.2 mocha: ^11.0.0 + rimraf: "*" semver: ^7.6.0 sinon: ^20.0.0 source-map-support: ^0.5.21 @@ -5646,7 +5657,6 @@ __metadata: "@vitest/coverage-v8": ^3.1.3 "@vitest/pretty-format": ^3.1.3 glob: "*" - prettier: ^3.2.5 rimraf: "*" typescript: "*" vitest: ^3.1.3 @@ -5664,7 +5674,6 @@ __metadata: ajv: ^6.12.6 debug: ^4.3.4 eslint: "*" - prettier: ^3.2.5 rimraf: "*" ts-api-utils: ^2.1.0 typescript: "*" @@ -5680,7 +5689,6 @@ __metadata: resolution: "@typescript-eslint/types@workspace:packages/types" dependencies: "@vitest/coverage-v8": ^3.1.3 - prettier: ^3.2.5 rimraf: "*" tsx: "*" typescript: "*" @@ -5700,6 +5708,7 @@ __metadata: "@eslint/js": ^9.26.0 "@nx/devkit": 20.7.2 "@nx/eslint": 20.7.2 + "@nx/js": 20.7.2 "@nx/vite": 20.7.2 "@nx/workspace": 20.7.2 "@swc/core": ^1.4.12 @@ -5711,6 +5720,7 @@ __metadata: "@types/yargs": ^17.0.32 "@typescript-eslint/eslint-plugin": "workspace:^" "@typescript-eslint/eslint-plugin-internal": "workspace:^" + "@typescript-eslint/parser": "workspace:^" "@typescript-eslint/scope-manager": "workspace:^" "@typescript-eslint/types": "workspace:^" "@typescript-eslint/typescript-estree": "workspace:^" @@ -5735,7 +5745,6 @@ __metadata: husky: ^9.1.4 knip: ^5.41.1 lint-staged: ^15.2.2 - make-dir: ^4.0.0 markdownlint-cli: ^0.44.0 nx: 20.7.2 prettier: 3.5.0 @@ -5763,7 +5772,6 @@ __metadata: glob: "*" is-glob: ^4.0.3 minimatch: ^9.0.4 - prettier: ^3.2.5 rimraf: "*" semver: ^7.6.0 ts-api-utils: ^2.1.0 @@ -5783,7 +5791,6 @@ __metadata: "@typescript-eslint/types": 8.32.1 "@typescript-eslint/typescript-estree": 8.32.1 "@vitest/coverage-v8": ^3.1.3 - prettier: ^3.2.5 rimraf: "*" typescript: "*" vitest: ^3.1.3 @@ -5800,7 +5807,6 @@ __metadata: "@typescript-eslint/types": 8.32.1 "@vitest/coverage-v8": ^3.1.3 eslint-visitor-keys: ^4.2.0 - prettier: ^3.2.5 rimraf: "*" typescript: "*" vitest: ^3.1.3 @@ -5820,7 +5826,7 @@ __metadata: esbuild: ~0.25.0 eslint: "*" esquery: "*" - prettier: ^3.2.5 + rimraf: "*" tsx: "*" languageName: unknown linkType: soft @@ -17040,7 +17046,7 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:^3.0.0, rimraf@npm:^3.0.2": +"rimraf@npm:^3.0.2": version: 3.0.2 resolution: "rimraf@npm:3.0.2" dependencies: @@ -18655,12 +18661,10 @@ __metadata: languageName: node linkType: hard -"tmp@npm:0.2.1": - version: 0.2.1 - resolution: "tmp@npm:0.2.1" - dependencies: - rimraf: ^3.0.0 - checksum: 8b1214654182575124498c87ca986ac53dc76ff36e8f0e0b67139a8d221eaecfdec108c0e6ec54d76f49f1f72ab9325500b246f562b926f85bcdfca8bf35df9e +"tmp@npm:~0.2.1": + version: 0.2.3 + resolution: "tmp@npm:0.2.3" + checksum: 73b5c96b6e52da7e104d9d44afb5d106bb1e16d9fa7d00dbeb9e6522e61b571fbdb165c756c62164be9a3bbe192b9b268c236d370a2a0955c7689cd2ae377b95 languageName: node linkType: hard @@ -18956,7 +18960,6 @@ __metadata: "@typescript-eslint/parser": 8.32.1 "@typescript-eslint/utils": 8.32.1 "@vitest/coverage-v8": ^3.1.3 - prettier: ^3.2.5 rimraf: "*" typescript: "*" vitest: ^3.1.3
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: