@isentinel/eslint-config 6.0.0-beta.14 → 6.0.0-beta.16

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
@@ -308,7 +318,7 @@ Any trailing positional arguments are treated as paths to lint (default `.`).
308
318
  | `--eslint` | Run only ESLint. |
309
319
  | `--oxlint` | Run only oxlint. |
310
320
  | `--fix` | Apply fixes: `oxlint --fix` then `eslint --fix` (sequential). |
311
- | `--agents` | Emit agent-friendly output from both linters. |
321
+ | `--agents`, `--no-agents` | Force agent-friendly output from both linters on or off (default: on in an agent session). |
312
322
  | `--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`. |
313
323
  | `--no-oxlint-type-aware` | Skip oxlint's type-aware rules (no `oxlint-tsgolint` needed). |
314
324
  | `--no-cache` | Disable ESLint's on-disk cache. |
@@ -360,6 +370,14 @@ contents rather than timestamps, which are unreliable across fresh checkouts.
360
370
  `@isentinel/eslint-config/formatter-agents`, which the runner resolves and
361
371
  passes to `eslint --format` for you.
362
372
 
373
+ It is on by default whenever an AI coding agent session is detected, so agents
374
+ get agent-shaped output without passing the flag. Detection follows
375
+ [`std-env`](https://github.com/unjs/std-env)'s agent table (Claude Code, Codex,
376
+ Cursor, Gemini CLI, opencode, replit, auggie, goose, junie, devin, kiro, pi),
377
+ plus the `AI_AGENT` variable as an explicit override. Git hook and lint-staged
378
+ runs are excluded — those are human-initiated. Pass `--no-agents` to force human
379
+ output, or set `AI_AGENT` to force detection on.
380
+
363
381
  ### Known limitations
364
382
 
365
383
  The incremental machinery favours speed, and a few edges are deliberately left
@@ -722,6 +740,37 @@ otherwise, you can install them manually:
722
740
  pnpm i -D eslint-plugin-react-x eslint-plugin-react-jsx eslint-plugin-react-naming-convention eslint-plugin-jest
723
741
  ```
724
742
 
743
+ #### Naming Conventions
744
+
745
+ Enable the opinionated `flawless/naming-convention` rules with `naming: true`,
746
+ or pass an object to add new selector entries or override the built-in defaults:
747
+
748
+ ```ts
749
+ // eslint.config.ts
750
+ import isentinel from "@isentinel/eslint-config";
751
+
752
+ export default isentinel({
753
+ naming: {
754
+ selectors: [
755
+ // Override the default variable format
756
+ { format: ["snake_case"], selector: "variable" },
757
+ // Add a new selector not covered by the defaults
758
+ { format: ["PascalCase"], prefix: ["I"], selector: "interface" },
759
+ ],
760
+ // Applied only to .tsx files, before `selectors`
761
+ selectorsTsx: [{ format: ["StrictPascalCase"], selector: "function" }],
762
+ },
763
+ });
764
+ ```
765
+
766
+ Entries in `selectors` apply to both the TS and TSX configs; `selectorsTsx`
767
+ applies to the TSX config only. User entries are prepended before the defaults,
768
+ and the rule applies the first matching entry after sorting by specificity — so
769
+ an entry with the same specificity as a default overrides it, while new
770
+ selectors are simply added. A less specific entry cannot override a more
771
+ specific default. The `overridesTypeAware` escape hatch still replaces the whole
772
+ rule if you need full control.
773
+
725
774
  #### Oxlint
726
775
 
727
776
  The config can run alongside (or be replaced by)
package/dist/cli.mjs CHANGED
@@ -9,7 +9,7 @@ import path from "node:path";
9
9
  import { existsSync, readFileSync } from "fs";
10
10
  import { execSync } from "node:child_process";
11
11
  //#region package.json
12
- var version = "6.0.0-beta.14";
12
+ var version = "6.0.0-beta.16";
13
13
  var package_default = {
14
14
  name: "@isentinel/eslint-config",
15
15
  version,
@@ -38,6 +38,10 @@ var package_default = {
38
38
  exports: {
39
39
  ".": "./dist/index.mjs",
40
40
  "./cli": "./dist/cli.mjs",
41
+ "./eslint": {
42
+ "types": "./dist/index.d.mts",
43
+ "default": "./dist/index.mjs"
44
+ },
41
45
  "./formatter-agents": "./dist/formatter-agents.mjs",
42
46
  "./oxlint": {
43
47
  "types": "./dist/oxlint.d.mts",
@@ -511,9 +515,9 @@ async function updateEslintFiles(result) {
511
515
  const versionsMap = {
512
516
  "eslint": "10.7.0",
513
517
  "eslint-plugin-jest": "29.15.4",
514
- "eslint-plugin-react-jsx": "5.17.1",
515
- "eslint-plugin-react-naming-convention": "5.17.1",
516
- "eslint-plugin-react-x": "5.17.1"
518
+ "eslint-plugin-react-jsx": "5.17.2",
519
+ "eslint-plugin-react-naming-convention": "5.17.2",
520
+ "eslint-plugin-react-x": "5.17.2"
517
521
  };
518
522
  //#endregion
519
523
  //#region src/cli/stages/update-package-json.ts