Skip to content

Commit

Permalink
Prevent relative imports in application projects only
Browse files Browse the repository at this point in the history
Change ESLint to enable the "no-relative-imports" rule exclusively for
application projects, as the path "**/apps/**/*.ts" was ineffective in the root
configuration file. This is a quick solution for immediate rule enforcement.
  • Loading branch information
wcalderipe committed Jan 15, 2024
1 parent 4045ac5 commit f55b130
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
12 changes: 0 additions & 12 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,6 @@
]
}
},
{
"files": ["**/apps/**/*.ts", "**/apps/**/*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {
"no-relative-import-paths/no-relative-import-paths": [
"error",
{
"allowSameFolder": true
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
Expand Down
9 changes: 8 additions & 1 deletion apps/authz/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
"rules": {
"no-relative-import-paths/no-relative-import-paths": [
"error",
{
"allowSameFolder": true
}
]
}
},
{
"files": ["*.js", "*.jsx"],
Expand Down
9 changes: 8 additions & 1 deletion apps/orchestration/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
"rules": {
"no-relative-import-paths/no-relative-import-paths": [
"error",
{
"allowSameFolder": true
}
]
}
},
{
"files": ["*.js", "*.jsx"],
Expand Down

0 comments on commit f55b130

Please sign in to comment.