@isentinel/eslint-config 6.0.0-beta.1 → 6.0.0-beta.10
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 +74 -0
- package/dist/cli.d.mts +1 -1
- package/dist/index.d.mts +11377 -4024
- package/dist/index.mjs +4409 -2429
- package/dist/oxlint.d.mts +32104 -0
- package/dist/oxlint.mjs +4064 -0
- package/package.json +61 -34
package/README.md
CHANGED
|
@@ -412,6 +412,37 @@ export default isentinel({
|
|
|
412
412
|
});
|
|
413
413
|
```
|
|
414
414
|
|
|
415
|
+
#### Redundant Override Detection
|
|
416
|
+
|
|
417
|
+
Overrides that re-state what the preset already resolves to by default fail to
|
|
418
|
+
typecheck, so you learn immediately (in-editor, no lint run needed) when a
|
|
419
|
+
preset update makes one of your overrides redundant:
|
|
420
|
+
|
|
421
|
+
```ts
|
|
422
|
+
export default isentinel({
|
|
423
|
+
rules: {
|
|
424
|
+
// Type error: 'no-alert' already defaults to this value in the preset;
|
|
425
|
+
// remove the override, or set `redundancyCheck: false` to disable this
|
|
426
|
+
// check
|
|
427
|
+
"no-alert": "error",
|
|
428
|
+
},
|
|
429
|
+
});
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
The check understands severity aliases (`2` ≙ `"error"`), option tuples (flagged
|
|
433
|
+
only on an exact match), flat-config merge semantics (a bare severity keeps the
|
|
434
|
+
previous options, so it is redundant whenever the severity matches), and the
|
|
435
|
+
`type`/`roblox` variants — a rule that only defaults to `"error"` for
|
|
436
|
+
`type: "package"` is not flagged in a game config. It applies to the top-level
|
|
437
|
+
`rules`, every per-integration `overrides`, and un-scoped extra configs; both
|
|
438
|
+
the ESLint and oxlint factories are covered.
|
|
439
|
+
|
|
440
|
+
Compared defaults are the canonical (CI, non-editor) ones: editor/agent
|
|
441
|
+
downgrades, `defaultSeverity` promotion and oxlint hybrid rule-dropping are
|
|
442
|
+
intentionally ignored. `files`-scoped configs and composer `.override()` calls
|
|
443
|
+
are not checked. Opt out entirely with `redundancyCheck: false`, or per line
|
|
444
|
+
with `// @ts-expect-error`.
|
|
445
|
+
|
|
415
446
|
### Spell Checker
|
|
416
447
|
|
|
417
448
|
This config includes the [CSpell](https://cspell.org/) plugin by default, which
|
|
@@ -495,6 +526,49 @@ otherwise, you can install them manually:
|
|
|
495
526
|
pnpm i -D eslint-plugin-react-x eslint-plugin-react-jsx eslint-plugin-react-naming-convention eslint-plugin-jest
|
|
496
527
|
```
|
|
497
528
|
|
|
529
|
+
#### Oxlint
|
|
530
|
+
|
|
531
|
+
The config can run alongside (or be replaced by)
|
|
532
|
+
[oxlint](https://oxc.rs/docs/guide/usage/linter/) in three modes: ESLint-only
|
|
533
|
+
(the default), hybrid (`oxlint && eslint`), and oxlint standalone via the
|
|
534
|
+
`@isentinel/eslint-config/oxlint` export.
|
|
535
|
+
|
|
536
|
+
```ts
|
|
537
|
+
// eslint.config.ts - hybrid mode: ESLint drops every rule oxlint covers
|
|
538
|
+
import isentinel from "@isentinel/eslint-config";
|
|
539
|
+
|
|
540
|
+
export default isentinel({
|
|
541
|
+
oxlint: true,
|
|
542
|
+
});
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
```ts
|
|
546
|
+
// oxlint.config.ts
|
|
547
|
+
import { isentinel } from "@isentinel/eslint-config/oxlint";
|
|
548
|
+
|
|
549
|
+
export default isentinel({
|
|
550
|
+
name: "project/options",
|
|
551
|
+
});
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
Requires the optional peer dependencies:
|
|
555
|
+
|
|
556
|
+
```bash
|
|
557
|
+
pnpm i -D oxlint oxlint-tsgolint
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
See [docs/oxlint.md](./docs/oxlint.md) for the per-rule mapping, what stays in
|
|
561
|
+
ESLint and why, and migration notes.
|
|
562
|
+
|
|
563
|
+
#### Type-Aware Split
|
|
564
|
+
|
|
565
|
+
On large projects the type-aware rules dominate ESLint wall time; an explicit
|
|
566
|
+
numeric `--concurrency` is the biggest single win. The `typeAware` option
|
|
567
|
+
additionally splits the config into two complementary passes: a non-type-aware
|
|
568
|
+
pass (`typeAware: false`) that never builds a TypeScript program and a
|
|
569
|
+
type-aware-only pass (`typeAware: "only"`). Together they cover exactly the full
|
|
570
|
+
config. See [docs/type-aware-split.md](./docs/type-aware-split.md).
|
|
571
|
+
|
|
498
572
|
#### ESLint Plugin Development
|
|
499
573
|
|
|
500
574
|
If you're developing an ESLint plugin, you can enable specialized rules to help
|
package/dist/cli.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {}
|