Skip to content

Commit 5f8b38f

Browse files
refactor: add nx dependency check eslint rule
1 parent c3ab930 commit 5f8b38f

File tree

7 files changed

+49
-22
lines changed

7 files changed

+49
-22
lines changed

packages/data-migration/.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"files": ["./package.json", "./generators.json", "./executors.json"],
1919
"parser": "jsonc-eslint-parser",
2020
"rules": {
21-
"@nx/nx-plugin-checks": "error"
21+
"@nx/nx-plugin-checks": "error",
22+
"@nx/dependency-checks": "error"
2223
}
2324
}
2425
]

packages/data-migration/package.json

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,28 @@
1616
"access": "public"
1717
},
1818
"dependencies": {
19-
"tslib": "^2.3.0"
19+
"tslib": "^2.3.0",
20+
"@nx/devkit": "17.2.6",
21+
"@nx/js": "17.2.6",
22+
"@nxlv/util": "*",
23+
"glob": "^10.2.6",
24+
"@aws-sdk/client-dynamodb": "^3.348.0",
25+
"@aws-sdk/client-dynamodb-streams": "^3.348.0",
26+
"@aws-sdk/client-lambda": "^3.348.0",
27+
"@aws-sdk/client-iam": "^3.348.0",
28+
"@aws-sdk/client-ssm": "^3.348.0",
29+
"aws-sdk-client-mock-jest": "^2.1.1",
30+
"aws-sdk-client-mock": "^2.1.1",
31+
"esbuild": "0.19.10",
32+
"archiver": "^5.3.1",
33+
"lodash": "4.17.21",
34+
"chalk": "^4.1.1",
35+
"@aws-sdk/client-ecs": "^3.348.0",
36+
"dynamoose": "^3.2.0",
37+
"@aws-sdk/client-sts": "^3.348.0",
38+
"@aws-sdk/client-ecr": "^3.348.0",
39+
"@aws-sdk/client-cloudwatch-logs": "^3.348.0",
40+
"cross-spawn": "^7.0.3",
41+
"prompts": "^2.4.2"
2042
}
2143
}

packages/nx-python/.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
],
2424
"parser": "jsonc-eslint-parser",
2525
"rules": {
26-
"@nx/nx-plugin-checks": "error"
26+
"@nx/nx-plugin-checks": "error",
27+
"@nx/dependency-checks": "error"
2728
}
2829
}
2930
]

packages/nx-python/README.md

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,6 @@ The `derived` option uses the combination of the workspace layout, `--directory`
5454
Example 1: `nx generate @nxlv/python:poetry-project myproject` will generate the project in the `apps/myproject` folder with the name `myproject`.
5555
Example 2: `nx generate @nxlv/python:poetry-project myproject --directory=api` will generate the project in the `apps/api/myproject` folder with the name `api-myproject`.
5656

57-
**NOTE**: The `derived` option is the default option for now, however, the `as-provided` option will be the default option in the future.
58-
59-
To make the `as-provided` option the default option, add the following configuration in the `nx.json` file:
60-
61-
```json
62-
{
63-
...
64-
"generators": {
65-
"@nxlv/python:poetry-project": {
66-
"projectNameAndRootFormat": "as-provided"
67-
}
68-
}
69-
...
70-
}
71-
```
72-
7357
Nx documentation reference: <https://nx.dev/deprecated/as-provided-vs-derived#project-generators>
7458

7559
#### Options
@@ -95,7 +79,7 @@ Nx documentation reference: <https://nx.dev/deprecated/as-provided-vs-derived#pr
9579
| `--codeCoverageHtmlReport` | `boolean` | Enable Code Coverage HTML Reports | `false` | `true` |
9680
| `--codeCoverageXmlReport` | `boolean` | Enable Code Coverage XML Reports | `false` | `true` |
9781
| `--codeCoverageThreshold` | `number` | Minimum Code Coverage Threshold | `false` | N/A |
98-
| `--projectNameAndRootFormat` | `string` | Whether to generate the project name and root directory as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`). | `false` | `derived` |
82+
| `--projectNameAndRootFormat` | `string` | Whether to generate the project name and root directory as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`). | `false` | `as-provided` |
9983

10084
##### rootPyprojectDependencyGroup
10185

packages/nx-python/package.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,18 @@
1212
"directory": "packages/nx-python"
1313
},
1414
"peerDependencies": {
15-
"@nx/devkit": "^17.0.0"
15+
"@nx/devkit": "^17.0.0",
16+
"chalk": "^4.1.1",
17+
"fs-extra": "^11.1.0",
18+
"@iarna/toml": "^2.2.5",
19+
"mock-fs": "^5.2.0",
20+
"string-dedent": "^3.0.1",
21+
"uuid": "^9.0.0",
22+
"file-uri-to-path": "^2.0.0",
23+
"cross-spawn": "^7.0.3",
24+
"nx": "17.2.6",
25+
"command-exists": "^1.2.9",
26+
"lodash": "4.17.21"
1627
},
1728
"dependencies": {
1829
"tslib": "^2.3.0"

packages/util/.eslintrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
{
1414
"files": ["*.js", "*.jsx"],
1515
"rules": {}
16+
},
17+
{
18+
"files": ["*.json"],
19+
"parser": "jsonc-eslint-parser",
20+
"rules": {
21+
"@nx/dependency-checks": "error"
22+
}
1623
}
1724
]
1825
}

packages/util/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"access": "public"
1515
},
1616
"dependencies": {
17-
"tslib": "^2.3.0"
17+
"tslib": "^2.3.0",
18+
"lodash": "4.17.21"
1819
}
1920
}

0 commit comments

Comments
 (0)