unguard 0.9.0 → 0.10.0
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/README.md +8 -2
- package/dist/{chunk-I4RZLVE2.js → chunk-5GVEUYZF.js} +850 -367
- package/dist/chunk-5GVEUYZF.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +68 -11
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-I4RZLVE2.js.map +0 -1
package/README.md
CHANGED
|
@@ -144,7 +144,6 @@ These rules use the TypeScript type checker. Non-nullable types suppress the dia
|
|
|
144
144
|
|
|
145
145
|
| Rule | Severity | What it catches |
|
|
146
146
|
| ---- | -------- | --------------- |
|
|
147
|
-
| `no-inline-type-in-params` | info | `fn(opts: { a: string; b: number })` |
|
|
148
147
|
| `prefer-default-param-value` | info | Optional param reassigned with `??` in the body |
|
|
149
148
|
| `prefer-required-param-with-guard` | info | `arg?: T` followed by `if (!arg) throw` |
|
|
150
149
|
|
|
@@ -154,8 +153,15 @@ These rules use the TypeScript type checker. Non-nullable types suppress the dia
|
|
|
154
153
|
| ---- | -------- | --------------- |
|
|
155
154
|
| `duplicate-type-declaration` | warning | Same type shape in multiple files |
|
|
156
155
|
| `duplicate-type-name` | warning | Same exported type name, different shapes |
|
|
157
|
-
| `duplicate-function-declaration` | warning | Same function body in multiple files |
|
|
156
|
+
| `duplicate-function-declaration` | warning | Same function body in multiple files (2+ statements) |
|
|
158
157
|
| `duplicate-function-name` | warning | Same exported function name, different bodies |
|
|
158
|
+
| `duplicate-constant-declaration` | warning | Same constant value in multiple files |
|
|
159
|
+
| `duplicate-inline-type-in-params` | warning | Same inline `{ ... }` param type shape repeated 2+ times |
|
|
160
|
+
| `duplicate-file` | warning | File with identical content to another file |
|
|
161
|
+
| `near-duplicate-function` | warning | Function bodies identical after normalizing params, strings, numbers, `this` |
|
|
162
|
+
| `duplicate-statement-sequence` | info | Repeated contiguous statement blocks (3+ statements) |
|
|
163
|
+
| `trivial-wrapper` | info | Function that delegates to another without transformation |
|
|
164
|
+
| `unused-export` | info | Exported function with no usages in the project |
|
|
159
165
|
| `optional-arg-always-used` | warning | Optional param provided at every call site |
|
|
160
166
|
| `explicit-null-arg` | warning | `fn(null)` / `fn(undefined)` to project functions |
|
|
161
167
|
|