slop-police 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/README.md +2 -2
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -62,7 +62,7 @@ class Store {
|
|
|
62
62
|
new Store().load();
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
A member also counts as used when it implements an interface member that is used, when it's named in `Pick<Class, "name">`, or when an instance is passed to a JSX prop whose type requires it. Options: `includePrivate` and `includeProtected` (both `false` by default).
|
|
65
|
+
A member also counts as used when it implements an interface member that is used or that is declared outside the analyzed code (a library calls it), when it's named in `Pick<Class, "name">`, or when an instance is passed to a JSX prop whose type requires it. Options: `includePrivate` and `includeProtected` (both `false` by default).
|
|
66
66
|
|
|
67
67
|
### unused-object-keys
|
|
68
68
|
|
|
@@ -174,7 +174,7 @@ const enabled = await fetchFlag().catch((error) => { // Promise rejection is log
|
|
|
174
174
|
|
|
175
175
|
### no-stringified-unknown-error
|
|
176
176
|
|
|
177
|
-
`error instanceof Error ? error.message : String(error)` (in either order), which flattens a caught value into a string and drops its type, stack and cause. A plain `instanceof Error` check counts when the variable is named `error`, `err`, `e` or `cause`; an `||` of `instanceof` checks counts for any name.
|
|
177
|
+
`error instanceof Error ? error.message : String(error)` (in either order), which flattens a caught value into a string and drops its type, stack and cause. A plain `instanceof Error` check counts when the variable is named `error`, `err`, `e` or `cause`; an `||` of `instanceof` checks counts for any name. A function that does nothing but this conversion, like `getErrorMessage(error)`, is where it belongs and isn't reported; use it instead of repeating the expression.
|
|
178
178
|
|
|
179
179
|
```ts
|
|
180
180
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slop-police",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Type-aware TypeScript linter for the dead code and needless indirection AI agents leave behind",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"node": ">=18"
|
|
29
29
|
},
|
|
30
30
|
"optionalDependencies": {
|
|
31
|
-
"slop-police-darwin-arm64": "0.2.
|
|
32
|
-
"slop-police-darwin-x64": "0.2.
|
|
33
|
-
"slop-police-linux-arm64": "0.2.
|
|
34
|
-
"slop-police-linux-x64": "0.2.
|
|
31
|
+
"slop-police-darwin-arm64": "0.2.1",
|
|
32
|
+
"slop-police-darwin-x64": "0.2.1",
|
|
33
|
+
"slop-police-linux-arm64": "0.2.1",
|
|
34
|
+
"slop-police-linux-x64": "0.2.1"
|
|
35
35
|
}
|
|
36
36
|
}
|