@open-xchange/linter-presets 1.31.0 → 1.31.2

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/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [1.31.2] - 2026-11-04
6
+
7
+ - chore: drop dependency `empathic`
8
+
9
+ ## [1.31.1] - 2026-10-26
10
+
11
+ - fixed: (ESLint) `env.react` keeps the TypeScript parser for JSX files, as the configuration `strict-type-checked` of `@eslint-react/eslint-plugin` now overrides the language options (type-checked rules failed with missing type information)
12
+ - chore: bump dependencies
13
+
5
14
  ## [1.31.0] - 2026-10-05
6
15
 
7
16
  - changed: (ESLint) disable all rules of `eslint-plugin-react-hooks` that are also implemented in `@eslint-react/eslint-plugin`, using the configuration `disable-conflict-eslint-plugin-react-hooks` of that plugin; enable rule `@eslint-react/globals`
@@ -942,7 +951,9 @@
942
951
  - added: (ESLint) project configuration (core, js, ts, json, yaml, license, directives, promises, jsdoc, stylistic)
943
952
  - added: (ESLint) environment presets (tsconfig, node, browser, jest, vitest, codecept, react, plugin)
944
953
 
945
- [Unreleased]: https://gitlab.com/openxchange/appsuite/documents/commons/plugins/-/compare/linter-presets-1.31.0...main
954
+ [Unreleased]: https://gitlab.com/openxchange/appsuite/documents/commons/plugins/-/compare/linter-presets-1.31.2...main
955
+ [1.31.2]: https://gitlab.com/openxchange/appsuite/documents/commons/plugins/-/compare/linter-presets-1.31.1...linter-presets-1.31.2
956
+ [1.31.1]: https://gitlab.com/openxchange/appsuite/documents/commons/plugins/-/compare/linter-presets-1.31.0...linter-presets-1.31.1
946
957
  [1.31.0]: https://gitlab.com/openxchange/appsuite/documents/commons/plugins/-/compare/linter-presets-1.30.7...linter-presets-1.31.0
947
958
  [1.30.7]: https://gitlab.com/openxchange/appsuite/documents/commons/plugins/-/compare/linter-presets-1.30.6...linter-presets-1.30.7
948
959
  [1.30.6]: https://gitlab.com/openxchange/appsuite/documents/commons/plugins/-/compare/linter-presets-1.30.5...linter-presets-1.30.6
@@ -4,7 +4,6 @@ import "picomatch";
4
4
  import { ConfigObject, ConfigObject as ConfigObject$1, RulesConfig, RulesConfig as RulesConfig$1 } from "@eslint/core";
5
5
  import { Linter } from "eslint";
6
6
  import ts from "typescript";
7
- //#region src/utils/resolver.d.ts
8
7
  /**
9
8
  * A resolver for file paths relative to a base URL.
10
9
  */
@@ -29,11 +28,7 @@ declare class PathResolver {
29
28
  */
30
29
  path(file: string): string;
31
30
  }
32
- //#endregion
33
- //#region src/utils/utils.d.ts
34
31
  type DeepOptArray<T> = T | false | null | undefined | ReadonlyArray<DeepOptArray<T>>;
35
- //#endregion
36
- //#region src/eslint/shared/env-utils.d.ts
37
32
  type Config = ConfigObject$1 | ConfigWithExtends | Linter.Config | TSESLint.FlatConfig.Config;
38
33
  type ConfigArg = DeepOptArray<Config>;
39
34
  /**
@@ -192,8 +187,6 @@ interface EnvBaseOptions extends EnvFilesOptions {
192
187
  */
193
188
  rules?: RulesConfig$1;
194
189
  }
195
- //#endregion
196
- //#region src/eslint/core/vue.d.ts
197
190
  /**
198
191
  * Configuration options for Vue source files.
199
192
  */
@@ -204,8 +197,6 @@ interface VueOptions {
204
197
  */
205
198
  globalDirectives?: readonly string[];
206
199
  }
207
- //#endregion
208
- //#region src/eslint/shared/restricted.d.ts
209
200
  /**
210
201
  * Configuration for a single banned global or import.
211
202
  */
@@ -269,8 +260,6 @@ interface EnvRestrictedOptions extends EnvBaseOptions {
269
260
  */
270
261
  restricted?: EnvRestrictedOption;
271
262
  }
272
- //#endregion
273
- //#region src/eslint/env/node.d.ts
274
263
  type EnvNodeConvertPathPattern = [pattern: string, replacement: string];
275
264
  /**
276
265
  * Configuration for the record-style setting 'convertPath' of the plugin
@@ -328,8 +317,6 @@ interface EnvNodeOptions extends EnvRestrictedOptions {
328
317
  * The configuration entries to be added to the resulting configuration array.
329
318
  */
330
319
  declare function node(envOptions: EnvNodeOptions): ConfigArg;
331
- //#endregion
332
- //#region src/eslint/env/browser.d.ts
333
320
  /**
334
321
  * Configuration options for the environment preset 'env.browser'.
335
322
  */
@@ -350,8 +337,6 @@ interface EnvBrowserOptions extends EnvRestrictedOptions {}
350
337
  * The configuration entries to be added to the resulting configuration array.
351
338
  */
352
339
  declare function browser(envOptions: EnvBrowserOptions): ConfigArg;
353
- //#endregion
354
- //#region src/eslint/shared/unittest.d.ts
355
340
  /**
356
341
  * Shared options for environment presets for unit tests.
357
342
  */
@@ -377,8 +362,6 @@ interface EnvUnitTestOptions extends EnvBaseOptions {
377
362
  */
378
363
  testingLib?: 'angular' | 'dom' | 'marko' | 'react' | 'vue';
379
364
  }
380
- //#endregion
381
- //#region src/eslint/env/jest.d.ts
382
365
  /**
383
366
  * Configuration options for the environment preset 'env.jest'.
384
367
  */
@@ -400,8 +383,6 @@ interface EnvJestOptions extends EnvUnitTestOptions {}
400
383
  * The configuration entries to be added to the resulting configuration array.
401
384
  */
402
385
  declare function jest(envOptions: EnvJestOptions): ConfigArg;
403
- //#endregion
404
- //#region src/eslint/env/vitest.d.ts
405
386
  /**
406
387
  * Configuration options for the environment preset 'env.vitest'.
407
388
  */
@@ -423,8 +404,6 @@ interface EnvVitestOptions extends EnvUnitTestOptions {}
423
404
  * The configuration entries to be added to the resulting configuration array.
424
405
  */
425
406
  declare function vitest(envOptions: EnvVitestOptions): ConfigArg;
426
- //#endregion
427
- //#region src/eslint/env/codecept.d.ts
428
407
  /**
429
408
  * Configuration options for the environment preset 'env.codecept'.
430
409
  */
@@ -444,8 +423,6 @@ interface EnvCodeceptOptions extends EnvBaseOptions {}
444
423
  * The configuration entries to be added to the resulting configuration array.
445
424
  */
446
425
  declare function codecept(envOptions: EnvCodeceptOptions): ConfigArg;
447
- //#endregion
448
- //#region src/eslint/env/react.d.ts
449
426
  /**
450
427
  * Configuration options for the environment preset 'env.react'.
451
428
  */
@@ -488,8 +465,6 @@ interface EnvReactOptions extends EnvBaseOptions {
488
465
  * The configuration entries to be added to the resulting configuration array.
489
466
  */
490
467
  declare function react(envOptions: EnvReactOptions): ConfigArg;
491
- //#endregion
492
- //#region src/eslint/env/eslint.d.ts
493
468
  /**
494
469
  * Configuration options for the environment preset 'env.eslint'.
495
470
  */
@@ -507,8 +482,6 @@ interface EnvEslintOptions extends EnvBaseOptions {}
507
482
  * The configuration entries to be added to the resulting configuration array.
508
483
  */
509
484
  declare function eslint(envOptions: EnvEslintOptions): ConfigArg;
510
- //#endregion
511
- //#region src/eslint/shared/rule-utils.d.ts
512
485
  /**
513
486
  * Shared settings used by multiple rules.
514
487
  */
@@ -518,8 +491,6 @@ interface SharedRuleSettings {
518
491
  */
519
492
  alias?: Record<string, string>;
520
493
  }
521
- //#endregion
522
- //#region src/eslint/rules/project/noInvalidModules.d.ts
523
494
  /**
524
495
  * Configuration for the rule 'env-project/no-invalid-modules'.
525
496
  */
@@ -531,8 +502,6 @@ interface RuleNoInvalidModulesOptions {
531
502
  */
532
503
  external?: string[];
533
504
  }
534
- //#endregion
535
- //#region src/eslint/rules/project/noInvalidHierarchy.d.ts
536
505
  /**
537
506
  * Configuration for the rule 'env-project/no-invalid-hierarchy' to specify a
538
507
  * sub package inside a project.
@@ -560,8 +529,6 @@ interface RuleNoInvalidHierarchyPackage {
560
529
  optional?: boolean;
561
530
  }
562
531
  type RuleNoInvalidHierarchyOptions = Record<string, RuleNoInvalidHierarchyPackage>;
563
- //#endregion
564
- //#region src/eslint/env/project.d.ts
565
532
  /**
566
533
  * Configuration options for the environment preset 'env.project'.
567
534
  */
@@ -591,8 +558,6 @@ interface EnvProjectOptions extends EnvBaseOptions {
591
558
  * The configuration entries to be added to the resulting configuration array.
592
559
  */
593
560
  declare function project(envOptions: EnvProjectOptions): ConfigArg;
594
- //#endregion
595
- //#region src/eslint/env/tsconfig.d.ts
596
561
  /**
597
562
  * Configuration options for the environment preset 'env.tsconfig'.
598
563
  */
@@ -613,8 +578,6 @@ interface EnvTSConfigOptions extends EnvBaseOptions {
613
578
  * The configuration entries to be added to the resulting configuration array.
614
579
  */
615
580
  declare function tsconfig(envOptions: EnvTSConfigOptions): ConfigArg;
616
- //#endregion
617
- //#region src/eslint/env/decorators.d.ts
618
581
  /**
619
582
  * Configuration options for the environment preset 'env.decorators'.
620
583
  */
@@ -632,8 +595,6 @@ interface EnvDecoratorsOptions extends EnvBaseOptions {}
632
595
  * The configuration entries to be added to the resulting configuration array.
633
596
  */
634
597
  declare function decorators(envOptions: EnvDecoratorsOptions): ConfigArg;
635
- //#endregion
636
- //#region src/eslint/index.d.ts
637
598
  /**
638
599
  * Configuration options for linting the entire project with ESLint.
639
600
  */
@@ -703,6 +664,5 @@ export declare const env: {
703
664
  * `eslint.config.*` file.
704
665
  */
705
666
  export declare function defineConfig(options: ProjectOptions, ...configs: Array<ConfigArg | ((resolver: PathResolver) => ConfigArg)>): ConfigObject[];
706
- //#endregion
707
667
  export type { ConfigObject, LanguageOptions, PackagesOptions, RulesConfig, StylisticOptions, VueOptions };
708
668
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":["ConfigObject","RulesConfig"],"sources":["../../src/utils/resolver.ts","../../src/utils/utils.ts","../../src/eslint/shared/env-utils.ts","../../src/eslint/core/vue.ts","../../src/eslint/shared/restricted.ts","../../src/eslint/env/node.ts","../../src/eslint/env/browser.ts","../../src/eslint/shared/unittest.ts","../../src/eslint/env/jest.ts","../../src/eslint/env/vitest.ts","../../src/eslint/env/codecept.ts","../../src/eslint/env/react.ts","../../src/eslint/env/eslint.ts","../../src/eslint/shared/rule-utils.ts","../../src/eslint/rules/project/noInvalidModules.ts","../../src/eslint/rules/project/noInvalidHierarchy.ts","../../src/eslint/env/project.ts","../../src/eslint/env/tsconfig.ts","../../src/eslint/env/decorators.ts","../../src/eslint/index.ts"],"mappings":";;;;;;;;;;cASa;;EAKC,YAAA;;;;;;;MAWR;;;;;;;;;;EAaJ,KAAK;;;;KC/BK,aAAa,KAAK,+BAA+B,cAAc,aAAa;;;KCK5E,SAASA,iBAAe,oBAAoB,OAAO,SAAS,SAAS,WAAW;KAEhF,YAAY,aAAa;;;;UAOpB;;;;;;EAOf,cAAc,OAAO;;;;;;;;;EAUrB;;;;;UAae;;;;;EAMf;;;;EAKA;;;;;UAae;;;;EAKf;;;;EAKA;;;;EAKA;;;;EAKA;;;;;UAMe;;;;;;;;;;EAWf;;;;;EAMA,kBAAkB;;;;;;;;;;;;EAalB;;;;;;;;EASA;;;;;;;;;;;;;;EAeA;;;;;;;;;;;;;EAcA;;;;;UAae;;;;;;;EAQf;;;;;;EAOA,OAAO;;;;;;EAOP;;;;;;UASe,uBAAuB;;;;EAKtC,QAAQC;;;;;;;UC5MO;;;;;EAMf;;;;;;;UCRe;EACf;EACA;;;;;UAMe;EACf;EACA;EACA;;;;;UAMe;EACf;EACA;;;;;UAMe;;EAEf,UAAU;;EAEV,UAAU;;EAEV,aAAa;;EAEb,SAAS;;;;;;UAOM,8BAA8B,iBAAiB;;;;;UAM/C,4BAA4B;;;;;;EAO3C,YAAY;;;;;;UAOG,6BAA6B;;;;;EAM5C,aAAa;;;;KCpEH,6BAA6B,iBAAiB;;;;;KAM9C,2BAA2B,eAAe;;;;;UAMrC;EACf;EACA;EACA,SAAS;;;;;UAMM;EACf;EACA;EACA;EACA,cAAc,2BAA2B;EACzC;EACA;EACA,yBAAyB,GAAG,OAAO,SAAS,UAAU;;;;;UAMvC,uBAAuB;;;;;;EAOtC,aAAa;;;;;EAMb,WAAW;;;;;;;;;;;;;;;iBAkBW,KAAK,YAAY,iBAAiB;;;;;;UC7DzC,0BAA0B;;;;;;;;;;;;;;;;iBAmGnB,QAAQ,YAAY,oBAAoB;;;;;;UCpG/C,2BAA2B;;;;;;;EAQ1C;;;;;;;;EASA;;;;;EAMA;;;;;;;UCzBe,uBAAuB;;;;;;;;;;;;;;;;;iBAoBhB,KAAK,YAAY,iBAAiB;;;;;;UCpBzC,yBAAyB;;;;;;;;;;;;;;;;;iBAoBlB,OAAO,YAAY,mBAAmB;;;;;;UCnB7C,2BAA2B;;;;;;;;;;;;;;;iBAkBpB,SAAS,YAAY,qBAAqB;;;;;;UCXjD,wBAAwB;;;;;;EAOvC;;;;;;;;EASA;;;;;;EAOA;;;;;;;;;;;;;;;;;;iBAqBsB,MAAM,YAAY,kBAAkB;;;;;;UCpD3C,yBAAyB;;;;;;;;;;;;;iBAgBlB,OAAO,YAAY,mBAAmB;;;;;;UCT7C;;;;EAKf,QAAQ;;;;;;;UCZO;;;;;;EAOf;;;;;;;;UCNe;;;;;;EAOf;;;;;EAMA;;;;;;;;;EAUA;;KAKU,gCAAgC,eAAe;;;;;;UC3B1C,0BAA0B;;;;EAKzC,QAAQ;;;;;EAMR,WAAW;;;;;EAMX,YAAY;;;;;;;;;;;iBAcU,QAAQ,YAAY,oBAAoB;;;;;;UCnC/C,2BAA2B;;;;EAK1C;;;;;;;;;;;;iBAesB,SAAS,YAAY,qBAAqB;;;;;;UClBjD,6BAA6B;;;;;;;;;;;;;iBAgBtB,WAAW,YAAY,uBAAuB;;;;;;iBCerD;;;;;EAMf;;;;EAKA;;;;;EAMA;;;;EAKA,WAAW;;;;EAKX,WAAW;;;;EAKX,YAAY;;;;EAKZ,MAAM;;;;EAKN,QAAQ;;;;;qBAQG;;;;;;;;;;;;;;;;;;;;;;;;;;wBA6BG,aAAa,SAAS,mBAAmB,SAAS,MAAM,cAAc,UAAU,iBAAiB,cAAc"}
1
+ {"version":3,"file":"index.d.mts","names":["ConfigObject","RulesConfig"],"sources":["../../src/utils/resolver.ts","../../src/utils/utils.ts","../../src/eslint/shared/env-utils.ts","../../src/eslint/core/vue.ts","../../src/eslint/shared/restricted.ts","../../src/eslint/env/node.ts","../../src/eslint/env/browser.ts","../../src/eslint/shared/unittest.ts","../../src/eslint/env/jest.ts","../../src/eslint/env/vitest.ts","../../src/eslint/env/codecept.ts","../../src/eslint/env/react.ts","../../src/eslint/env/eslint.ts","../../src/eslint/shared/rule-utils.ts","../../src/eslint/rules/project/noInvalidModules.ts","../../src/eslint/rules/project/noInvalidHierarchy.ts","../../src/eslint/env/project.ts","../../src/eslint/env/tsconfig.ts","../../src/eslint/env/decorators.ts","../../src/eslint/index.ts"],"mappings":";;;;;;;;;cASa;;EAKC,YAAA;;;;;;;MAWR;;;;;;;;;;EAaJ,KAAK;;KC/BK,aAAa,KAAK,+BAA+B,cAAc,aAAa;KCK5E,SAASA,iBAAe,oBAAoB,OAAO,SAAS,SAAS,WAAW;KAEhF,YAAY,aAAa;;;;UAOpB;;;;;;EAOf,cAAc,OAAO;;;;;;;;;EAUrB;;;;;UAae;;;;;EAMf;;;;EAKA;;;;;UAae;;;;EAKf;;;;EAKA;;;;EAKA;;;;EAKA;;;;;UAMe;;;;;;;;;;EAWf;;;;;EAMA,kBAAkB;;;;;;;;;;;;EAalB;;;;;;;;EASA;;;;;;;;;;;;;;EAeA;;;;;;;;;;;;;EAcA;;;;;UAae;;;;;;;EAQf;;;;;;EAOA,OAAO;;;;;;EAOP;;;;;;UASe,uBAAuB;;;;EAKtC,QAAQC;;;;;UC5MO;;;;;EAMf;;;;;UCRe;EACf;EACA;;;;;UAMe;EACf;EACA;EACA;;;;;UAMe;EACf;EACA;;;;;UAMe;;EAEf,UAAU;;EAEV,UAAU;;EAEV,aAAa;;EAEb,SAAS;;;;;;UAOM,8BAA8B,iBAAiB;;;;;UAM/C,4BAA4B;;;;;;EAO3C,YAAY;;;;;;UAOG,6BAA6B;;;;;EAM5C,aAAa;;KCpEH,6BAA6B,iBAAiB;;;;;KAM9C,2BAA2B,eAAe;;;;;UAMrC;EACf;EACA;EACA,SAAS;;;;;UAMM;EACf;EACA;EACA;EACA,cAAc,2BAA2B;EACzC;EACA;EACA,yBAAyB,GAAG,OAAO,SAAS,UAAU;;;;;UAMvC,uBAAuB;;;;;;EAOtC,aAAa;;;;;EAMb,WAAW;;;;;;;;;;;;;;;iBAkBW,KAAK,YAAY,iBAAiB;;;;UC7DzC,0BAA0B;;;;;;;;;;;;;;;;iBAmGnB,QAAQ,YAAY,oBAAoB;;;;UCpG/C,2BAA2B;;;;;;;EAQ1C;;;;;;;;EASA;;;;;EAMA;;;;;UCzBe,uBAAuB;;;;;;;;;;;;;;;;;iBAoBhB,KAAK,YAAY,iBAAiB;;;;UCpBzC,yBAAyB;;;;;;;;;;;;;;;;;iBAoBlB,OAAO,YAAY,mBAAmB;;;;UCnB7C,2BAA2B;;;;;;;;;;;;;;;iBAkBpB,SAAS,YAAY,qBAAqB;;;;UCXjD,wBAAwB;;;;;;EAOvC;;;;;;;;EASA;;;;;;EAOA;;;;;;;;;;;;;;;;;;iBAqBsB,MAAM,YAAY,kBAAkB;;;;UCpD3C,yBAAyB;;;;;;;;;;;;;iBAgBlB,OAAO,YAAY,mBAAmB;;;;UCV7C;;;;EAKf,QAAQ;;;;;UCXO;;;;;;EAOf;;;;;;UCNe;;;;;;EAOf;;;;;EAMA;;;;;;;;;EAUA;;KAKU,gCAAgC,eAAe;;;;UC3B1C,0BAA0B;;;;EAKzC,QAAQ;;;;;EAMR,WAAW;;;;;EAMX,YAAY;;;;;;;;;;;iBAcU,QAAQ,YAAY,oBAAoB;;;;UCnC/C,2BAA2B;;;;EAK1C;;;;;;;;;;;;iBAesB,SAAS,YAAY,qBAAqB;;;;UClBjD,6BAA6B;;;;;;;;;;;;;iBAgBtB,WAAW,YAAY,uBAAuB;;;;iBCerD;;;;;EAMf;;;;EAKA;;;;;EAMA;;;;EAKA,WAAW;;;;EAKX,WAAW;;;;EAKX,YAAY;;;;EAKZ,MAAM;;;;EAKN,QAAQ;;;;;qBAQG;;;;;;;;;;;;;;;;;;;;;;;;;;wBA6BG,aAAa,SAAS,mBAAmB,SAAS,MAAM,cAAc,UAAU,iBAAiB,cAAc"}
@@ -1,7 +1,7 @@
1
- import { t as PathResolver } from "../resolver-CKKbaGEf.mjs";
1
+ import { t as PathResolver } from "../resolver-COtuVv5w.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import { defineConfig as defineConfig$1, globalIgnores } from "@eslint/config-helpers";
4
- import { dirname, extname, posix, sep } from "node:path";
4
+ import { dirname, extname, join, posix, resolve, sep } from "node:path";
5
5
  import eslintJs from "@eslint/js";
6
6
  import { configs, parser } from "typescript-eslint";
7
7
  import vuePlugin from "eslint-plugin-vue";
@@ -34,12 +34,11 @@ import reactHooksPlugin from "eslint-plugin-react-hooks";
34
34
  import { reactRefresh } from "eslint-plugin-react-refresh";
35
35
  import jsxA11yPlugin from "eslint-plugin-jsx-a11y";
36
36
  import { AST_NODE_TYPES, ESLintUtils } from "@typescript-eslint/utils";
37
- import { lstatSync } from "node:fs";
37
+ import { existsSync, lstatSync } from "node:fs";
38
38
  import pm from "picomatch";
39
- import * as find from "empathic/find";
40
39
  import eslintPlugin from "eslint-plugin-eslint-plugin";
41
40
  import * as babelParser from "@babel/eslint-parser";
42
- //#region src/utils/utils.ts
41
+ // src/utils/utils.ts
43
42
  /**
44
43
  * Creates an iterator that visits all truthy elements of all deeply nested
45
44
  * arrays.
@@ -72,8 +71,7 @@ function* yieldDeepArrays(...arrays) {
72
71
  function flattenDeepArrays(...arrays) {
73
72
  return [...yieldDeepArrays(...arrays)];
74
73
  }
75
- //#endregion
76
- //#region src/eslint/shared/env-utils.ts
74
+ // src/eslint/shared/env-utils.ts
77
75
  /**
78
76
  * File extensions for JavaScript source files.
79
77
  */
@@ -286,8 +284,7 @@ function getCommaDangleConfig(stylisticConfig) {
286
284
  const { dangle } = stylisticConfig;
287
285
  return dangle === "always" ? ["error", "always-multiline"] : dangle === "never" ? ["error", "never"] : "off";
288
286
  }
289
- //#endregion
290
- //#region src/eslint/shared/restricted.ts
287
+ // src/eslint/shared/restricted.ts
291
288
  /**
292
289
  * Creates a rules configuration record for all restricted items.
293
290
  *
@@ -370,8 +367,7 @@ function restrictedRulesConfig(baseName, envOptions, fixed) {
370
367
  const items = mergeRestrictedItems(fixed, restricted);
371
368
  return [createConfig(baseName, envOptions, { rules: createRulesConfig((key) => items[key]) }), restricted?.overrides?.map((override, index) => createConfig(`${baseName}.override-${index}`, override, { rules: createRulesConfig((key) => flattenDeepArrays(items[key], override[key])) }))];
372
369
  }
373
- //#endregion
374
- //#region src/eslint/core/base.ts
370
+ // src/eslint/core/base.ts
375
371
  /**
376
372
  * Defines standard module settings and additional rules targeting JavaScript
377
373
  * _and_ TypeScript source files.
@@ -488,8 +484,7 @@ function base(languageConfig) {
488
484
  }
489
485
  ];
490
486
  }
491
- //#endregion
492
- //#region src/eslint/core/js.ts
487
+ // src/eslint/core/js.ts
493
488
  /**
494
489
  * Defines additional standard rules targeting JavaScript but _not_ TypeScript
495
490
  * source files.
@@ -518,8 +513,7 @@ function js() {
518
513
  }
519
514
  };
520
515
  }
521
- //#endregion
522
- //#region src/eslint/core/ts.ts
516
+ // src/eslint/core/ts.ts
523
517
  /**
524
518
  * Names of all `typescript-eslint` presets to be included.
525
519
  */
@@ -623,8 +617,7 @@ function ts(rootDir) {
623
617
  }
624
618
  ];
625
619
  }
626
- //#endregion
627
- //#region src/eslint/core/vue.ts
620
+ // src/eslint/core/vue.ts
628
621
  /**
629
622
  * Creates configuration objects with linter rules for Vue.js.
630
623
  *
@@ -730,8 +723,7 @@ function vue(rootDir, stylisticConfig, vueOptions) {
730
723
  files: VUE_GLOB
731
724
  }));
732
725
  }
733
- //#endregion
734
- //#region src/eslint/core/json.ts
726
+ // src/eslint/core/json.ts
735
727
  /**
736
728
  * Defines standard linting rules for JSON files.
737
729
  *
@@ -765,8 +757,7 @@ function json(stylisticConfig) {
765
757
  rules: { "jsonc/no-comments": "off" }
766
758
  });
767
759
  }
768
- //#endregion
769
- //#region src/eslint/core/yaml.ts
760
+ // src/eslint/core/yaml.ts
770
761
  /**
771
762
  * Defines standard linting rules for YAML files.
772
763
  *
@@ -793,8 +784,7 @@ function yaml(stylisticConfig) {
793
784
  }
794
785
  });
795
786
  }
796
- //#endregion
797
- //#region src/eslint/core/markdown.ts
787
+ // src/eslint/core/markdown.ts
798
788
  /**
799
789
  * Defines standard linting rules for Markdown files.
800
790
  *
@@ -810,8 +800,7 @@ function markdown() {
810
800
  name: `core.markdown.recommended-${index}`
811
801
  }));
812
802
  }
813
- //#endregion
814
- //#region src/eslint/core/license.ts
803
+ // src/eslint/core/license.ts
815
804
  /**
816
805
  * Checks the existence of license headers in source files.
817
806
  *
@@ -832,8 +821,7 @@ function license(path) {
832
821
  rules: { "license-header/header": ["error", path] }
833
822
  };
834
823
  }
835
- //#endregion
836
- //#region src/eslint/core/directives.ts
824
+ // src/eslint/core/directives.ts
837
825
  /**
838
826
  * Checks inline linter directives.
839
827
  *
@@ -846,8 +834,7 @@ function license(path) {
846
834
  function directives() {
847
835
  return createConfig("core.directives.recommended", { files: [...SRC_GLOB, ...VUE_GLOB] }, commentsPluginConfigs.recommended, { "@eslint-community/eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }] });
848
836
  }
849
- //#endregion
850
- //#region src/eslint/core/packages.ts
837
+ // src/eslint/core/packages.ts
851
838
  /**
852
839
  * Defines linting rules for outdated or unneeded external dependencies.
853
840
  *
@@ -872,8 +859,7 @@ function packages(packagesConfig) {
872
859
  }] }
873
860
  }];
874
861
  }
875
- //#endregion
876
- //#region src/eslint/core/regexp.ts
862
+ // src/eslint/core/regexp.ts
877
863
  /**
878
864
  * Checks the regular expressions in source files.
879
865
  *
@@ -891,8 +877,7 @@ function regexp() {
891
877
  name: "core.regexp.recommended"
892
878
  };
893
879
  }
894
- //#endregion
895
- //#region src/eslint/core/promises.ts
880
+ // src/eslint/core/promises.ts
896
881
  /**
897
882
  * Checks for correct usage of native promises.
898
883
  *
@@ -917,8 +902,7 @@ function promises() {
917
902
  }
918
903
  }];
919
904
  }
920
- //#endregion
921
- //#region src/eslint/core/jsdoc.ts
905
+ // src/eslint/core/jsdoc.ts
922
906
  /**
923
907
  * Checks the JSDoc comments in source files.
924
908
  *
@@ -975,8 +959,7 @@ function jsdoc$1() {
975
959
  }
976
960
  ];
977
961
  }
978
- //#endregion
979
- //#region src/eslint/core/stylistic.ts
962
+ // src/eslint/core/stylistic.ts
980
963
  /**
981
964
  * Defines standard (opinionated) linter rules for source code style.
982
965
  *
@@ -1126,8 +1109,7 @@ function stylistic(stylisticConfig) {
1126
1109
  }
1127
1110
  ];
1128
1111
  }
1129
- //#endregion
1130
- //#region src/eslint/env/node.ts
1112
+ // src/eslint/env/node.ts
1131
1113
  /**
1132
1114
  * Creates configuration objects with global symbols and linter rules for
1133
1115
  * NodeJS modules.
@@ -1173,8 +1155,7 @@ function node(envOptions) {
1173
1155
  })
1174
1156
  ];
1175
1157
  }
1176
- //#endregion
1177
- //#region src/eslint/env/browser.ts
1158
+ // src/eslint/env/browser.ts
1178
1159
  /**
1179
1160
  * Global builtin symbols that are confusing or deprecated.
1180
1161
  */
@@ -1258,8 +1239,7 @@ function browser(envOptions) {
1258
1239
  customRules("env.browser.rules", envOptions)
1259
1240
  ];
1260
1241
  }
1261
- //#endregion
1262
- //#region src/eslint/shared/unittest.ts
1242
+ // src/eslint/shared/unittest.ts
1263
1243
  /**
1264
1244
  * Conditionally creates configuration entries for the ESLint plugins
1265
1245
  * `eslint-plugin-jest-extended`, `eslint-plugin-jest-dom` and
@@ -1292,8 +1272,7 @@ function createUnitTestPluginConfigs(baseName, envOptions) {
1292
1272
  })
1293
1273
  ];
1294
1274
  }
1295
- //#endregion
1296
- //#region src/eslint/env/jest.ts
1275
+ // src/eslint/env/jest.ts
1297
1276
  /**
1298
1277
  * Creates configuration objects with global symbols and linter rules for unit
1299
1278
  * tests using Jest.
@@ -1347,8 +1326,7 @@ function jest(envOptions) {
1347
1326
  })
1348
1327
  ];
1349
1328
  }
1350
- //#endregion
1351
- //#region src/eslint/env/vitest.ts
1329
+ // src/eslint/env/vitest.ts
1352
1330
  /**
1353
1331
  * Creates configuration objects with global symbols and linter rules for unit
1354
1332
  * tests using Vitest.
@@ -1407,8 +1385,7 @@ function vitest(envOptions) {
1407
1385
  })
1408
1386
  ];
1409
1387
  }
1410
- //#endregion
1411
- //#region src/eslint/env/codecept.ts
1388
+ // src/eslint/env/codecept.ts
1412
1389
  /**
1413
1390
  * Creates configuration objects with global symbols and linter rules for E2E
1414
1391
  * tests using CodeceptJS.
@@ -1451,8 +1428,7 @@ function codecept(envOptions) {
1451
1428
  })
1452
1429
  ];
1453
1430
  }
1454
- //#endregion
1455
- //#region src/eslint/shared/rule-utils.ts
1431
+ // src/eslint/shared/rule-utils.ts
1456
1432
  const FILE_EXTENSIONS = [
1457
1433
  "js",
1458
1434
  "ts",
@@ -1613,6 +1589,29 @@ function isFile(path) {
1613
1589
  return lstatSync(path, { throwIfNoEntry: false })?.isFile() ?? false;
1614
1590
  }
1615
1591
  /**
1592
+ * Searches for the first existing file or directory with one of the passed
1593
+ * names, starting in the specified directory, and walking up to the root
1594
+ * directory of the file system.
1595
+ *
1596
+ * @param names
1597
+ * The names of the files or directories to be found. In each directory, the
1598
+ * first existing name in this array wins.
1599
+ *
1600
+ * @param cwd
1601
+ * The directory to start searching in.
1602
+ *
1603
+ * @returns
1604
+ * The absolute path of the first existing file or directory found; or
1605
+ * `undefined`, if none of the names exists.
1606
+ */
1607
+ function findUp(names, cwd) {
1608
+ for (let dir = resolve(cwd);; dir = dirname(dir)) {
1609
+ const path = names.map((name) => join(dir, name)).find((file) => existsSync(file));
1610
+ if (path) return path;
1611
+ if (dirname(dir) === dir) return void 0;
1612
+ }
1613
+ }
1614
+ /**
1616
1615
  * A wrapper for an `import` or `export` statement containing a string literal
1617
1616
  * node with a module name, and the resulting extracted module name.
1618
1617
  */
@@ -1665,7 +1664,7 @@ var ProjectContext = class {
1665
1664
  constructor(context) {
1666
1665
  const sharedSettings = context.settings["env-project"];
1667
1666
  this.#aliasMap = new Map(Object.entries(sharedSettings?.alias ?? {}));
1668
- const configPath = find.any(CONFIG_FILES, { cwd: context.cwd });
1667
+ const configPath = findUp(CONFIG_FILES, context.cwd);
1669
1668
  if (!configPath) throw new Error("cannot find configuration file");
1670
1669
  const rootDir = toPosixPath(dirname(configPath));
1671
1670
  const fileName = toPosixPath(context.filename);
@@ -1761,8 +1760,7 @@ var ProjectContext = class {
1761
1760
  }
1762
1761
  }
1763
1762
  };
1764
- //#endregion
1765
- //#region src/eslint/rules/react/jsxShorthandBoolean.ts
1763
+ // src/eslint/rules/react/jsxShorthandBoolean.ts
1766
1764
  /**
1767
1765
  * Enforce shorthand notation for boolean JSX attributes.
1768
1766
  *
@@ -1780,8 +1778,7 @@ function jsxShorthandBoolean() {
1780
1778
  });
1781
1779
  } });
1782
1780
  }
1783
- //#endregion
1784
- //#region src/eslint/rules/react/preferDestructuringAssignment.ts
1781
+ // src/eslint/rules/react/preferDestructuringAssignment.ts
1785
1782
  /**
1786
1783
  * Enforce destructuring assignment for component props.
1787
1784
  *
@@ -1810,8 +1807,7 @@ function preferDestructuringAssignment() {
1810
1807
  } });
1811
1808
  };
1812
1809
  }
1813
- //#endregion
1814
- //#region src/eslint/env/react.ts
1810
+ // src/eslint/env/react.ts
1815
1811
  /**
1816
1812
  * Creates configuration objects with linter rules for ReactJS.
1817
1813
  *
@@ -1836,11 +1832,15 @@ function react(envOptions) {
1836
1832
  if (envOptions.effectHooks?.length) mergeSettings(settings, "react-x", { additionalEffectHooks: `/^(${envOptions.effectHooks.join("|")})$/` });
1837
1833
  return [
1838
1834
  createConfig("env.react.recommended", envOptions, {
1835
+ ...convertRuleWarningsToErrors(reactConfig),
1839
1836
  languageOptions: {
1837
+ ...reactConfig.languageOptions,
1840
1838
  parser,
1841
- parserOptions: { projectService: true }
1839
+ parserOptions: {
1840
+ ecmaFeatures: { jsx: true },
1841
+ projectService: true
1842
+ }
1842
1843
  },
1843
- ...convertRuleWarningsToErrors(reactConfig),
1844
1844
  settings
1845
1845
  }, {
1846
1846
  "@eslint-react/dom-no-unknown-property": "error",
@@ -1860,8 +1860,7 @@ function react(envOptions) {
1860
1860
  customRules("env.react.rules", envOptions)
1861
1861
  ];
1862
1862
  }
1863
- //#endregion
1864
- //#region src/eslint/env/eslint.ts
1863
+ // src/eslint/env/eslint.ts
1865
1864
  /**
1866
1865
  * Adds linter rules for ESLint plugin implementations.
1867
1866
  *
@@ -1882,15 +1881,14 @@ function eslint(envOptions) {
1882
1881
  "eslint-plugin/require-meta-docs-description": "error"
1883
1882
  })];
1884
1883
  }
1885
- //#endregion
1886
- //#region src/eslint/rules/project/noInvalidModules.ts
1884
+ // src/eslint/rules/project/noInvalidModules.ts
1887
1885
  var noInvalidModules_default = ESLintUtils.RuleCreator.withoutDocs({
1888
1886
  meta: {
1889
1887
  type: "problem",
1890
1888
  schema: [Schema.options({ external: Schema.array(Schema.stringNE()) })],
1889
+ defaultOptions: [{ external: [] }],
1891
1890
  messages: { SOURCE_FILE_NOT_FOUND: "Source file for `{{moduleName}}` not found." }
1892
1891
  },
1893
- defaultOptions: [{ external: [] }],
1894
1892
  create(context, [options]) {
1895
1893
  const projectContext = new ProjectContext(context);
1896
1894
  return { "ImportDeclaration, TSExternalModuleReference, ImportExpression, ExportAllDeclaration, ExportNamedDeclaration"(node) {
@@ -1908,8 +1906,7 @@ var noInvalidModules_default = ESLintUtils.RuleCreator.withoutDocs({
1908
1906
  } };
1909
1907
  }
1910
1908
  });
1911
- //#endregion
1912
- //#region src/eslint/rules/project/noInvalidHierarchy.ts
1909
+ // src/eslint/rules/project/noInvalidHierarchy.ts
1913
1910
  var noInvalidHierarchy_default = ESLintUtils.RuleCreator.withoutDocs({
1914
1911
  meta: {
1915
1912
  type: "problem",
@@ -1918,12 +1915,12 @@ var noInvalidHierarchy_default = ESLintUtils.RuleCreator.withoutDocs({
1918
1915
  extends: Schema.maybeArray(Schema.stringNE()),
1919
1916
  optional: Schema.boolean()
1920
1917
  }, ["files"]))],
1918
+ defaultOptions: [{}],
1921
1919
  messages: {
1922
1920
  UNEXPECTED_OPTIONAL_STATIC: "Unexpected static import of optional package.",
1923
1921
  INVALID_PACKAGE_HIERARCHY: "Low-level package cannot import modules from higher-level package."
1924
1922
  }
1925
1923
  },
1926
- defaultOptions: [{}],
1927
1924
  create(context, [options]) {
1928
1925
  const projectContext = new ProjectContext(context);
1929
1926
  const hierarchyMap = /* @__PURE__ */ new Map();
@@ -1964,8 +1961,7 @@ var noInvalidHierarchy_default = ESLintUtils.RuleCreator.withoutDocs({
1964
1961
  } };
1965
1962
  }
1966
1963
  });
1967
- //#endregion
1968
- //#region src/eslint/env/project.ts
1964
+ // src/eslint/env/project.ts
1969
1965
  /**
1970
1966
  * Adds custom linter rules for checking project setup and module hierarchy.
1971
1967
  *
@@ -1987,8 +1983,7 @@ function project(envOptions) {
1987
1983
  "env-project/no-invalid-hierarchy": envOptions.hierarchy ? ["error", envOptions.hierarchy] : "off"
1988
1984
  })];
1989
1985
  }
1990
- //#endregion
1991
- //#region src/eslint/env/tsconfig.ts
1986
+ // src/eslint/env/tsconfig.ts
1992
1987
  /**
1993
1988
  * Binds type-aware linter rules to an explicit TypeScript project
1994
1989
  * configuration file instead of the automatic project service.
@@ -2005,8 +2000,7 @@ function tsconfig(envOptions) {
2005
2000
  project: envOptions.project
2006
2001
  } } }), customRules("env.tsconfig.rules", envOptions)];
2007
2002
  }
2008
- //#endregion
2009
- //#region src/eslint/env/decorators.ts
2003
+ // src/eslint/env/decorators.ts
2010
2004
  /**
2011
2005
  * Adds support for native decorators in JavaScript source files.
2012
2006
  *
@@ -2035,8 +2029,7 @@ function decorators(envOptions) {
2035
2029
  }
2036
2030
  }), customRules("env.decorators.rules", envOptions)];
2037
2031
  }
2038
- //#endregion
2039
- //#region src/eslint/index.ts
2032
+ // src/eslint/index.ts
2040
2033
  /**
2041
2034
  * A collection with all available environment presets.
2042
2035
  */
@@ -2111,7 +2104,6 @@ function defineConfig(options, ...configs) {
2111
2104
  rules: options.rules
2112
2105
  }, configs.map((config) => typeof config === "function" ? config(resolver) : config)));
2113
2106
  }
2114
- //#endregion
2115
2107
  export { defineConfig, env };
2116
2108
 
2117
2109
  //# sourceMappingURL=index.mjs.map