Skip to content

Commit

Permalink
feat: add eslint @nx/dependency-checks rule
Browse files Browse the repository at this point in the history
  • Loading branch information
temarusanov committed Sep 30, 2023
1 parent 019ee30 commit 52f91f0
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 21 deletions.
4 changes: 3 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ module.exports = [
...compat.config({ parser: 'jsonc-eslint-parser' }).map((config) => ({
...config,
files: ['**/*.json'],
rules: {},
rules: {
'@nx/dependency-checks': 'error',
},
})),
];
7 changes: 6 additions & 1 deletion libs/external/health-checks/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"name": "@tematools/health-checks",
"version": "2.0.0"
"version": "2.0.0",
"dependencies": {
"@golevelup/nestjs-discovery": "4.0.0",
"@nestjs/common": "10.2.5",
"@nestjs/core": "10.2.5"
}
}
5 changes: 2 additions & 3 deletions libs/external/health-checks/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
"outputPath": "dist/libs/external/health-checks",
"main": "libs/external/health-checks/src/index.ts",
"tsConfig": "libs/external/health-checks/tsconfig.lib.json",
"assets": ["libs/external/health-checks/*.md"],
"updateBuildableProjectDepsInPackageJson": true
"assets": ["libs/external/health-checks/*.md"]
}
},
"publish": {
Expand All @@ -30,7 +29,7 @@
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/external/health-checks/**/*.ts"]
"lintFilePatterns": ["libs/external/health-checks/**/*.ts", "libs/external/health-checks/package.json"]
}
},
"test": {
Expand Down
7 changes: 6 additions & 1 deletion libs/external/logger/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"name": "@tematools/logger",
"version": "0.1.1"
"version": "0.1.1",
"dependencies": {
"chalk": "^4.1.2",
"env-var": "^7.4.1",
"micromatch": "^4.0.5"
}
}
28 changes: 20 additions & 8 deletions libs/external/logger/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,22 @@
"build": {
"clean": true,
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"outputs": [
"{options.outputPath}"
],
"options": {
"outputPath": "dist/libs/external/logger",
"main": "libs/external/logger/src/index.ts",
"tsConfig": "libs/external/logger/tsconfig.lib.json",
"assets": ["libs/external/logger/*.md"],
"updateBuildableProjectDepsInPackageJson": true
"assets": [
"libs/external/logger/*.md"
]
}
},
"publish": {
"dependsOn": ["build"],
"dependsOn": [
"build"
],
"command": "node tools/scripts/publish.mjs logger {args.ver} {args.tag}"
},
"version": {
Expand All @@ -28,14 +33,21 @@
},
"lint": {
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"outputs": [
"{options.outputFile}"
],
"options": {
"lintFilePatterns": ["libs/external/logger/**/*.ts"]
"lintFilePatterns": [
"libs/external/logger/**/*.ts",
"libs/external/logger/package.json"
]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"outputs": [
"{workspaceRoot}/coverage/{projectRoot}"
],
"options": {
"jestConfig": "libs/external/logger/jest.config.ts",
"passWithNoTests": true
Expand All @@ -49,4 +61,4 @@
}
},
"tags": []
}
}
10 changes: 9 additions & 1 deletion libs/external/nats/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{
"name": "@tematools/nats",
"version": "1.0.0"
"version": "1.0.0",
"dependencies": {
"@golevelup/nestjs-discovery": "4.0.0",
"@nestjs/common": "10.2.5",
"@nestjs/core": "10.2.5",
"@tematools/health-checks": "^2.0.0",
"lodash": "4.17.21",
"nats": "^2.16.0"
}
}
5 changes: 2 additions & 3 deletions libs/external/nats/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
"outputPath": "dist/libs/external/nats",
"main": "libs/external/nats/src/index.ts",
"tsConfig": "libs/external/nats/tsconfig.lib.json",
"assets": ["libs/external/nats/*.md"],
"updateBuildableProjectDepsInPackageJson": true
"assets": ["libs/external/nats/*.md"]
}
},
"publish": {
Expand All @@ -30,7 +29,7 @@
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/external/nats/**/*.ts"]
"lintFilePatterns": ["libs/external/nats/**/*.ts", "libs/external/nats/package.json"]
}
},
"test": {
Expand Down
9 changes: 8 additions & 1 deletion libs/external/schematics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,12 @@
"version": "1.0.1",
"main": "src/index.js",
"generators": "./generators.json",
"executors": "./executors.json"
"executors": "./executors.json",
"dependencies": {
"@actions/exec": "^1.1.1",
"@nx/devkit": "16.8.1",
"@nx/js": "16.8.1",
"typescript": "^5.1.6",
"@nx/linter": "16.8.1"
}
}
4 changes: 2 additions & 2 deletions libs/external/schematics/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
"glob": "executors.json",
"output": "."
}
],
"updateBuildableProjectDepsInPackageJson": true
]
}
},
"publish": {
Expand All @@ -56,6 +55,7 @@
"libs/external/schematics/**/*.ts",
"libs/external/schematics/generators.json",
"libs/external/schematics/executors.json",
"libs/external/schematics/package.json",
"libs/external/schematics/package.json"
]
}
Expand Down

0 comments on commit 52f91f0

Please sign in to comment.