@isentinel/eslint-config 6.0.0-beta.8 → 6.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 CHANGED
@@ -38,6 +38,16 @@ import isentinel from "@isentinel/eslint-config";
38
38
  export default isentinel();
39
39
  ```
40
40
 
41
+ `@isentinel/eslint-config/eslint` is an explicit alias of the root export, for
42
+ symmetry with `@isentinel/eslint-config/oxlint`:
43
+
44
+ ```ts
45
+ // eslint.config.ts
46
+ import { isentinel } from "@isentinel/eslint-config/eslint";
47
+
48
+ export default isentinel();
49
+ ```
50
+
41
51
  #### Optional: TypeScript Config Support
42
52
 
43
53
  If you want to use `eslint.config.ts` instead of `.js`, install `jiti` v2.0.0 or
@@ -91,17 +101,20 @@ export default isentinel(
91
101
 
92
102
  ### Add script for package.json
93
103
 
94
- For example:
104
+ The package ships an `isentinel-lint` bin that runs oxlint and ESLint together.
105
+ The starter wizard adds these for you; to wire them up manually:
95
106
 
96
107
  ```json
97
108
  {
98
109
  "scripts": {
99
- "lint": "eslint",
100
- "lint:fix": "eslint --fix"
110
+ "lint": "isentinel-lint",
111
+ "lint:fix": "isentinel-lint --fix"
101
112
  }
102
113
  }
103
114
  ```
104
115
 
116
+ See [`isentinel-lint`](#isentinel-lint) for what it does and every flag.
117
+
105
118
  ## Recommended Settings
106
119
 
107
120
  ### TSConfig
@@ -194,6 +207,237 @@ Add the following settings to your `.vscode/settings.json`:
194
207
  }
195
208
  ```
196
209
 
210
+ ## isentinel-lint
211
+
212
+ The package ships a second bin, `isentinel-lint`, a hybrid runner that drives
213
+ [oxlint](https://oxc.rs/docs/guide/usage/linter/) and ESLint together. Point
214
+ your `lint` script at it and forget the wiring (the starter wizard does this for
215
+ you):
216
+
217
+ ```json
218
+ {
219
+ "scripts": {
220
+ "lint": "isentinel-lint",
221
+ "lint:fix": "isentinel-lint --fix"
222
+ }
223
+ }
224
+ ```
225
+
226
+ It resolves the `eslint` and `oxlint` binaries from your project's
227
+ `node_modules`, so both must be installed locally.
228
+
229
+ ### What it does
230
+
231
+ By default (a local run, no `--type-aware`, no `--fix`) it runs **three**
232
+ children concurrently via
233
+ [`concurrently`](https://www.npmjs.com/package/concurrently), grouping their
234
+ output:
235
+
236
+ - **oxlint** — the full oxlint pass (including its type-aware rules).
237
+ - **fast pass** — ESLint with only the syntactic (non-type-aware) rules, over
238
+ every lintable file (TS/JS, JSON, YAML, TOML, Markdown, Lua). This is where
239
+ non-TS files are linted.
240
+ - **type-aware pass** — ESLint with only the type-aware rules, over the TS/JS
241
+ family. The preset's config splits exactly in two, so `fast ∪ type-aware`
242
+ reproduces the full config rule-for-rule.
243
+
244
+ The type-aware pass is the expensive one (it builds a TypeScript program), so
245
+ the runner **skips it entirely when nothing type-relevant changed** since the
246
+ last run — it uses the TypeScript builder to find the files whose type-aware
247
+ results could have changed, and if that set is empty it prints a short note to
248
+ stderr and does not start the pass. The fast pass and oxlint always run.
249
+
250
+ Other behaviours:
251
+
252
+ - Sizes each ESLint pass's `--concurrency` from how many files it will actually
253
+ re-lint (its own dirty count), rather than eagerly spinning up a worker per
254
+ CPU. The fast pass is cheap per file, so it packs far more files per worker
255
+ (see `FAST_FILES_PER_WORKER`) than the type-aware pass.
256
+ - Keeps a separate ESLint cache per pass so they never invalidate one another:
257
+ `.eslintcache-fast-<key>` (fast pass), `.eslintcache-typeaware-<key>`
258
+ (type-aware pass), and `.eslintcache-<key>` (the full config, used by CI,
259
+ `--type-aware=full` and the fix child below). A change to an
260
+ ESLint/oxlint/Prettier/tsconfig file or a lockfile clears each cache that is
261
+ actually older than that change; a change to the root `package.json`
262
+ resolution surface (`exports`, `imports`, `main`, `module`, `types`,
263
+ `typesVersions`, `dependencies`, `devDependencies`, `peerDependencies`) clears
264
+ only the type-aware caches (a syntactic lint cannot be affected by
265
+ resolution). Add `.eslintcache*` to `.gitignore` — a bare `.eslintcache` entry
266
+ does not match the suffixed names.
267
+ - Splits every cache by **config variant**. ESLint stores a config hash per
268
+ cache entry, so two runs that resolve even slightly different configs wipe
269
+ each other's entries when they share one cache file — an agent session and a
270
+ human session alternating against one cache re-lint the whole project in both
271
+ directions, every time. The `<key>` above is an 8-character hash of the inputs
272
+ that make this preset resolve a different config: agent session, editor
273
+ session and CI. Each variant gets its own cache (and its own builder /
274
+ `package.json`-hash state), so nothing is invalidated; the variants simply
275
+ stop overwriting each other. Git-hook runs deliberately share the plain
276
+ no-agent variant.
277
+
278
+ If your own `eslint.config.*` branches on something the runner cannot see —
279
+ your own agent/editor check, a feature flag, or an explicit `isAgent`,
280
+ `isInEditor` or `defaultSeverity` option — set `ISENTINEL_LINT_CACHE_KEY` to a
281
+ value naming that branch. It is folded into the key, giving those configs
282
+ separate caches too.
283
+
284
+ - Treats `--fix` as a check followed by a fix, in three steps. `oxlint --fix`
285
+ goes first and alone, since it rewrites the files the ESLint children are
286
+ about to read. The run's ESLint passes then run as ordinary **checks** —
287
+ concurrent, own caches, no writes. By default those are the fast and
288
+ type-aware passes — the single full pass in CI; an explicit `--type-aware`
289
+ checks whichever passes that mode selects instead (`full` the single full
290
+ pass, `only` the type-aware pass alone, `off` the fast pass alone). Finally
291
+ **one** ESLint child applies fixes to **only the files those checks had
292
+ messages about**, using the full config (a superset of every pass, so it can
293
+ fix anything any of them found).
294
+
295
+ When the checks report nothing, which is the common case, that last child
296
+ never spawns and `--fix` costs what a check run costs. Being the run's only
297
+ ESLint writer, it also cannot race anything.
298
+
299
+ The file list comes from the check passes' own caches: ESLint stores each
300
+ file's result beside its cache entry and replays it on a cache hit, so a warm
301
+ cache is that pass's whole-tree verdict — including for a pass that
302
+ auto-skipped, whose verdict stands precisely because nothing it cares about
303
+ changed. `--no-cache` leaves no verdict to read, so the fix child falls back
304
+ to linting everything it was given. A target outside the working directory is
305
+ invisible to the listing the verdict is read against, so it is handed to the
306
+ fix child as it stands, alongside the reported files; that child runs without
307
+ the cache, since a stale entry for a file no verdict covers would let ESLint
308
+ skip it.
309
+
310
+ - Lets every child run to completion and returns non-zero if any failed — an
311
+ ordinary lint error in one tool no longer kills the others mid-run.
312
+
313
+ > **Unused eslint-disable directives.** The default two-pass mode does **not**
314
+ > report unused `eslint-disable` directives: a directive naming a rule that
315
+ > lives in the _other_ pass would look unused to the pass that runs it and
316
+ > produce a false positive. CI and `--type-aware=full` runs use the single full
317
+ > config and still report them.
318
+ >
319
+ > A local `--fix` inherits this from its checks. The fix child runs the full
320
+ > config and would report an unused directive, but it only ever sees the files
321
+ > the checks reported, and a file whose _only_ problem is an unused directive is
322
+ > not one of them — so those directives survive a local fix run. In CI the check
323
+ > is the full config, so they are reported and removed as before.
324
+
325
+ ### Hybrid detection
326
+
327
+ Running both engines only makes sense when the ESLint config is in **hybrid
328
+ mode** (`oxlint: true`), which drops every oxlint-covered rule from the ESLint
329
+ side so the two engines never overlap. A config that omits `oxlint: true` runs
330
+ every mapped rule in _both_ engines — duplicate diagnostics, and under `--fix` a
331
+ tug-of-war as each rewrites toward its own option resolution. So whenever both
332
+ engines would run (default mode or `--fix`), the runner checks whether the
333
+ resolved config is hybrid; if it is not, it **runs ESLint only, skips oxlint,
334
+ and prints one stderr warning** (enable hybrid mode, or pass `--oxlint` to run
335
+ oxlint explicitly). The check is cheap: the factory records the hybrid status in
336
+ `node_modules/.cache/isentinel-lint/` on every config evaluation, and the runner
337
+ trusts that cache unless your ESLint config is newer, in which case it probes
338
+ `eslint --print-config` once and caches the result. If the status cannot be
339
+ determined it fails open and runs both engines as before. Explicit `--eslint` /
340
+ `--oxlint` runs skip the check entirely.
341
+
342
+ Any trailing positional arguments are treated as paths to lint (default `.`).
343
+
344
+ ### Flags
345
+
346
+ | Flag | Description |
347
+ | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
348
+ | `--eslint` | Run only ESLint. |
349
+ | `--oxlint` | Run only oxlint. |
350
+ | `--fix` | Check as usual, then fix only the files the checks reported (one child). |
351
+ | `--agents`, `--no-agents` | Force agent-friendly output from both linters on or off (default: on in an agent session). |
352
+ | `--type-aware=off\|only\|full` | Force a single ESLint pass: `off` fast-only, `only` type-aware-only, `full` the whole config in one pass. Cannot mix with `--fix`. |
353
+ | `--no-oxlint-type-aware` | Skip oxlint's type-aware rules (no `oxlint-tsgolint` needed). |
354
+ | `--no-cache` | Disable ESLint's on-disk cache. |
355
+ | `--concurrency <n\|off>` | Override the concurrency heuristic with a fixed worker count. |
356
+ | `--eslint-args "<args>"` | Extra arguments forwarded verbatim to ESLint. |
357
+ | `--oxlint-args "<args>"` | Extra arguments forwarded verbatim to oxlint. |
358
+ | `--print` | Print the composed commands without running them. |
359
+ | `-- <args>` | Forward args to the single selected tool (needs `--eslint`/`--oxlint`). |
360
+ | `-h`, `--help` | Show help. |
361
+ | `-v`, `--version` | Show the version. |
362
+
363
+ ### Environment
364
+
365
+ | Variable | Effect |
366
+ | ----------------------- | -------------------------------------------------------------------------------------------------------------------- |
367
+ | `FILES_PER_WORKER` | Target files a single type-aware ESLint worker handles before adding another (default `350`). |
368
+ | `FAST_FILES_PER_WORKER` | Same, for the fast (syntactic) pass, which packs far more files per worker (default `800`). |
369
+ | `LINT_MAX_WORKERS` | Upper bound on ESLint workers (default a quarter of available CPUs). |
370
+ | `ESLINT_TYPE_AWARE` | `off` or `only`; the type-aware mode `--type-aware` sets for the ESLint child (`false` is a legacy alias for `off`). |
371
+ | `CI` | When set, the runner uses the single full pass with `--cache-strategy content` (see below). |
372
+
373
+ ### Type-aware oxlint and tsgolint
374
+
375
+ By default the runner passes `--type-aware` to oxlint, which needs
376
+ [`oxlint-tsgolint`](https://www.npmjs.com/package/oxlint-tsgolint). If it is not
377
+ installed the runner errors out rather than silently skipping type-aware rules.
378
+ Install it, or pass `--no-oxlint-type-aware` to run oxlint without them:
379
+
380
+ ```bash
381
+ pnpm i -D oxlint oxlint-tsgolint
382
+ ```
383
+
384
+ `--type-aware=off` also drops oxlint's type-aware pass, since the fast mode
385
+ skips type-aware linting entirely.
386
+
387
+ ### CI
388
+
389
+ When a `CI` environment variable is set the runner skips the two-pass split and
390
+ runs a single full-config ESLint pass (alongside oxlint). CI cores are few, so
391
+ the two-pass parallelism does not pay off, and the full config is the only one
392
+ that reports unused `eslint-disable` directives — which you want enforced in CI.
393
+ The pass also switches to `--cache-strategy content` so caches key on file
394
+ contents rather than timestamps, which are unreliable across fresh checkouts.
395
+
396
+ ### Agent output
397
+
398
+ `--agents` emits machine-readable output for AI agents: oxlint runs with
399
+ `--format agent`, and ESLint uses the formatter shipped at
400
+ `@isentinel/eslint-config/formatter-agents`, which the runner resolves and
401
+ passes to `eslint --format` for you.
402
+
403
+ It is on by default whenever an AI coding agent session is detected, so agents
404
+ get agent-shaped output without passing the flag. Detection follows
405
+ [`std-env`](https://github.com/unjs/std-env)'s agent table (Claude Code, Codex,
406
+ Cursor, Gemini CLI, opencode, replit, auggie, goose, junie, devin, kiro, pi),
407
+ plus the `AI_AGENT` variable as an explicit override. Git hook and lint-staged
408
+ runs are excluded — those are human-initiated. Pass `--no-agents` to force human
409
+ output, or set `AI_AGENT` to force detection on.
410
+
411
+ ### Known limitations
412
+
413
+ The incremental machinery favours speed, and a few edges are deliberately left
414
+ to self-heal or need a one-off nudge:
415
+
416
+ - **Config changes reached through an imported module are invisible to a
417
+ _skipped_ typed pass.** The runner busts caches on the mtime of your
418
+ `eslint.config.*`, tsconfigs and lockfiles, but not on files those configs
419
+ `import`. ESLint's own per-entry config hash would still catch such a change
420
+ once the pass runs — but if the typed pass was auto-skipped (nothing
421
+ type-relevant looked dirty), it never runs to notice. Touch your
422
+ `eslint.config.*` (or run once with `--no-cache`) after editing a module it
423
+ imports.
424
+ - **mtime granularity.** Cache freshness is compared by modification time, so
425
+ the usual coarse-filesystem-timestamp race that affects ESLint's own cache
426
+ applies here too (edits within the same clock tick as the last run can be
427
+ missed). CI uses `--cache-strategy content` to sidestep it; locally, a second
428
+ run settles it.
429
+ - **Solution-style / project-reference tsconfigs.** The TypeScript builder used
430
+ to find type-affected files does not follow project references, so in a
431
+ solution-style setup builder invalidation silently becomes a no-op and the
432
+ runner falls back to plain mtime dirtiness. Type-aware results stay correct
433
+ (ESLint still lints the dirty files); only the cross-file "an imported type
434
+ changed" invalidation is skipped.
435
+ - **Hybrid status tracks `eslint.config.*` mtimes only.** If you toggle hybrid
436
+ mode (`oxlint: true`) from a module the config _imports_ rather than the
437
+ config file itself, the runner trusts its cached hybrid decision for one more
438
+ run before the factory's passive write corrects it — it self-heals on the next
439
+ invocation.
440
+
197
441
  ## Customization
198
442
 
199
443
  Normally you only need to import the `isentinel` preset:
@@ -412,6 +656,37 @@ export default isentinel({
412
656
  });
413
657
  ```
414
658
 
659
+ #### Redundant Override Detection
660
+
661
+ Overrides that re-state what the preset already resolves to by default fail to
662
+ typecheck, so you learn immediately (in-editor, no lint run needed) when a
663
+ preset update makes one of your overrides redundant:
664
+
665
+ ```ts
666
+ export default isentinel({
667
+ rules: {
668
+ // Type error: 'no-alert' already defaults to this value in the preset;
669
+ // remove the override, or set `redundancyCheck: false` to disable this
670
+ // check
671
+ "no-alert": "error",
672
+ },
673
+ });
674
+ ```
675
+
676
+ The check understands severity aliases (`2` ≙ `"error"`), option tuples (flagged
677
+ only on an exact match), flat-config merge semantics (a bare severity keeps the
678
+ previous options, so it is redundant whenever the severity matches), and the
679
+ `type`/`roblox` variants — a rule that only defaults to `"error"` for
680
+ `type: "package"` is not flagged in a game config. It applies to the top-level
681
+ `rules`, every per-integration `overrides`, and un-scoped extra configs; both
682
+ the ESLint and oxlint factories are covered.
683
+
684
+ Compared defaults are the canonical (CI, non-editor) ones: editor/agent
685
+ downgrades, `defaultSeverity` promotion and oxlint hybrid rule-dropping are
686
+ intentionally ignored. `files`-scoped configs and composer `.override()` calls
687
+ are not checked. Opt out entirely with `redundancyCheck: false`, or per line
688
+ with `// @ts-expect-error`.
689
+
415
690
  ### Spell Checker
416
691
 
417
692
  This config includes the [CSpell](https://cspell.org/) plugin by default, which
@@ -495,6 +770,107 @@ otherwise, you can install them manually:
495
770
  pnpm i -D eslint-plugin-react-x eslint-plugin-react-jsx eslint-plugin-react-naming-convention eslint-plugin-jest
496
771
  ```
497
772
 
773
+ #### Anti-Slop
774
+
775
+ Enable `eslint-plugin-flawless` rules that catch patterns AI-written code tends
776
+ to produce (object-typed parameters, `unknown` returns, unsafe dictionary types,
777
+ conditional empty-object spreads, `Reflect` access) with `antiSlop: true`:
778
+
779
+ ```ts
780
+ // eslint.config.ts
781
+ import isentinel from "@isentinel/eslint-config";
782
+
783
+ export default isentinel({
784
+ antiSlop: true,
785
+ });
786
+ ```
787
+
788
+ #### Naming Conventions
789
+
790
+ Enable the opinionated `flawless/naming-convention` rules with `naming: true`,
791
+ or pass an object to add new selector entries or override the built-in defaults:
792
+
793
+ ```ts
794
+ // eslint.config.ts
795
+ import isentinel from "@isentinel/eslint-config";
796
+
797
+ export default isentinel({
798
+ naming: {
799
+ selectors: [
800
+ // Override the default variable format
801
+ { format: ["snake_case"], selector: "variable" },
802
+ // Add a new selector not covered by the defaults
803
+ { format: ["PascalCase"], prefix: ["I"], selector: "interface" },
804
+ ],
805
+ // Applied only to .tsx files, before `selectors`
806
+ selectorsTsx: [{ format: ["StrictPascalCase"], selector: "function" }],
807
+ },
808
+ });
809
+ ```
810
+
811
+ Entries in `selectors` apply to both the TS and TSX configs; `selectorsTsx`
812
+ applies to the TSX config only. User entries are prepended before the defaults,
813
+ and the rule applies the first matching entry after sorting by specificity — so
814
+ an entry with the same specificity as a default overrides it, while new
815
+ selectors are simply added. A less specific entry cannot override a more
816
+ specific default. The `overridesTypeAware` escape hatch still replaces the whole
817
+ rule if you need full control.
818
+
819
+ ##### Roblox names
820
+
821
+ `strictCamelCase` and `StrictPascalCase` reject two capitals in a row, so a
822
+ `CFrame` has to be stored in `targetCframe` and the identifier stops matching
823
+ the type it holds. `allowedWords` lets listed words keep their own casing inside
824
+ a name, while the rest of the name is still checked. It is off by default:
825
+
826
+ ```ts
827
+ // eslint.config.ts
828
+ import isentinel from "@isentinel/eslint-config";
829
+
830
+ export default isentinel({
831
+ naming: {
832
+ // Use ROBLOX_ALLOWED_WORDS, generated from `@rbxts/types`
833
+ allowedWords: true,
834
+ },
835
+ });
836
+ ```
837
+
838
+ ```ts
839
+ const targetCFrame = new CFrame(); // ok
840
+ const listLayoutUIPadding = 0; // ok
841
+ const autoZIndex = 0; // ok - properties count, not just types
842
+ const target_CFrame = 0; // still an error
843
+ const fooXYBar = 0; // still an error - not a Roblox name
844
+ const colorToHSV = 0; // still an error - methods do not count, use `colorToHsv`
845
+ ```
846
+
847
+ The generated list covers type names and data properties, not methods. A call
848
+ spells the API out at the call site, where the naming rules do not reach, so
849
+ `Color3.ToHSV` is no reason to let the variable holding its result skip them.
850
+
851
+ Pass an array to use exactly those words instead. Spread `ROBLOX_ALLOWED_WORDS`
852
+ to extend the list rather than replace it:
853
+
854
+ ```ts
855
+ import isentinel, { ROBLOX_ALLOWED_WORDS } from "@isentinel/eslint-config";
856
+
857
+ export default isentinel({
858
+ naming: {
859
+ allowedWords: [...ROBLOX_ALLOWED_WORDS, "HTTP", "URL"],
860
+ },
861
+ });
862
+ ```
863
+
864
+ The list reaches every selector, including your own `selectors` entries. A
865
+ selector opts out with its own `allowedWords: []`. Only the two strict formats
866
+ honour it, so it can never loosen `snake_case` or `UPPER_CASE`, and a word only
867
+ matches at a hump boundary, so it cannot split an existing hump.
868
+
869
+ At the **start** of a `strictCamelCase` name a word also matches with its first
870
+ character lowercased, since that is the only spelling the format allows there —
871
+ `motor6DWeld` and `targetMotor6DPart` both pass. Everywhere else the word has to
872
+ be spelled as the API spells it, so `targetmotor6DPart` is still an error.
873
+
498
874
  #### Oxlint
499
875
 
500
876
  The config can run alongside (or be replaced by)
@@ -559,6 +935,53 @@ otherwise, you can install them manually:
559
935
  pnpm i -D eslint-plugin-eslint-plugin
560
936
  ```
561
937
 
938
+ #### Co-located Tests
939
+
940
+ `projectStructure` requires every source file to sit next to its test file,
941
+ through
942
+ [eslint-plugin-project-structure](https://github.com/Igorkowalski94/eslint-plugin-project-structure).
943
+ `src/place-service.ts` then has to be joined by `src/place-service.spec.ts`.
944
+ Only `enforceExistence` is driven here, so the rule never enforces naming:
945
+
946
+ ```ts
947
+ // eslint.config.ts
948
+ import isentinel from "@isentinel/eslint-config";
949
+
950
+ export default isentinel({
951
+ projectStructure: {
952
+ // The plugin's name placeholders, plus `{ext}` for the extension of the
953
+ // file that matched. Default: ["{node-name}.spec.{ext}"]
954
+ enforceExistence: "__tests__/{node-name}.test.{ext}",
955
+ // Default: every source file the preset lints
956
+ files: ["src/**/*.{ts,tsx}"],
957
+ // Default: tests, `.d.ts` files and build configs
958
+ ignores: ["**/index.ts"],
959
+ // Default: `process.cwd()`
960
+ projectRoot: import.meta.dirname,
961
+ // Restricts the check to one subtree. Default: all of `projectRoot`
962
+ structureRoot: "src",
963
+ },
964
+ });
965
+ ```
966
+
967
+ ```bash
968
+ pnpm i -D eslint-plugin-project-structure
969
+ ```
970
+
971
+ `{node-name}` matches the kebab-case filenames the preset enforces; the others
972
+ are `{nodeName}`, `{NodeName}`, `{node_name}` and `{NODE_NAME}`. A file already
973
+ matching a template is exempt from it. A source file with no test disables the
974
+ rule at the source.
975
+
976
+ The rule needs no type information, so oxlint runs it too: the same option is
977
+ accepted by the oxlint factory, and hybrid mode (`oxlint: true`) hands the check
978
+ to oxlint.
979
+
980
+ Two caveats. Deleting `foo.spec.ts` does not change `foo.ts`, so a cached run
981
+ replays the old clean result — the check is only sound uncached. And the plugin
982
+ writes `projectStructure.cache.json` into `projectRoot` while it has something
983
+ to report, so gitignore it.
984
+
562
985
  ### Git hooks
563
986
 
564
987
  If you want to apply lint and auto-fix before every commit, use
@@ -588,6 +1011,37 @@ mise use hk pkl # or see https://hk.jdx.dev for other install methods
588
1011
  hk install
589
1012
  ```
590
1013
 
1014
+ ### pnpm's global virtual store
1015
+
1016
+ Only relevant if you have set
1017
+ [`enableGlobalVirtualStore: true`](https://pnpm.io/global-virtual-store).
1018
+ Otherwise pnpm's hoisting hides the problem and there is nothing to do.
1019
+
1020
+ With the setting on, a package's real location moves out of your project, so
1021
+ TypeScript resolves each dependency's imports from its own declared dependencies
1022
+ alone. Several packages in this preset's tree import types they never declare —
1023
+ `eslint-flat-config-utils` imports from `eslint` without declaring it at all.
1024
+ `skipLibCheck` hides the resulting `TS2307`, but the type still degrades to
1025
+ `any`, which surfaces as misleading reports elsewhere:
1026
+
1027
+ ```text
1028
+ typescript(no-unsafe-argument): Unsafe argument of type Linter.Config[]
1029
+ assigned to a parameter of type TypedFlatConfigItem[]
1030
+ ```
1031
+
1032
+ Since `isentinel()` returns a `FlatConfigComposer` from that package, this hits
1033
+ your `eslint.config.ts` directly. Add the companion pnpm plugin, which declares
1034
+ the missing imports for you:
1035
+
1036
+ ```bash
1037
+ pnpm add --config @isentinel/pnpm-plugin-eslint-config
1038
+ ```
1039
+
1040
+ pnpm auto-loads any config dependency whose name matches its plugin pattern, so
1041
+ there is nothing to configure. Use the CLI rather than hand-editing
1042
+ `pnpm-workspace.yaml`: config dependencies are pinned to an exact version and
1043
+ verified against an integrity hash that `pnpm add --config` records for you.
1044
+
591
1045
  ## View what rules are enabled
592
1046
 
593
1047
  There is a visual tool to help you view what rules are enabled in your project
@@ -0,0 +1,8 @@
1
+ import module from "node:module";
2
+
3
+ // ESLint's own bin enables this, so its CLI already benefits; a language server
4
+ // loading `dist/index.mjs` directly never does. Only the bins call it —
5
+ // `enableCompileCache` is a host-process side effect and the package declares
6
+ // `"sideEffects": false`. Importing it as a module keeps it ahead of the entry:
7
+ // static imports are evaluated before any statement of the importer.
8
+ module.enableCompileCache();
package/bin/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import "../dist/cli.js";
3
+ import "./compile-cache.js";
4
+ import "../dist/cli.mjs";
package/bin/lint.js ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+
3
+ import "./compile-cache.js";
4
+ import "../dist/lint-cli.mjs";
package/dist/cli.d.mts CHANGED
@@ -1 +1 @@
1
- export { };
1
+ export {}