@sarj/eslint-plugin 4.2.0 → 5.0.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 +6 -3
- package/dist/index.cjs +1342 -894
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +46 -26
- package/dist/index.d.ts +46 -26
- package/dist/index.js +1311 -863
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -189,7 +189,7 @@ and every repo gets to name its own.
|
|
|
189
189
|
|
|
190
190
|
| Rule | Option | Default | Effect |
|
|
191
191
|
|---|---|---|---|
|
|
192
|
-
| `no-raw-fetch-outside-clients` | `allow` | client/
|
|
192
|
+
| `no-raw-fetch-outside-clients` | `allow` | client / vendor-wrapper path patterns | Extra files exempt from the "no bare `fetch`" rule (test files are exempt unconditionally) |
|
|
193
193
|
| `no-dynamic-sql` | `methods` | `["prepare", "exec", "query"]` | Statement-taking methods to inspect |
|
|
194
194
|
| `no-storage-in-stateless-modules` | `modules` | `[]` (rule off) | Directories declared stateless |
|
|
195
195
|
| `no-storage-in-stateless-modules` | `methods` | `["prepare", "put", "getWithMetadata"]` | Storage methods to flag |
|
|
@@ -198,7 +198,10 @@ and every repo gets to name its own.
|
|
|
198
198
|
|
|
199
199
|
The path options on the first three rules are **regular-expression sources
|
|
200
200
|
matched against the absolute filename**, not globs — so they can express both
|
|
201
|
-
path separators.
|
|
201
|
+
path separators. Test files no longer need to appear there: the rule delegates
|
|
202
|
+
to the shared `isTestFile` predicate, so supplying `allow` replaces only the
|
|
203
|
+
production exemptions and cannot accidentally un-exempt a test tree.
|
|
204
|
+
`allowIn` is the exception, on `no-hand-rolled-sleep` as on
|
|
202
205
|
`require-fetch-timeout`: it takes minimatch-ish **globs**, also matched against
|
|
203
206
|
the absolute path, so anchor them with a `**/` prefix. Supplying an option
|
|
204
207
|
**replaces** the default rather than extending it.
|
|
@@ -219,7 +222,7 @@ export default [
|
|
|
219
222
|
// This repo keeps its HTTP layer in `lib/api/`, not `clients/`.
|
|
220
223
|
"@sarj/no-raw-fetch-outside-clients": [
|
|
221
224
|
"error",
|
|
222
|
-
{ allow: ["[\\\\/]lib[\\\\/]api[\\\\/]"
|
|
225
|
+
{ allow: ["[\\\\/]lib[\\\\/]api[\\\\/]"] },
|
|
223
226
|
],
|
|
224
227
|
// Declare which modules must stay stateless.
|
|
225
228
|
"@sarj/no-storage-in-stateless-modules": [
|