@sklv-labs/dev-configs 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/README.md +8 -2
- package/oxlint/nestjs.json +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ca25d0e: Turn off `typescript/consistent-type-imports` in the NestJS oxlint preset.
|
|
8
|
+
|
|
9
|
+
NestJS resolves constructor parameters from `design:paramtypes` metadata at runtime, and
|
|
10
|
+
`ValidationPipe` needs the DTO class itself to run class-validator. The rule cannot see either, so
|
|
11
|
+
it reports injected classes and DTOs as type-only imports — and applying its fix erases the
|
|
12
|
+
metadata, breaking dependency injection and request validation with no compile error.
|
|
13
|
+
|
|
3
14
|
## 0.2.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -43,8 +43,14 @@ need type information; that requires `oxlint-tsgolint`.
|
|
|
43
43
|
- `typescript/no-unnecessary-type-parameters` — a branded-type helper takes the brand as a type
|
|
44
44
|
parameter used once by design; that is the API, not an accident.
|
|
45
45
|
|
|
46
|
-
`nestjs.json` additionally turns off
|
|
47
|
-
|
|
46
|
+
`nestjs.json` additionally turns off two rules:
|
|
47
|
+
|
|
48
|
+
- `typescript/no-extraneous-class` — a Nest module is a class whose only members are static
|
|
49
|
+
factories.
|
|
50
|
+
- `typescript/consistent-type-imports` — Nest reads constructor parameter types from
|
|
51
|
+
`design:paramtypes` at runtime and `ValidationPipe` needs the DTO class itself, neither of which
|
|
52
|
+
the rule can see. Taking its advice erases the metadata and breaks dependency injection and
|
|
53
|
+
request validation with no compile error.
|
|
48
54
|
|
|
49
55
|
## Prettier, commitlint, lint-staged
|
|
50
56
|
|
package/oxlint/nestjs.json
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json",
|
|
3
3
|
"extends": ["./base.json"],
|
|
4
4
|
"rules": {
|
|
5
|
-
"typescript/no-extraneous-class": "off"
|
|
5
|
+
"typescript/no-extraneous-class": "off",
|
|
6
|
+
"typescript/consistent-type-imports": "off"
|
|
6
7
|
}
|
|
7
8
|
}
|