Skip to content

Commit

Permalink
chore(tools/*,scripts/*): enable nx plugins with project crystal for …
Browse files Browse the repository at this point in the history
…non production projects (microsoft#32337)
  • Loading branch information
Hotell authored Aug 23, 2024
1 parent 4d9fd75 commit 3b62661
Show file tree
Hide file tree
Showing 27 changed files with 28 additions and 61 deletions.
28 changes: 25 additions & 3 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
"test": {
"dependsOn": [],
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
"cache": true
"cache": true,
"options": {
"passWithNoTests": true
}
},
"test-integration": {
"dependsOn": ["build", "^build"],
Expand Down Expand Up @@ -73,7 +76,10 @@
"{workspaceRoot}/.eslintrc.json",
"{workspaceRoot}/.eslintignore",
"{workspaceRoot}/eslint.config.js"
]
],
"options": {
"command": "eslint src"
}
},
"verify-packaging": {
"dependsOn": ["build"],
Expand Down Expand Up @@ -116,5 +122,21 @@
},
"parallel": 3,
"useInferencePlugins": false,
"defaultBase": "master"
"defaultBase": "master",
"plugins": [
{
"plugin": "@nx/jest/plugin",
"options": {
"targetName": "test"
},
"include": ["tools/**/*", "scripts/**/*"]
},
{
"plugin": "@nx/eslint/plugin",
"options": {
"targetName": "lint"
},
"include": ["tools/**/*", "scripts/**/*"]
}
]
}
2 changes: 0 additions & 2 deletions scripts/api-extractor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
"lint": "eslint --ext .ts,.js ./src",
"test": "jest --passWithNoTests",
"type-check": "just-scripts type-check"
},
"dependencies": {},
Expand Down
2 changes: 0 additions & 2 deletions scripts/babel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
"lint": "eslint --ext .ts,.js ./src",
"test": "jest --passWithNoTests",
"type-check": "just-scripts type-check"
},
"dependencies": {},
Expand Down
2 changes: 0 additions & 2 deletions scripts/beachball/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
"lint": "eslint --ext .ts,.js ./src",
"test": "jest --passWithNoTests",
"type-check": "just-scripts type-check"
},
"dependencies": {
Expand Down
2 changes: 0 additions & 2 deletions scripts/cypress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
"lint": "eslint --ext .ts,.js ./src",
"test": "jest --passWithNoTests",
"type-check": "just-scripts type-check"
},
"dependencies": {},
Expand Down
2 changes: 0 additions & 2 deletions scripts/dangerjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
"lint": "eslint --ext .ts,.js ./src",
"test": "jest --passWithNoTests",
"type-check": "just-scripts type-check"
},
"dependencies": {
Expand Down
2 changes: 0 additions & 2 deletions scripts/executors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
"lint": "eslint --ext .ts,.js ./src",
"test": "jest --passWithNoTests",
"type-check": "just-scripts type-check"
},
"dependencies": {
Expand Down
2 changes: 0 additions & 2 deletions scripts/github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
"lint": "eslint --ext .ts,.js ./src",
"test": "jest --passWithNoTests",
"type-check": "just-scripts type-check"
},
"dependencies": {},
Expand Down
2 changes: 0 additions & 2 deletions scripts/gulp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
"lint": "eslint --ext .ts,.js ./src",
"test": "jest --passWithNoTests",
"type-check": "just-scripts type-check"
},
"dependencies": {
Expand Down
2 changes: 0 additions & 2 deletions scripts/jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
"lint": "eslint --ext .ts,.js ./src",
"test": "jest --passWithNoTests",
"type-check": "just-scripts type-check"
},
"dependencies": {
Expand Down
2 changes: 0 additions & 2 deletions scripts/lint-staged/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
"lint": "eslint --ext .ts,.js ./src",
"test": "jest --passWithNoTests",
"type-check": "just-scripts type-check"
},
"dependencies": {
Expand Down
1 change: 1 addition & 0 deletions scripts/monorepo/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = {
'^.+\\.tsx?$': ['@swc/jest', {}],
},
coverageDirectory: './coverage',
testTimeout: 20000,
testEnvironment: 'node',
setupFiles: ['<rootDir>/jest-setup.js'],
};
2 changes: 0 additions & 2 deletions scripts/monorepo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
"lint": "eslint --ext .ts,.js ./src",
"test": "jest --passWithNoTests",
"type-check": "just-scripts type-check"
},
"dependencies": {
Expand Down
2 changes: 0 additions & 2 deletions scripts/package-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
"lint": "eslint --ext .ts,.js ./src",
"test": "jest --passWithNoTests",
"type-check": "just-scripts type-check"
},
"dependencies": {},
Expand Down
2 changes: 0 additions & 2 deletions scripts/perf-test-flamegrill/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
"lint": "eslint --ext .ts,.js ./src",
"test": "jest --passWithNoTests",
"type-check": "just-scripts type-check"
},
"peerDependencies": {
Expand Down
2 changes: 0 additions & 2 deletions scripts/prettier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
"lint": "eslint --ext .ts,.js ./src",
"test": "jest --passWithNoTests",
"type-check": "just-scripts type-check"
},
"dependencies": {
Expand Down
2 changes: 0 additions & 2 deletions scripts/projects-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
"lint": "eslint --ext .ts,.js ./src",
"test": "jest --passWithNoTests",
"type-check": "just-scripts type-check"
},
"dependencies": {
Expand Down
2 changes: 0 additions & 2 deletions scripts/puppeteer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
"lint": "eslint --ext .ts,.js ./src",
"test": "jest --passWithNoTests",
"type-check": "just-scripts type-check"
},
"dependencies": {},
Expand Down
2 changes: 0 additions & 2 deletions scripts/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
"lint": "eslint --ext .ts,.js ./src",
"test": "jest --passWithNoTests",
"type-check": "just-scripts type-check"
},
"dependencies": {
Expand Down
2 changes: 0 additions & 2 deletions scripts/tasks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
"lint": "eslint --ext .ts,.js ./src",
"test": "jest --passWithNoTests",
"type-check": "just-scripts type-check"
},
"dependencies": {
Expand Down
2 changes: 0 additions & 2 deletions scripts/triage-bot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
"lint": "eslint --ext .ts,.js ./src",
"test": "jest --passWithNoTests",
"type-check": "just-scripts type-check"
},
"dependencies": {},
Expand Down
2 changes: 0 additions & 2 deletions scripts/ts-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
"lint": "eslint --ext .ts,.js ./src",
"test": "jest --passWithNoTests",
"type-check": "just-scripts type-check"
},
"dependencies": {},
Expand Down
2 changes: 0 additions & 2 deletions scripts/update-release-notes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
"lint": "eslint --ext .ts,.js ./src",
"test": "jest --passWithNoTests",
"type-check": "just-scripts type-check"
},
"dependencies": {
Expand Down
2 changes: 0 additions & 2 deletions scripts/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
"lint": "eslint --ext .ts,.js ./src",
"test": "jest --passWithNoTests",
"type-check": "just-scripts type-check"
},
"dependencies": {},
Expand Down
2 changes: 0 additions & 2 deletions scripts/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
"lint": "eslint --ext .ts,.js ./src",
"test": "jest --passWithNoTests",
"type-check": "just-scripts type-check"
},
"dependencies": {
Expand Down
12 changes: 2 additions & 10 deletions tools/eslint-rules/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "tools/eslint-rules",
"projectType": "library",
"targets": {
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "tools/eslint-rules/jest.config.ts"
}
}
},
"tags": ["platform:node", "tools"]
"tags": ["platform:node", "tools"],
"targets": {}
}
2 changes: 0 additions & 2 deletions tools/workspace-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"generators": "./generators.json",
"executors": "./executors.json",
"scripts": {
"test": "jest --passWithNoTests",
"type-check": "node ./scripts/type-check.mjs",
"lint": "eslint --ext .ts,.js,.json .",
"check-graph": "node ./scripts/check-dep-graph.js"
},
"dependencies": {
Expand Down

0 comments on commit 3b62661

Please sign in to comment.