Skip to content

Commit

Permalink
chore: tweaks the rules that mandate type-only ness for more precission
Browse files Browse the repository at this point in the history
  • Loading branch information
sverweij committed Dec 29, 2023
1 parent b9d4d2b commit 1a5d994
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .dependency-cruiser.json
Original file line number Diff line number Diff line change
Expand Up @@ -263,22 +263,31 @@
"path": "[.]d[.]m?ts$"
},
"to": {
"dependencyTypesNot": ["type-only"]
"dependencyTypesNot": [
"type-only",
"type-import",
"triple-slash-type-reference"
]
}
},
{
"name": "only-type-only-to-dts",
"comment": "This module depends on a .d.ts file via an import that is not 'type-only'. See https://www.typescriptlang.org/docs/handbook/modules/reference.html#type-only-imports-and-exports",
"severity": "error",
"from": {},
"to": {
"path": "[.]d[.][cm]?ts$",
"dependencyTypesNot": ["type-only"]
"dependencyTypesNot": [
"type-only",
"type-import",
"triple-slash-type-reference"
]
}
},
{
"name": "no-tsconfig-basedir-use",
"comment": "This module depends om something directly via a 'tsconfig.json' 'baseUrl' property. This is discouraged, unless you're still doing AMD modules - see https://www.typescriptlang.org/tsconfig#baseUrl",
"severity": "warn",
"severity": "error",
"from": {},
"to": {
"dependencyTypes": ["aliased-tsconfig-base-url"]
Expand Down

0 comments on commit 1a5d994

Please sign in to comment.