diff --git a/nx.json b/nx.json index d5b11cdfb5a7..ed1f57517e12 100644 --- a/nx.json +++ b/nx.json @@ -18,7 +18,7 @@ "default": { "runner": "@nrwl/nx-cloud", "options": { - "cacheableOperations": ["build", "test", "package", "prebuild"], + "cacheableOperations": ["build", "lint", "package", "prebuild", "test"], "accessToken": "YjFjNTBhOWUtY2JmNy00ZDhiLWE5N2UtZjliNDAwNmIzOTdjfHJlYWQtd3JpdGU=", "canTrackAnalytics": false, "showUsageWarnings": true, diff --git a/package.json b/package.json index aa76fc54295b..bddf6b4fe48c 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "lint-fix": "eslint . --fix", "lint-markdown-fix": "yarn lint-markdown --fix", "lint-markdown": "markdownlint \"**/*.md\" --config=.markdownlint.json --ignore-path=.markdownlintignore", - "lint": "cross-env NODE_OPTIONS=\"--max-old-space-size=16384\" eslint .", + "lint": "nx run-many --target=lint --all --parallel", "postinstall": "yarn patch-package && yarn husky install && yarn build", "pre-commit": "yarn lint-staged", "start": "nx run website:start", diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 19a595262da8..e20454370542 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -34,7 +34,7 @@ "postclean": "rimraf dist && rimraf _ts3.4 && rimraf .rollup.cache && rimraf 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": "eslint . --ignore-path='../../.eslintignore'", + "lint": "nx lint @typescript-eslint/ast-spec", "test": "jest", "typecheck": "tsc -p tsconfig.json --noEmit" }, diff --git a/packages/ast-spec/project.json b/packages/ast-spec/project.json index 24256b3e4d0b..b892bb3fae01 100644 --- a/packages/ast-spec/project.json +++ b/packages/ast-spec/project.json @@ -1,5 +1,14 @@ { "$schema": "../../node_modules/nx/schemas/project-schema.json", "type": "library", - "implicitDependencies": [] + "implicitDependencies": [], + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["packages/ast-spec/**/*.ts"] + } + } + } } diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index b9047517e16e..62373f12d54b 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -8,7 +8,7 @@ "clean": "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": "eslint . --ignore-path='../../.eslintignore'", + "lint": "nx lint @typescript-eslint/eslint-plugin-internal", "test": "jest --coverage", "typecheck": "tsc -p tsconfig.json --noEmit" }, diff --git a/packages/eslint-plugin-internal/project.json b/packages/eslint-plugin-internal/project.json index 24256b3e4d0b..803b12f53227 100644 --- a/packages/eslint-plugin-internal/project.json +++ b/packages/eslint-plugin-internal/project.json @@ -1,5 +1,14 @@ { "$schema": "../../node_modules/nx/schemas/project-schema.json", "type": "library", - "implicitDependencies": [] + "implicitDependencies": [], + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["packages/eslint-plugin-internal/**/*.ts"] + } + } + } } diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index d69678024c80..e852bcd509e4 100644 --- a/packages/eslint-plugin-tslint/package.json +++ b/packages/eslint-plugin-tslint/package.json @@ -33,7 +33,7 @@ "clean": "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": "eslint . --ignore-path='../../.eslintignore'", + "lint": "nx lint @typescript-eslint/eslint-plugin-tslint", "test": "jest --coverage", "typecheck": "tsc -p tsconfig.json --noEmit" }, diff --git a/packages/eslint-plugin-tslint/project.json b/packages/eslint-plugin-tslint/project.json index 24256b3e4d0b..6f6c19ca7c58 100644 --- a/packages/eslint-plugin-tslint/project.json +++ b/packages/eslint-plugin-tslint/project.json @@ -1,5 +1,14 @@ { "$schema": "../../node_modules/nx/schemas/project-schema.json", "type": "library", - "implicitDependencies": [] + "implicitDependencies": [], + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["packages/eslint-plugin-tslint/**/*.ts"] + } + } + } } diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 0e2ab6e436a5..28562d7650af 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -39,7 +39,7 @@ "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "generate:breaking-changes": "../../node_modules/.bin/ts-node tools/generate-breaking-changes.ts", "generate:configs": "../../node_modules/.bin/ts-node tools/generate-configs.ts", - "lint": "eslint . --ignore-path ../../.eslintignore", + "lint": "nx lint @typescript-eslint/eslint-plugin", "test": "jest --coverage", "typecheck": "tsc -p tsconfig.json --noEmit" }, diff --git a/packages/eslint-plugin/project.json b/packages/eslint-plugin/project.json index 24256b3e4d0b..d3a8c23a138f 100644 --- a/packages/eslint-plugin/project.json +++ b/packages/eslint-plugin/project.json @@ -1,5 +1,14 @@ { "$schema": "../../node_modules/nx/schemas/project-schema.json", "type": "library", - "implicitDependencies": [] + "implicitDependencies": [], + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["packages/eslint-plugin/**/*.ts"] + } + } + } } diff --git a/packages/experimental-utils/package.json b/packages/experimental-utils/package.json index 901b63d2f303..9b89e1965ef6 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -34,7 +34,7 @@ "clean": "tsc -b tsconfig.build.json --clean", "postclean": "rimraf dist && rimraf _ts3.4 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "eslint . --ignore-path='../../.eslintignore'", + "lint": "nx lint @typescript-eslint/experimental-utils", "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { diff --git a/packages/experimental-utils/project.json b/packages/experimental-utils/project.json index 24256b3e4d0b..415df390d359 100644 --- a/packages/experimental-utils/project.json +++ b/packages/experimental-utils/project.json @@ -1,5 +1,14 @@ { "$schema": "../../node_modules/nx/schemas/project-schema.json", "type": "library", - "implicitDependencies": [] + "implicitDependencies": [], + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["packages/experimental-utils/**/*.ts"] + } + } + } } diff --git a/packages/parser/package.json b/packages/parser/package.json index 23ac485be0fd..7bf78fe1f59e 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -37,7 +37,7 @@ "clean": "tsc -b tsconfig.build.json --clean", "postclean": "rimraf dist && rimraf _ts3.4 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "eslint . --ignore-path='../../.eslintignore'", + "lint": "nx lint @typescript-eslint/parser", "test": "jest --coverage", "typecheck": "tsc -p tsconfig.json --noEmit" }, diff --git a/packages/parser/project.json b/packages/parser/project.json index 24256b3e4d0b..10eb8732ea1e 100644 --- a/packages/parser/project.json +++ b/packages/parser/project.json @@ -1,5 +1,14 @@ { "$schema": "../../node_modules/nx/schemas/project-schema.json", "type": "library", - "implicitDependencies": [] + "implicitDependencies": [], + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["packages/parser/**/*.ts"] + } + } + } } diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index bc611e14e689..996299712b6b 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -33,7 +33,7 @@ "clean-fixtures": "cd ../../ && nx clean-fixtures @typescript-eslint/scope-manager", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "generate:lib": "cd ../../ && nx generate-lib @typescript-eslint/scope-manager", - "lint": "cd ../../ && nx lint @typescript-eslint/scope-manager", + "lint": "nx lint @typescript-eslint/scope-manager", "test": "cd ../../ && nx test @typescript-eslint/scope-manager --code-coverage", "typecheck": "cd ../../ && nx typecheck @typescript-eslint/scope-manager" }, diff --git a/packages/scope-manager/project.json b/packages/scope-manager/project.json index 1868938a6ac6..efaf69f925c5 100644 --- a/packages/scope-manager/project.json +++ b/packages/scope-manager/project.json @@ -55,8 +55,7 @@ "executor": "@nrwl/linter:eslint", "outputs": ["{options.outputFile}"], "options": { - "lintFilePatterns": ["packages/scope-manager/**/*.{ts,js}"], - "ignorePath": ".eslintignore" + "lintFilePatterns": ["packages/scope-manager/**/*.ts"] } }, "test": { diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index f72272dd3496..9ecfc33fe5c1 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -34,7 +34,7 @@ "clean": "tsc -b tsconfig.build.json --clean", "postclean": "rimraf dist && rimraf _ts3.4 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "eslint . --ignore-path='../../.eslintignore'", + "lint": "nx lint @typescript-eslint/type-utils", "test": "jest --coverage", "typecheck": "tsc -p tsconfig.json --noEmit" }, diff --git a/packages/type-utils/project.json b/packages/type-utils/project.json index 24256b3e4d0b..efc70d52332f 100644 --- a/packages/type-utils/project.json +++ b/packages/type-utils/project.json @@ -1,5 +1,14 @@ { "$schema": "../../node_modules/nx/schemas/project-schema.json", "type": "library", - "implicitDependencies": [] + "implicitDependencies": [], + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["packages/type-utils/**/*.ts"] + } + } + } } diff --git a/packages/types/package.json b/packages/types/package.json index 8b591cd2e0f5..72d9efb088c0 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -36,7 +36,7 @@ "postclean": "rimraf dist && rimraf _ts3.4 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "generate:lib": "../../node_modules/.bin/ts-node --files --transpile-only ../scope-manager/tools/generate-lib.ts", - "lint": "eslint . --ignore-path='../../.eslintignore'", + "lint": "nx lint @typescript-eslint/types", "typecheck": "tsc -p tsconfig.json --noEmit" }, "nx": { diff --git a/packages/types/project.json b/packages/types/project.json index 3719aa0608b9..968c1ed0e23e 100644 --- a/packages/types/project.json +++ b/packages/types/project.json @@ -1,5 +1,14 @@ { "$schema": "../../node_modules/nx/schemas/project-schema.json", "type": "library", - "implicitDependencies": ["@typescript-eslint/ast-spec"] + "implicitDependencies": ["@typescript-eslint/ast-spec"], + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["packages/types/**/*.ts"] + } + } + } } diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index f28d6d17f76b..4df72039108b 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -37,7 +37,7 @@ "clean": "tsc -b tsconfig.build.json --clean", "postclean": "rimraf dist && rimraf _ts3.4 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "eslint . --ignore-path='../../.eslintignore'", + "lint": "nx lint @typescript-eslint/typescript-estree", "test": "jest --coverage", "typecheck": "tsc -p tsconfig.json --noEmit" }, diff --git a/packages/typescript-estree/project.json b/packages/typescript-estree/project.json index edfec5ab524e..61848afaa648 100644 --- a/packages/typescript-estree/project.json +++ b/packages/typescript-estree/project.json @@ -1,5 +1,14 @@ { "$schema": "../../node_modules/nx/schemas/project-schema.json", "type": "library", - "implicitDependencies": ["@typescript-eslint/types"] + "implicitDependencies": ["@typescript-eslint/types"], + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["packages/typescript-estree/**/*.ts"] + } + } + } } diff --git a/packages/utils/package.json b/packages/utils/package.json index ad353bce00e8..c357e13fe3e1 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -34,7 +34,7 @@ "clean": "tsc -b tsconfig.build.json --clean", "postclean": "rimraf dist && rimraf _ts3.4 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "eslint . --ignore-path='../../.eslintignore'", + "lint": "nx lint @typescript-eslint/utils", "test": "jest --coverage", "typecheck": "tsc -p tsconfig.json --noEmit" }, diff --git a/packages/utils/project.json b/packages/utils/project.json index 24256b3e4d0b..7ef570436b4c 100644 --- a/packages/utils/project.json +++ b/packages/utils/project.json @@ -1,5 +1,14 @@ { "$schema": "../../node_modules/nx/schemas/project-schema.json", "type": "library", - "implicitDependencies": [] + "implicitDependencies": [], + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["packages/utils/**/*.ts"] + } + } + } } diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index 62a831366875..554d8b957364 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -34,7 +34,7 @@ "clean": "tsc -b tsconfig.build.json --clean", "postclean": "rimraf dist && rimraf _ts3.4 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "eslint . --ignore-path='../../.eslintignore'", + "lint": "nx lint @typescript-eslint/visitor-keys", "test": "jest --coverage", "typecheck": "tsc -p tsconfig.json --noEmit" }, diff --git a/packages/visitor-keys/project.json b/packages/visitor-keys/project.json index 24256b3e4d0b..c7e3401148e7 100644 --- a/packages/visitor-keys/project.json +++ b/packages/visitor-keys/project.json @@ -1,5 +1,14 @@ { "$schema": "../../node_modules/nx/schemas/project-schema.json", "type": "library", - "implicitDependencies": [] + "implicitDependencies": [], + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["packages/visitor-keys/**/*.ts"] + } + } + } } diff --git a/packages/website/package.json b/packages/website/package.json index 5232068f58ab..ca83be0a26f3 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -6,7 +6,7 @@ "build": "docusaurus build", "clear": "docusaurus clear", "format": "prettier --write \"./**/*.{md,mdx,ts,js,tsx,jsx}\" --ignore-path ../../.prettierignore", - "lint": "eslint . --ignore-path ../../.eslintignore", + "lint": "nx lint website", "serve": "docusaurus serve", "start": "docusaurus start", "swizzle": "docusaurus swizzle", diff --git a/packages/website/project.json b/packages/website/project.json index 24256b3e4d0b..a9f414356b18 100644 --- a/packages/website/project.json +++ b/packages/website/project.json @@ -1,5 +1,14 @@ { "$schema": "../../node_modules/nx/schemas/project-schema.json", "type": "library", - "implicitDependencies": [] + "implicitDependencies": [], + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["packages/website/**/*.ts"] + } + } + } }