eslint-config-ash-nazg 39.4.0 → 39.6.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/CHANGES.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # eslint-config-ash-nazg CHANGES
2
2
 
3
+ ## 39.6.0
4
+
5
+ - chore: update deps. including `eslint-plugin-jsdoc`
6
+
7
+ ## 39.5.0
8
+
9
+ - chore: update eslint-plugin-jsdoc
10
+
3
11
  ## 39.4.0
4
12
 
5
13
  - chore: update deps.
package/babel.js CHANGED
@@ -19,7 +19,8 @@ export default function babelConfig (config) {
19
19
  languageOptions: {
20
20
  parser: babelParser,
21
21
  parserOptions: {
22
- ...config.languageOptions?.parserOptions,
22
+ // eslint-disable-next-line unicorn/no-useless-fallback-in-spread -- TS
23
+ ...config.languageOptions?.parserOptions ?? {},
23
24
  requireConfigFile: false
24
25
  }
25
26
  },
package/bare.js CHANGED
@@ -6,7 +6,9 @@ export default [
6
6
  name: 'ash-nazg/bare',
7
7
  rules: {
8
8
  'no-restricted-imports': ['error', {
9
- paths: builtinModules
9
+ paths: [...builtinModules, ...builtinModules.map((builtinModule) => {
10
+ return `node:${builtinModule}`;
11
+ })]
10
12
  }]
11
13
  }
12
14
  }
package/browser.js CHANGED
@@ -2,8 +2,7 @@ import eslintCompat from 'eslint-plugin-compat';
2
2
  import esCompat from 'eslint-plugin-escompat';
3
3
  // import noUnsanitized from 'eslint-plugin-no-unsanitized'; // Todo: Disable until https://github.com/mozilla/eslint-plugin-no-unsanitized/pull/239#issuecomment-2132867450
4
4
 
5
- /** @type {import('eslint').Linter.Config[]} */
6
- export default [
5
+ export default /** @type {import('eslint').Linter.Config[]} */ ([
7
6
  {
8
7
  name: 'ash-nazg/browser/settings',
9
8
  settings: {
@@ -23,4 +22,4 @@ export default [
23
22
  'no-implicit-globals': ['error', {lexicalBindings: true}]
24
23
  }
25
24
  }
26
- ];
25
+ ]);
package/cypress.js CHANGED
@@ -2,8 +2,7 @@ import cypress from 'eslint-plugin-cypress';
2
2
 
3
3
  import mochaPlus from './mocha-plus.js';
4
4
 
5
- /** @type {import('eslint').Linter.Config[]} */
6
- export default [
5
+ export default /** @type {import('eslint').Linter.Config[]} */ ([
7
6
  {
8
7
  ...(cypress.configs.recommended),
9
8
  files: ['cypress/**']
@@ -23,4 +22,4 @@ export default [
23
22
  'promise/always-return': 'off'
24
23
  }
25
24
  }
26
- ];
25
+ ]);
@@ -1 +1 @@
1
- {"version":3,"file":"babel.d.ts","sourceRoot":"","sources":["../babel.js"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,4CAHW,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,GAC5B,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,CA2E1C"}
1
+ {"version":3,"file":"babel.d.ts","sourceRoot":"","sources":["../babel.js"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,4CAHW,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,GAC5B,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,CA4E1C"}
package/dist/bare.d.ts CHANGED
@@ -2,7 +2,7 @@ declare const _default: {
2
2
  name: string;
3
3
  rules: {
4
4
  'no-restricted-imports': ["error", {
5
- paths: readonly string[];
5
+ paths: string[];
6
6
  }];
7
7
  };
8
8
  }[];
package/dist/browser.d.ts CHANGED
@@ -1,17 +1,3 @@
1
- declare const _default: ({
2
- readonly rules: Readonly<import("eslint").Linter.RulesRecord>;
3
- } | {
4
- name: string;
5
- basePath?: string;
6
- files?: Array<string | string[]>;
7
- ignores?: string[];
8
- language?: string;
9
- languageOptions?: import("eslint").Linter.LanguageOptions;
10
- linterOptions?: import("eslint").Linter.LinterOptions;
11
- processor?: string | import("eslint").Linter.Processor;
12
- plugins?: Record<string, import("eslint").ESLint.Plugin>;
13
- rules?: Partial<import("eslint").Linter.RulesRecord> | undefined;
14
- settings?: Record<string, unknown>;
15
- })[];
1
+ declare const _default: import("eslint").Linter.Config[];
16
2
  export default _default;
17
3
  //# sourceMappingURL=browser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../browser.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../browser.js"],"names":[],"mappings":"wBAI0B,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE"}
package/dist/cypress.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- declare const _default: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
1
+ declare const _default: import("eslint").Linter.Config[];
2
2
  export default _default;
3
3
  //# sourceMappingURL=cypress.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cypress.d.ts","sourceRoot":"","sources":["../cypress.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"cypress.d.ts","sourceRoot":"","sources":["../cypress.js"],"names":[],"mappings":"wBAI0B,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE"}
package/dist/index.d.ts CHANGED
@@ -7,6 +7,8 @@
7
7
  * }
8
8
  */
9
9
  export function addFiles(cfgs: import("eslint").Linter.Config | import("eslint").Linter.Config[], files: string[]): import("eslint").Linter.Config | import("eslint").Linter.Config[];
10
+ export default index;
11
+ export type Types = ("great-eye" | "sauron" | "saruman" | "polyglot" | "bare" | "node" | "browser" | "script" | "module" | "no-overrides" | "no-cypress" | "mocha" | "babel" | "third-party")[];
10
12
  /**
11
13
  * @typedef {("great-eye"|"sauron"|"saruman"|
12
14
  * "polyglot"|"bare"|"node"|"browser"|
@@ -18,7 +20,8 @@ export function addFiles(cfgs: import("eslint").Linter.Config | import("eslint")
18
20
  /**
19
21
  * @param {Types} types
20
22
  * @param {import('eslint').Linter.Config} [config]
23
+ * @throws {Error}
24
+ * @returns {import('eslint').Linter.Config[]}
21
25
  */
22
- export default function index(types: Types, config?: import("eslint").Linter.Config): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
23
- export type Types = ("great-eye" | "sauron" | "saruman" | "polyglot" | "bare" | "node" | "browser" | "script" | "module" | "no-overrides" | "no-cypress" | "mocha" | "babel" | "third-party")[];
26
+ declare function index(types: Types, config?: import("eslint").Linter.Config): import("eslint").Linter.Config[];
24
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":"AAyBA;;;;;;;EAOE;AACF,+BAPW,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,GACzC,OAAW,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,SAC1B,MAAM,EAAE,GACN,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,GAC1C,OAAY,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CAYpC;AAmBD;;;;;;;GAOG;AASH;;;GAGG;AACH,qCAHW,KAAK,WACL,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,yEA+GxC;oBAhIY,CAAC,WAAW,GAAC,QAAQ,GAAC,SAAS,GAC3C,UAAc,GAAC,MAAM,GAAC,MAAM,GAAC,SAAS,GACtC,QAAY,GAAC,QAAQ,GACrB,cAAkB,GAClB,YAAgB,GAAC,OAAO,GACxB,OAAW,GAAC,aAAa,CAAC,EAAE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":"AAyBA;;;;;;;EAOE;AACF,+BAPW,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,GACzC,OAAW,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,SAC1B,MAAM,EAAE,GACN,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,GAC1C,OAAY,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CAYpC;;oBAoBY,CAAC,WAAW,GAAC,QAAQ,GAAC,SAAS,GAC3C,UAAc,GAAC,MAAM,GAAC,MAAM,GAAC,SAAS,GACtC,QAAY,GAAC,QAAQ,GACrB,cAAkB,GAClB,YAAgB,GAAC,OAAO,GACxB,OAAW,GAAC,aAAa,CAAC,EAAE;AAN7B;;;;;;;GAOG;AASH;;;;;GAKG;AACH,8BALW,KAAK,WACL,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,GAE5B,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CA+G5C"}
@@ -1,4 +1,4 @@
1
- declare const _default: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
1
+ declare const _default: ESLintConfig[];
2
2
  export default _default;
3
3
  export type ESLintConfig = import("eslint").Linter.Config;
4
4
  //# sourceMappingURL=mocha-plus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mocha-plus.d.ts","sourceRoot":"","sources":["../mocha-plus.js"],"names":[],"mappings":";;2BAgBa,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM"}
1
+ {"version":3,"file":"mocha-plus.d.ts","sourceRoot":"","sources":["../mocha-plus.js"],"names":[],"mappings":"wBAuC0B,YAAY,EAAE;;2BAvB3B,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM"}
package/dist/mocha.d.ts CHANGED
@@ -3,15 +3,15 @@ declare const _default: {
3
3
  files: string[];
4
4
  languageOptions: {
5
5
  globals: {
6
- after: "readonly";
7
- afterEach: "readonly";
8
- before: "readonly";
9
- beforeEach: "readonly";
10
- describe: "readonly";
11
- it: "readonly";
12
- mocha: "readonly";
13
- xdescribe: "readonly";
14
- xit: "readonly";
6
+ after: string;
7
+ afterEach: string;
8
+ before: string;
9
+ beforeEach: string;
10
+ describe: string;
11
+ it: string;
12
+ mocha: string;
13
+ xdescribe: string;
14
+ xit: string;
15
15
  };
16
16
  ecmaVersion?: import("./detectEnv.js").EcmaVersion | undefined;
17
17
  };
package/dist/modules.d.ts CHANGED
@@ -3,16 +3,16 @@ declare const _default: {
3
3
  languageOptions: {
4
4
  parserOptions: {
5
5
  ecmaFeatures: {
6
- globalReturn: false;
6
+ globalReturn: boolean;
7
7
  };
8
8
  };
9
- sourceType: "module";
9
+ sourceType: string;
10
10
  globals: {
11
- __dirname: "off";
12
- __filename: "off";
13
- exports: "off";
14
- module: "off";
15
- require: "off";
11
+ __dirname: string;
12
+ __filename: string;
13
+ exports: string;
14
+ module: string;
15
+ require: string;
16
16
  };
17
17
  };
18
18
  }[];
@@ -1,77 +1,3 @@
1
- declare const _default: (import("eslint").Linter.Config<import("eslint").Linter.RulesRecord> | {
2
- name: string;
3
- languageOptions: {
4
- globals: {
5
- readonly AbortController: false;
6
- readonly AbortSignal: false;
7
- readonly AsyncDisposableStack: false;
8
- readonly atob: false;
9
- readonly Blob: false;
10
- readonly BroadcastChannel: false;
11
- readonly btoa: false;
12
- readonly ByteLengthQueuingStrategy: false;
13
- readonly clearInterval: false;
14
- readonly clearTimeout: false;
15
- readonly CloseEvent: false;
16
- readonly CompressionStream: false;
17
- readonly console: false;
18
- readonly CountQueuingStrategy: false;
19
- readonly crypto: false;
20
- readonly Crypto: false;
21
- readonly CryptoKey: false;
22
- readonly CustomEvent: false;
23
- readonly DecompressionStream: false;
24
- readonly DisposableStack: false;
25
- readonly DOMException: false;
26
- readonly Event: false;
27
- readonly EventTarget: false;
28
- readonly fetch: false;
29
- readonly File: false;
30
- readonly FormData: false;
31
- readonly Headers: false;
32
- readonly MessageChannel: false;
33
- readonly MessageEvent: false;
34
- readonly MessagePort: false;
35
- readonly navigator: false;
36
- readonly Navigator: false;
37
- readonly performance: false;
38
- readonly Performance: false;
39
- readonly PerformanceEntry: false;
40
- readonly PerformanceMark: false;
41
- readonly PerformanceMeasure: false;
42
- readonly PerformanceObserver: false;
43
- readonly PerformanceObserverEntryList: false;
44
- readonly PerformanceResourceTiming: false;
45
- readonly queueMicrotask: false;
46
- readonly ReadableByteStreamController: false;
47
- readonly ReadableStream: false;
48
- readonly ReadableStreamBYOBReader: false;
49
- readonly ReadableStreamBYOBRequest: false;
50
- readonly ReadableStreamDefaultController: false;
51
- readonly ReadableStreamDefaultReader: false;
52
- readonly Request: false;
53
- readonly Response: false;
54
- readonly setInterval: false;
55
- readonly setTimeout: false;
56
- readonly structuredClone: false;
57
- readonly SubtleCrypto: false;
58
- readonly SuppressedError: false;
59
- readonly TextDecoder: false;
60
- readonly TextDecoderStream: false;
61
- readonly TextEncoder: false;
62
- readonly TextEncoderStream: false;
63
- readonly TransformStream: false;
64
- readonly TransformStreamDefaultController: false;
65
- readonly URL: false;
66
- readonly URLPattern: false;
67
- readonly URLSearchParams: false;
68
- readonly WebAssembly: false;
69
- readonly WebSocket: false;
70
- readonly WritableStream: false;
71
- readonly WritableStreamDefaultController: false;
72
- readonly WritableStreamDefaultWriter: false;
73
- };
74
- };
75
- })[];
1
+ declare const _default: import("eslint").Linter.Config[];
76
2
  export default _default;
77
3
  //# sourceMappingURL=polyglot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"polyglot.d.ts","sourceRoot":"","sources":["../polyglot.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"polyglot.d.ts","sourceRoot":"","sources":["../polyglot.js"],"names":[],"mappings":"wBAG0B,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE"}
@@ -1,10 +1,12 @@
1
+ export default sauronNodeOverrides;
1
2
  /**
2
3
  * @param {import('./index.js').Types} types
3
4
  * @param {{
4
5
  * type?: "module"|"commonjs"
5
6
  * }} pkg
7
+ * @returns {import('eslint').Linter.Config[]}
6
8
  */
7
- export default function sauronNodeOverrides(types: import("./index.js").Types, pkg: {
9
+ declare function sauronNodeOverrides(types: import("./index.js").Types, pkg: {
8
10
  type?: "module" | "commonjs";
9
- }): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
11
+ }): import("eslint").Linter.Config[];
10
12
  //# sourceMappingURL=sauron-node-overrides.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sauron-node-overrides.d.ts","sourceRoot":"","sources":["../sauron-node-overrides.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,mDALW,OAAO,YAAY,EAAE,KAAK,OAC1B;IACN,IAAI,CAAC,EAAE,QAAQ,GAAC,UAAU,CAAA;CAC3B,yEAOH"}
1
+ {"version":3,"file":"sauron-node-overrides.d.ts","sourceRoot":"","sources":["../sauron-node-overrides.js"],"names":[],"mappings":";AAGA;;;;;;GAMG;AACH,4CANW,OAAO,YAAY,EAAE,KAAK,OAC1B;IACN,IAAI,CAAC,EAAE,QAAQ,GAAC,UAAU,CAAA;CAC3B,GACS,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CAO5C"}
@@ -1,97 +1,3 @@
1
- declare const _default: (import("eslint").Linter.Config<import("eslint").Linter.RulesRecord> | {
2
- name: string;
3
- languageOptions: {
4
- globals: {
5
- readonly __dirname: false;
6
- readonly __filename: false;
7
- readonly AbortController: false;
8
- readonly AbortSignal: false;
9
- readonly AsyncDisposableStack: false;
10
- readonly atob: false;
11
- readonly Blob: false;
12
- readonly BroadcastChannel: false;
13
- readonly btoa: false;
14
- readonly Buffer: false;
15
- readonly ByteLengthQueuingStrategy: false;
16
- readonly clearImmediate: false;
17
- readonly clearInterval: false;
18
- readonly clearTimeout: false;
19
- readonly CloseEvent: false;
20
- readonly CompressionStream: false;
21
- readonly console: false;
22
- readonly CountQueuingStrategy: false;
23
- readonly crypto: false;
24
- readonly Crypto: false;
25
- readonly CryptoKey: false;
26
- readonly CustomEvent: false;
27
- readonly DecompressionStream: false;
28
- readonly DisposableStack: false;
29
- readonly DOMException: false;
30
- readonly Event: false;
31
- readonly EventTarget: false;
32
- readonly exports: true;
33
- readonly fetch: false;
34
- readonly File: false;
35
- readonly FormData: false;
36
- readonly global: false;
37
- readonly Headers: false;
38
- readonly MessageChannel: false;
39
- readonly MessageEvent: false;
40
- readonly MessagePort: false;
41
- readonly module: false;
42
- readonly navigator: false;
43
- readonly Navigator: false;
44
- readonly performance: false;
45
- readonly Performance: false;
46
- readonly PerformanceEntry: false;
47
- readonly PerformanceMark: false;
48
- readonly PerformanceMeasure: false;
49
- readonly PerformanceObserver: false;
50
- readonly PerformanceObserverEntryList: false;
51
- readonly PerformanceResourceTiming: false;
52
- readonly process: false;
53
- readonly queueMicrotask: false;
54
- readonly ReadableByteStreamController: false;
55
- readonly ReadableStream: false;
56
- readonly ReadableStreamBYOBReader: false;
57
- readonly ReadableStreamBYOBRequest: false;
58
- readonly ReadableStreamDefaultController: false;
59
- readonly ReadableStreamDefaultReader: false;
60
- readonly Request: false;
61
- readonly require: false;
62
- readonly Response: false;
63
- readonly setImmediate: false;
64
- readonly setInterval: false;
65
- readonly setTimeout: false;
66
- readonly structuredClone: false;
67
- readonly SubtleCrypto: false;
68
- readonly SuppressedError: false;
69
- readonly TextDecoder: false;
70
- readonly TextDecoderStream: false;
71
- readonly TextEncoder: false;
72
- readonly TextEncoderStream: false;
73
- readonly TransformStream: false;
74
- readonly TransformStreamDefaultController: false;
75
- readonly URL: false;
76
- readonly URLPattern: false;
77
- readonly URLSearchParams: false;
78
- readonly WebAssembly: false;
79
- readonly WebSocket: false;
80
- readonly WritableStream: false;
81
- readonly WritableStreamDefaultController: false;
82
- readonly WritableStreamDefaultWriter: false;
83
- };
84
- sourceType: "script";
85
- parserOptions: {
86
- ecmaFeatures: {
87
- globalReturn: true;
88
- };
89
- };
90
- };
91
- rules: {
92
- 'import/no-commonjs': "off";
93
- strict: ["error", string];
94
- };
95
- })[];
1
+ declare const _default: import("eslint").Linter.Config[];
96
2
  export default _default;
97
3
  //# sourceMappingURL=script-node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"script-node.d.ts","sourceRoot":"","sources":["../script-node.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"script-node.d.ts","sourceRoot":"","sources":["../script-node.js"],"names":[],"mappings":"wBAG0B,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE"}
package/dist/script.d.ts CHANGED
@@ -1,17 +1,17 @@
1
1
  declare const _default: {
2
2
  name: string;
3
3
  languageOptions: {
4
- sourceType: "script";
4
+ sourceType: string;
5
5
  globals: {
6
- module: "readonly";
7
- exports: "readonly";
8
- require: "readonly";
9
- __dirname: "readonly";
10
- __filename: "readonly";
6
+ module: string;
7
+ exports: string;
8
+ require: string;
9
+ __dirname: string;
10
+ __filename: string;
11
11
  };
12
12
  parserOptions: {
13
13
  ecmaFeatures: {
14
- globalReturn: false;
14
+ globalReturn: boolean;
15
15
  };
16
16
  };
17
17
  };
package/index.js CHANGED
@@ -78,8 +78,10 @@ try {
78
78
  /**
79
79
  * @param {Types} types
80
80
  * @param {import('eslint').Linter.Config} [config]
81
+ * @throws {Error}
82
+ * @returns {import('eslint').Linter.Config[]}
81
83
  */
82
- export default function index (types, config) {
84
+ function index (types, config) {
83
85
  /** @type {import('eslint').Linter.Config[]} */
84
86
  const configs = [];
85
87
 
@@ -189,3 +191,5 @@ export default function index (types, config) {
189
191
 
190
192
  return configs;
191
193
  }
194
+
195
+ export default index;
package/mocha-plus.js CHANGED
@@ -37,8 +37,7 @@ function addTestFiles (config, name) {
37
37
  };
38
38
  }
39
39
 
40
- /** @type {ESLintConfig[]} */
41
- export default [
40
+ export default /** @type {ESLintConfig[]} */ ([
42
41
  addTestFiles(
43
42
  mochaPlugin.configs.recommended,
44
43
  'ash-nazg/test-files/mocha'
@@ -118,4 +117,4 @@ export default [
118
117
  }
119
118
  }, 'ash-nazg/test-files/mocha-plus'),
120
119
  ...mocha
121
- ];
120
+ ]);
package/overrides.js CHANGED
@@ -89,7 +89,9 @@ export default function overrides (types, pkg) {
89
89
  languageOptions: {
90
90
  ...cfg.languageOptions,
91
91
  globals: {
92
- ...cfg.languageOptions.globals,
92
+ // eslint-disable-next-line @stylistic/max-len -- Long
93
+ // eslint-disable-next-line unicorn/no-useless-fallback-in-spread -- TS
94
+ ...cfg.languageOptions.globals ?? {},
93
95
  ...globals.node
94
96
  }
95
97
  }
@@ -144,7 +146,8 @@ export default function overrides (types, pkg) {
144
146
  cfg.languageOptions.globals = {};
145
147
  }
146
148
  cfg.languageOptions.globals = {
147
- ...cfg.languageOptions.globals,
149
+ // eslint-disable-next-line unicorn/no-useless-fallback-in-spread -- TS
150
+ ...cfg.languageOptions.globals ?? {},
148
151
  ...globals.browser
149
152
  };
150
153
 
@@ -181,7 +184,9 @@ export default function overrides (types, pkg) {
181
184
  ecmaVersion: languageOptions.ecmaVersion,
182
185
  ...config.languageOptions,
183
186
  globals: {
184
- ...config.languageOptions?.globals,
187
+ // eslint-disable-next-line @stylistic/max-len -- Long
188
+ // eslint-disable-next-line unicorn/no-useless-fallback-in-spread -- TS
189
+ ...config.languageOptions?.globals ?? {},
185
190
  ...globals.node,
186
191
  ...(pkg.type === 'module'
187
192
  ? /** @type {import('eslint').Linter.Globals} */ ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-ash-nazg",
3
- "version": "39.4.0",
3
+ "version": "39.6.0",
4
4
  "description": "An expansion and tweaking of the \"standard\" config style for ESLint",
5
5
  "main": "index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -24,29 +24,30 @@
24
24
  "node": ">=20.0.0"
25
25
  },
26
26
  "dependencies": {
27
- "@babel/eslint-parser": "^7.28.4",
27
+ "@babel/eslint-parser": "^7.28.5",
28
28
  "@babel/eslint-plugin": "^7.27.1",
29
29
  "@babel/plugin-syntax-import-attributes": "^7.27.1",
30
30
  "@brettz9/eslint-plugin": "^3.0.0",
31
31
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
32
+ "@eslint/core": "^0.16.0",
32
33
  "@eslint/eslintrc": "^3.3.1",
33
- "@eslint/js": "^9.36.0",
34
- "@eslint/markdown": "^7.3.0",
34
+ "@eslint/js": "^9.38.0",
35
+ "@eslint/markdown": "^7.5.0",
35
36
  "@fintechstudios/eslint-plugin-chai-as-promised": "^3.1.0",
36
- "@stylistic/eslint-plugin": "^5.4.0",
37
- "browserslist": "^4.26.2",
37
+ "@stylistic/eslint-plugin": "^5.5.0",
38
+ "browserslist": "^4.27.0",
38
39
  "es-file-traverse": "^2.0.1",
39
40
  "eslint-plugin-array-func": "^5.1.0",
40
41
  "eslint-plugin-chai-expect": "^3.1.0",
41
42
  "eslint-plugin-chai-expect-keywords": "^3.1.0",
42
43
  "eslint-plugin-chai-friendly": "^1.1.0",
43
44
  "eslint-plugin-compat": "^6.0.2",
44
- "eslint-plugin-cypress": "^5.1.1",
45
+ "eslint-plugin-cypress": "^5.2.0",
45
46
  "eslint-plugin-escompat": "^3.11.4",
46
47
  "eslint-plugin-html": "^8.1.3",
47
48
  "eslint-plugin-import": "^2.32.0",
48
- "eslint-plugin-jsdoc": "^60.4.1",
49
- "eslint-plugin-mocha": "^11.1.0",
49
+ "eslint-plugin-jsdoc": "^61.1.6",
50
+ "eslint-plugin-mocha": "^11.2.0",
50
51
  "eslint-plugin-mocha-cleanup": "^1.11.3",
51
52
  "eslint-plugin-n": "^17.23.1",
52
53
  "eslint-plugin-no-unsanitized": "^4.1.4",
@@ -55,18 +56,18 @@
55
56
  "eslint-plugin-sonarjs": "^3.0.5",
56
57
  "eslint-plugin-unicorn": "^61.0.2",
57
58
  "globals": "^16.4.0",
58
- "semver": "^7.7.2"
59
+ "semver": "^7.7.3"
59
60
  },
60
61
  "peerDependencies": {
61
62
  "eslint": "^9.6.0"
62
63
  },
63
64
  "devDependencies": {
64
65
  "@scottnonnenberg/eslint-compare-config": "^1.1.0",
65
- "@types/node": "^24.5.2",
66
+ "@types/node": "^24.9.1",
66
67
  "@types/semver": "^7.7.1",
67
- "eslint": "^9.36.0",
68
+ "eslint": "^9.38.0",
68
69
  "rimraf": "^6.0.1",
69
- "typescript": "^5.9.2"
70
+ "typescript": "^5.9.3"
70
71
  },
71
72
  "scripts": {
72
73
  "test-3rd": "es-file-traverse --file ./main.js --node --cjs --ignoreResolutionErrors",
package/polyglot.js CHANGED
@@ -1,8 +1,7 @@
1
1
  import globals from 'globals';
2
2
  import bare from './bare.js';
3
3
 
4
- /** @type {import('eslint').Linter.Config[]} */
5
- export default [
4
+ export default /** @type {import('eslint').Linter.Config[]} */ ([
6
5
  {
7
6
  name: 'ash-nazg/polyglot',
8
7
  languageOptions: {
@@ -10,4 +9,4 @@ export default [
10
9
  }
11
10
  },
12
11
  ...bare
13
- ];
12
+ ]);
@@ -6,10 +6,13 @@ import overrides from './overrides.js';
6
6
  * @param {{
7
7
  * type?: "module"|"commonjs"
8
8
  * }} pkg
9
+ * @returns {import('eslint').Linter.Config[]}
9
10
  */
10
- export default function sauronNodeOverrides (types, pkg) {
11
+ function sauronNodeOverrides (types, pkg) {
11
12
  return [
12
13
  ...sauronNode(pkg),
13
14
  ...overrides(types, pkg)
14
15
  ];
15
16
  }
17
+
18
+ export default sauronNodeOverrides;
package/script-node.js CHANGED
@@ -1,8 +1,7 @@
1
1
  import node from 'eslint-plugin-n';
2
2
  import globals from 'globals';
3
3
 
4
- /** @type {import('eslint').Linter.Config[]} */
5
- export default [
4
+ export default /** @type {import('eslint').Linter.Config[]} */ ([
6
5
  node.configs['flat/recommended-script'],
7
6
  {
8
7
  name: 'ash-nazg/script-node',
@@ -23,4 +22,4 @@ export default [
23
22
  strict: ['error', 'global']
24
23
  }
25
24
  }
26
- ];
25
+ ]);