Skip to content

Commit beafcb7

Browse files
authored
Merge pull request #26 from babylonlabs-io/tong/add-eslint
chore: add eslint support for depenency check
2 parents d000252 + 92f3f16 commit beafcb7

File tree

14 files changed

+2125
-149
lines changed

14 files changed

+2125
-149
lines changed

.eslintrc.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["**/*"],
4+
"plugins": ["@nx"],
5+
"overrides": [
6+
{
7+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
8+
"rules": {
9+
"@nx/enforce-module-boundaries": [
10+
"error",
11+
{
12+
"enforceBuildableLibDependency": true,
13+
"allow": [],
14+
"depConstraints": [
15+
{
16+
"sourceTag": "*",
17+
"onlyDependOnLibsWithTags": ["*"]
18+
}
19+
]
20+
}
21+
]
22+
}
23+
},
24+
{
25+
"files": ["*.ts", "*.tsx"],
26+
"extends": ["plugin:@nx/typescript"],
27+
"rules": {}
28+
},
29+
{
30+
"files": ["*.js", "*.jsx"],
31+
"extends": ["plugin:@nx/javascript"],
32+
"rules": {}
33+
},
34+
{
35+
"files": ["*.json"],
36+
"parser": "jsonc-eslint-parser",
37+
"rules": {
38+
"@nx/dependency-checks": "error"
39+
}
40+
}
41+
]
42+
}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,5 @@ Thumbs.db
4343

4444
.nx/cache
4545
.nx/workspace-data
46+
47+
.roo

nx.json

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,37 @@
11
{
22
"$schema": "./node_modules/nx/schemas/nx-schema.json",
33
"namedInputs": {
4-
"default": ["{projectRoot}/**/*", "sharedGlobals"],
5-
"production": ["default"],
4+
"default": [
5+
"{projectRoot}/**/*",
6+
"sharedGlobals"
7+
],
8+
"production": [
9+
"default",
10+
"!{projectRoot}/.eslintrc.json",
11+
"!{projectRoot}/eslint.config.mjs"
12+
],
613
"sharedGlobals": []
714
},
815
"targetDefaults": {
916
"serve": {
10-
"dependsOn": ["build"]
17+
"dependsOn": [
18+
"build"
19+
]
1120
},
1221
"build": {
13-
"dependsOn": ["^build"],
14-
"outputs": ["{projectRoot}/dist"],
22+
"dependsOn": [
23+
"^build"
24+
],
25+
"outputs": [
26+
"{projectRoot}/dist"
27+
],
1528
"cache": true
1629
},
1730
"typecheck": {
1831
"cache": true
32+
},
33+
"lint": {
34+
"cache": true
1935
}
2036
},
2137
"plugins": [
@@ -32,10 +48,19 @@
3248
"watchDepsName": "watch-deps"
3349
}
3450
}
51+
},
52+
{
53+
"plugin": "@nx/eslint/plugin",
54+
"options": {
55+
"targetName": "lint"
56+
}
3557
}
3658
],
3759
"release": {
38-
"projects": ["packages/*", "!@babylonlabs-io/babylon-proto-ts"],
60+
"projects": [
61+
"packages/*",
62+
"!@babylonlabs-io/babylon-proto-ts"
63+
],
3964
"projectsRelationship": "independent",
4065
"releaseTagPattern": "{projectName}/{version}",
4166
"changelog": {

0 commit comments

Comments
 (0)