Skip to content

Commit ce4fadb

Browse files
authored
chore: add zod2md-nx-plugin (#1162)
1 parent 270b474 commit ce4fadb

16 files changed

+510
-127
lines changed

eslint.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,4 +163,18 @@ export default tseslint.config(
163163
],
164164
},
165165
},
166+
{
167+
// in bin files, imports with side effects are allowed
168+
files: ['**/bin/**/*.ts', '**/bin/**/*.js'],
169+
rules: {
170+
'import/no-unassigned-import': 'off',
171+
},
172+
},
173+
{
174+
// in *nx-plugin.ts files path imports cant be default export style (@TODO understand relation to swc)
175+
files: ['**/*nx-plugin.ts'],
176+
rules: {
177+
'unicorn/import-style': 'off',
178+
},
179+
},
166180
);

nx.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"options": {
5454
"command": "eslint",
5555
"args": [
56-
"'{projectRoot}/**/*.ts'",
56+
"'{projectRoot}/**/*.{ts,cjs,mjs,js}'",
5757
"{projectRoot}/package.json",
5858
"--config={projectRoot}/eslint.config.js",
5959
"--max-warnings=0",
@@ -345,6 +345,7 @@
345345
"releaseTagPattern": "v{version}"
346346
},
347347
"plugins": [
348+
"./tools/zod2md-jsdocs/src/nx-plugin.ts",
348349
{
349350
"plugin": "@push-based/nx-verdaccio",
350351
"options": {

package-lock.json

Lines changed: 183 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@axe-core/playwright": "^4.11.0",
2323
"@code-pushup/portal-client": "^0.16.0",
2424
"@nx/devkit": "22.3.3",
25-
"@swc/helpers": "0.5.13",
25+
"@swc/helpers": "0.5.18",
2626
"ansis": "^3.3.2",
2727
"build-md": "^0.4.2",
2828
"bundle-require": "^5.1.0",
@@ -67,7 +67,7 @@
6767
"@push-based/nx-verdaccio": "0.0.7",
6868
"@swc-node/register": "1.9.2",
6969
"@swc/cli": "0.6.0",
70-
"@swc/core": "1.5.7",
70+
"@swc/core": "1.15.8",
7171
"@testing-library/jest-dom": "^6.4.2",
7272
"@testing-library/react": "16.1.0",
7373
"@trivago/prettier-plugin-sort-imports": "^4.3.0",

packages/models/eslint.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,4 @@ export default tseslint.config(
1818
'@nx/dependency-checks': 'error',
1919
},
2020
},
21-
{
22-
ignores: ['packages/models/transformers/**/*.ts'],
23-
},
2421
);

packages/models/project.json

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,12 @@
44
"sourceRoot": "packages/models/src",
55
"projectType": "library",
66
"targets": {
7-
"generate-docs": {
8-
"executor": "nx:run-commands",
9-
"options": {
10-
"commands": [
11-
"zod2md --config {projectRoot}/zod2md.config.ts",
12-
"prettier --write {projectRoot}/docs/models-reference.md"
13-
],
14-
"parallel": false
15-
},
16-
"cache": true,
17-
"inputs": ["production", "^production", "{projectRoot}/zod2md.config.ts"],
18-
"outputs": ["{projectRoot}/docs/models-reference.md"]
19-
},
207
"build": {
218
"dependsOn": [
229
"^build",
2310
"generate-docs",
24-
{ "projects": "zod2md-jsdocs", "target": "build" }
11+
{ "projects": "zod2md-jsdocs", "target": "build" },
12+
{ "projects": "zod2md-jsdocs", "target": "ts-patch" }
2513
]
2614
},
2715
"lint": {},

0 commit comments

Comments
 (0)