Skip to content

Commit

Permalink
chore(repo): enable eslint plugin checks (#10666)
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder authored Jun 9, 2022
1 parent db49bbb commit 15c04b0
Show file tree
Hide file tree
Showing 43 changed files with 1,133 additions and 241 deletions.
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@
"@ngrx/schematics": "~13.2.0",
"@ngrx/store": "~13.2.0",
"@ngrx/store-devtools": "~13.2.0",
"@nrwl/eslint-plugin-nx": "14.2.1",
"@nrwl/jest": "14.2.1",
"@nrwl/next": "14.2.1",
"@nrwl/nx-cloud": "14.0.5",
"@nrwl/react": "14.2.1",
"@nrwl/web": "14.2.1",
"@nrwl/eslint-plugin-nx": "14.2.4",
"@nrwl/jest": "14.2.4",
"@nrwl/next": "14.2.4",
"@nrwl/nx-cloud": "14.0.8",
"@nrwl/react": "14.2.4",
"@nrwl/web": "14.2.4",
"@parcel/watcher": "2.0.4",
"@phenomnomnominal/tsquery": "4.1.1",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.1",
"@popperjs/core": "^2.9.2",
"@reduxjs/toolkit": "1.8.1",
"@reduxjs/toolkit": "1.8.2",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^20.0.0",
"@rollup/plugin-image": "^2.1.0",
Expand All @@ -86,7 +86,7 @@
"@swc-node/register": "^1.4.2",
"@swc/core": "^1.2.173",
"@swc/jest": "^0.2.20",
"@testing-library/react": "13.1.1",
"@testing-library/react": "13.3.0",
"@tippyjs/react": "^4.2.6",
"@types/css-minimizer-webpack-plugin": "^3.0.2",
"@types/cytoscape": "^3.18.2",
Expand All @@ -99,10 +99,10 @@
"@types/jasminewd2": "~2.0.3",
"@types/jest": "27.4.1",
"@types/marked": "^2.0.0",
"@types/node": "16.11.7",
"@types/node": "17.0.41",
"@types/prettier": "^2.6.2",
"@types/react": "18.0.8",
"@types/react-dom": "18.0.3",
"@types/react": "18.0.12",
"@types/react-dom": "18.0.5",
"@types/react-router-dom": "5.1.7",
"@types/semver": "^7.3.8",
"@types/tar-stream": "^2.2.2",
Expand Down Expand Up @@ -142,7 +142,7 @@
"eslint-plugin-cypress": "^2.10.3",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jsx-a11y": "6.5.1",
"eslint-plugin-react": "7.28.0",
"eslint-plugin-react": "7.30.0",
"eslint-plugin-react-hooks": "4.5.0",
"express": "4.17.2",
"file-loader": "^6.2.0",
Expand Down Expand Up @@ -189,7 +189,7 @@
"ng-packagr": "~14.0.0",
"ngrx-store-freeze": "0.2.4",
"node-fetch": "^2.6.7",
"nx": "14.2.1",
"nx": "14.2.4",
"open": "^8.4.0",
"parse-markdown-links": "^1.0.4",
"parse5": "4.0.0",
Expand All @@ -202,7 +202,7 @@
"pretty-quick": "^3.1.0",
"protractor": "5.4.3",
"raw-loader": "^4.0.2",
"react-redux": "8.0.1",
"react-redux": "8.0.2",
"react-refresh": "^0.10.0",
"react-router-dom": "6.3.0",
"react-test-renderer": "18.1.0",
Expand Down
12 changes: 12 additions & 0 deletions packages/angular/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@
"rules": {
"no-restricted-imports": ["error", "@nrwl/workspace"]
}
},
{
"files": [
"./package.json",
"./generators.json",
"./executors.json",
"./migrations.json"
],
"parser": "jsonc-eslint-parser",
"rules": {
"@nrwl/nx/nx-plugin-checks": "error"
}
}
]
}
6 changes: 5 additions & 1 deletion packages/angular/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@
"packages/angular/**/*.spec.jsx",
"packages/angular/**/*.d.ts",
"packages/angular/**/executors/**/schema.json",
"packages/angular/**/generators/**/schema.json"
"packages/angular/**/generators/**/schema.json",
"packages/angular/generators.json",
"packages/angular/executors.json",
"packages/angular/package.json",
"packages/angular/migrations.json"
]
},
"outputs": ["{options.outputFile}"]
Expand Down
12 changes: 12 additions & 0 deletions packages/cypress/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@
"rules": {
"no-restricted-imports": ["error", "@nrwl/workspace"]
}
},
{
"files": [
"./package.json",
"./generators.json",
"./executors.json",
"./migrations.json"
],
"parser": "jsonc-eslint-parser",
"rules": {
"@nrwl/nx/nx-plugin-checks": "error"
}
}
],
"ignorePatterns": ["!**/*"]
Expand Down
6 changes: 5 additions & 1 deletion packages/cypress/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@
"packages/cypress/**/*.spec.jsx",
"packages/cypress/**/*.d.ts",
"packages/cypress/**/executors/**/schema.json",
"packages/cypress/**/generators/**/schema.json"
"packages/cypress/**/generators/**/schema.json",
"packages/cypress/generators.json",
"packages/cypress/executors.json",
"packages/cypress/package.json",
"packages/cypress/migrations.json"
]
},
"outputs": ["{options.outputFile}"]
Expand Down
16 changes: 15 additions & 1 deletion packages/detox/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
{
"extends": "../../.eslintrc",
"rules": {},
"ignorePatterns": ["!**/*"]
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": [
"./package.json",
"./generators.json",
"./executors.json",
"./migrations.json"
],
"parser": "jsonc-eslint-parser",
"rules": {
"@nrwl/nx/nx-plugin-checks": "error"
}
}
]
}
6 changes: 5 additions & 1 deletion packages/detox/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
"packages/detox/**/*.spec.jsx",
"packages/detox/**/*.d.ts",
"packages/detox/**/executors/**/schema.json",
"packages/detox/**/generators/**/schema.json"
"packages/detox/**/generators/**/schema.json",
"packages/detox/generators.json",
"packages/detox/executors.json",
"packages/detox/package.json",
"packages/detox/migrations.json"
]
},
"outputs": ["{options.outputFile}"]
Expand Down
7 changes: 7 additions & 0 deletions packages/devkit/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
{
"files": ["*.js", "*.jsx"],
"rules": {}
},
{
"files": ["./package.json"],
"parser": "jsonc-eslint-parser",
"rules": {
"@nrwl/nx/nx-plugin-checks": "error"
}
}
]
}
3 changes: 2 additions & 1 deletion packages/devkit/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
"packages/devkit/**/*.spec.jsx",
"packages/devkit/**/*.d.ts",
"packages/devkit/**/executors/**/schema.json",
"packages/devkit/**/generators/**/schema.json"
"packages/devkit/**/generators/**/schema.json",
"packages/devkit/package.json"
]
},
"outputs": ["{options.outputFile}"]
Expand Down
7 changes: 4 additions & 3 deletions packages/eslint-plugin-nx/src/rules/nx-plugin-checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type Options = [
}
];

const DEFAULT_OPTIONS = {
const DEFAULT_OPTIONS: Options[0] = {
generatorsJson: 'generators.json',
executorsJson: 'executors.json',
migrationsJson: 'migrations.json',
Expand Down Expand Up @@ -96,9 +96,10 @@ export default createESLintRule<Options, MessageIds>({
if (!sourceProject) {
return {};
}

const options = normalizeOptions(sourceProject, context.options[0]);
context.options[0] = options;
const { generatorsJson, executorsJson, migrationsJson, packageJson } =
normalizeOptions(sourceProject, context.options[0]);
options;

if (
![generatorsJson, executorsJson, migrationsJson, packageJson].includes(
Expand Down
7 changes: 7 additions & 0 deletions packages/express/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@
"@angular-devkit/schematics"
]
}
},
{
"files": ["./package.json", "./generators.json", "./migrations.json"],
"parser": "jsonc-eslint-parser",
"rules": {
"@nrwl/nx/nx-plugin-checks": "error"
}
}
]
}
5 changes: 4 additions & 1 deletion packages/express/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@
"packages/express/**/*.spec.jsx",
"packages/express/**/*.d.ts",
"packages/express/**/executors/**/schema.json",
"packages/express/**/generators/**/schema.json"
"packages/express/**/generators/**/schema.json",
"packages/express/generators.json",
"packages/express/package.json",
"packages/express/migrations.json"
]
},
"outputs": ["{options.outputFile}"]
Expand Down
12 changes: 12 additions & 0 deletions packages/jest/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@
"rules": {
"no-restricted-imports": ["error", "@nrwl/workspace"]
}
},
{
"files": [
"./package.json",
"./generators.json",
"./executors.json",
"./migrations.json"
],
"parser": "jsonc-eslint-parser",
"rules": {
"@nrwl/nx/nx-plugin-checks": "error"
}
}
],
"ignorePatterns": ["!**/*"]
Expand Down
6 changes: 5 additions & 1 deletion packages/jest/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@
"packages/jest/**/*.spec.jsx",
"packages/jest/**/*.d.ts",
"packages/jest/**/executors/**/schema.json",
"packages/jest/**/generators/**/schema.json"
"packages/jest/**/generators/**/schema.json",
"packages/jest/generators.json",
"packages/jest/executors.json",
"packages/jest/package.json",
"packages/jest/migrations.json"
]
},
"outputs": ["{options.outputFile}"]
Expand Down
14 changes: 14 additions & 0 deletions packages/js/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@
{
"files": ["*.js", "*.jsx"],
"rules": {}
},
{
"files": [
"./package.json",
"./generators.json",
"./executors.json",
"./generators.json",
"./executors.json",
"./migrations.json"
],
"parser": "jsonc-eslint-parser",
"rules": {
"@nrwl/nx/nx-plugin-checks": "error"
}
}
]
}
6 changes: 5 additions & 1 deletion packages/js/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
"lintFilePatterns": [
"packages/js/**/*.ts",
"packages/js/**/executors/**/schema.json",
"packages/js/**/generators/**/schema.json"
"packages/js/**/generators/**/schema.json",
"packages/js/generators.json",
"packages/js/executors.json",
"packages/js/package.json",
"packages/js/migrations.json"
]
}
},
Expand Down
12 changes: 12 additions & 0 deletions packages/linter/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@
"rules": {
"no-restricted-imports": ["error", "@nrwl/workspace"]
}
},
{
"files": [
"./package.json",
"./generators.json",
"./executors.json",
"./migrations.json"
],
"parser": "jsonc-eslint-parser",
"rules": {
"@nrwl/nx/nx-plugin-checks": "error"
}
}
],
"ignorePatterns": ["!**/*"]
Expand Down
8 changes: 7 additions & 1 deletion packages/linter/migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,15 @@
},
"add-swc-deps": {
"cli": "nx",
"version": "14-1-9-beta.0",
"version": "14.1.9-beta.0",
"description": "Adds @swc/core and @swc-node as a dev dep if you are using them",
"factory": "./src/migrations/update-14-1-9/add-swc-deps-if-needed"
},
"add-swc-deps-again": {
"cli": "nx",
"version": "14.2.3-beta.0",
"description": "Adds @swc/core and @swc-node as a dev dep if you are using them (repeated due to prior mistake)",
"factory": "./src/migrations/update-14-1-9/add-swc-deps-if-needed"
}
},
"packageJsonUpdates": {
Expand Down
6 changes: 5 additions & 1 deletion packages/linter/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@
"packages/linter/**/*.spec.jsx",
"packages/linter/**/*.d.ts",
"packages/linter/**/executors/**/schema.json",
"packages/linter/**/generators/**/schema.json"
"packages/linter/**/generators/**/schema.json",
"packages/linter/generators.json",
"packages/linter/executors.json",
"packages/linter/package.json",
"packages/linter/migrations.json"
]
},
"outputs": ["{options.outputFile}"]
Expand Down
7 changes: 7 additions & 0 deletions packages/nest/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@
"@nrwl/workspace"
]
}
},
{
"files": ["./package.json", "./generators.json", "./migrations.json"],
"parser": "jsonc-eslint-parser",
"rules": {
"@nrwl/nx/nx-plugin-checks": "error"
}
}
]
}
5 changes: 4 additions & 1 deletion packages/nest/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@
"packages/nest/**/*.spec.jsx",
"packages/nest/**/*.d.ts",
"packages/nest/**/executors/**/schema.json",
"packages/nest/**/generators/**/schema.json"
"packages/nest/**/generators/**/schema.json",
"packages/nest/generators.json",
"packages/nest/package.json",
"packages/nest/migrations.json"
]
},
"outputs": ["{options.outputFile}"]
Expand Down
Loading

1 comment on commit 15c04b0

@vercel
Copy link

@vercel vercel bot commented on 15c04b0 Jun 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-five.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx.dev
nx-dev-nrwl.vercel.app

Please sign in to comment.