@jsse/eslint-config 0.8.5 → 0.8.6

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
@@ -1,5 +1,11 @@
1
1
  # @jsse/eslint-config
2
2
 
3
+ ## 0.8.6
4
+
5
+ ### Patch Changes
6
+
7
+ - updated inputs/outpus etc
8
+
3
9
  ## 0.8.5
4
10
 
5
11
  ### Patch Changes
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { r as VERSION, t as DEBUG } from "./const-a9k0qaHM.js";
2
+ import { r as VERSION, t as DEBUG } from "./const-xMi9KGIh.js";
3
3
  import process from "node:process";
4
4
  import fs from "node:fs";
5
5
  import path from "node:path";
@@ -6052,7 +6052,8 @@ function object(labelOrParsers, maybeParsersOrOptions, maybeOptions) {
6052
6052
  return dispatchByMode(combinedMode, () => parseSync(context), () => parseAsync(context));
6053
6053
  },
6054
6054
  getSuggestRuntimeNodes(state, path) {
6055
- return buildSuggestRuntimeNodesFromPairs(parserPairs, state != null && typeof state === "object" ? state : objectParser.initialState, path);
6055
+ const stateRecord = state != null && typeof state === "object" ? state : objectParser.initialState;
6056
+ return buildSuggestRuntimeNodesFromPairs(parserPairs, stateRecord, path);
6056
6057
  },
6057
6058
  complete(state, exec) {
6058
6059
  return dispatchByMode(combinedMode, () => {
@@ -7098,7 +7099,8 @@ function extractDependencyMetadata(valueParser) {
7098
7099
  getDefaultDependencyValues: defaultValuesFn,
7099
7100
  replayParse,
7100
7101
  replaySuggest: suggestFn != null ? (prefix, depValues) => {
7101
- return suggestFn(prefix, isMultiSource ? depValues : depValues[0]);
7102
+ const depArg = isMultiSource ? depValues : depValues[0];
7103
+ return suggestFn(prefix, depArg);
7102
7104
  } : void 0
7103
7105
  } };
7104
7106
  }
@@ -7918,7 +7920,8 @@ function multiple(parser, options = {}) {
7918
7920
  const canExtendMultipleItem = (state, itemIndex, exec) => state != null && !isTerminalMultipleItemState(state) && (isMatchedCommandParserState(parser, state) || parser.canSkip?.(state, withChildExecPath(exec, itemIndex)) !== true);
7919
7921
  const parseSync = (context) => {
7920
7922
  const currentItemState = context.state.at(-1);
7921
- const canExtendCurrent = canExtendMultipleItem(currentItemState, context.state.length - 1, context.exec);
7923
+ const currentItemIndex = context.state.length - 1;
7924
+ const canExtendCurrent = canExtendMultipleItem(currentItemState, currentItemIndex, context.exec);
7922
7925
  const canOpenFreshItem = context.state.length < max;
7923
7926
  if (!canExtendCurrent && !canOpenFreshItem) return {
7924
7927
  success: true,
@@ -7998,7 +8001,8 @@ function multiple(parser, options = {}) {
7998
8001
  };
7999
8002
  const parseAsync = async (context) => {
8000
8003
  const currentItemState = context.state.at(-1);
8001
- const canExtendCurrent = canExtendMultipleItem(currentItemState, context.state.length - 1, context.exec);
8004
+ const currentItemIndex = context.state.length - 1;
8005
+ const canExtendCurrent = canExtendMultipleItem(currentItemState, currentItemIndex, context.exec);
8002
8006
  const canOpenFreshItem = context.state.length < max;
8003
8007
  if (!canExtendCurrent && !canOpenFreshItem) return {
8004
8008
  success: true,
@@ -8091,7 +8095,8 @@ function multiple(parser, options = {}) {
8091
8095
  initialState: [],
8092
8096
  canSkip(state, exec) {
8093
8097
  if (state.length < min) return false;
8094
- return !canExtendMultipleItem(state.at(-1), state.length - 1, exec);
8098
+ const currentItemState = state.at(-1);
8099
+ return !canExtendMultipleItem(currentItemState, state.length - 1, exec);
8095
8100
  },
8096
8101
  getSuggestRuntimeNodes(state, path) {
8097
8102
  const innerNodes = state.flatMap((item, i) => [...getInnerSuggestRuntimeNodes(item, [...path, i])]);
@@ -8192,7 +8197,8 @@ function multiple(parser, options = {}) {
8192
8197
  },
8193
8198
  suggest(context, prefix) {
8194
8199
  const currentItemState = context.state.at(-1);
8195
- const canExtendCurrent = canExtendMultipleItem(currentItemState, context.state.length - 1, context.exec);
8200
+ const currentItemIndex = context.state.length - 1;
8201
+ const canExtendCurrent = canExtendMultipleItem(currentItemState, currentItemIndex, context.exec);
8196
8202
  const canOpenNew = context.state.length < max;
8197
8203
  if (!canExtendCurrent && !canOpenNew) return dispatchIterableByMode(parser.mode, function* () {}, async function* () {});
8198
8204
  const itemIndex = canExtendCurrent ? context.state.length - 1 : context.state.length;
@@ -12293,10 +12299,11 @@ function runParser(parserOrProgram, programNameOrArgs, argsOrOptions, optionsPar
12293
12299
  maxWidth: maxWidth == null ? void 0 : maxWidth - 7,
12294
12300
  expandCommands: true
12295
12301
  }), 7)}`);
12296
- stderr(`Error: ${formatMessage(validationError, {
12302
+ const errorMessage = formatMessage(validationError, {
12297
12303
  colors,
12298
12304
  quotes: !colors
12299
- })}`);
12305
+ });
12306
+ stderr(`Error: ${errorMessage}`);
12300
12307
  return onError(1);
12301
12308
  };
12302
12309
  const displayHelp = (doc) => {
@@ -12351,7 +12358,8 @@ function runParser(parserOrProgram, programNameOrArgs, argsOrOptions, optionsPar
12351
12358
  let res = processStep(result);
12352
12359
  while (res === "continue") {
12353
12360
  const next = helpGeneratorParser.parse(validationContext);
12354
- res = processStep(next instanceof Promise ? await next : next);
12361
+ const resolved = next instanceof Promise ? await next : next;
12362
+ res = processStep(resolved);
12355
12363
  }
12356
12364
  if (res != null) return reportInvalidHelpCommand(res);
12357
12365
  const docOrPromise$1 = getDocPage(docGeneratorParser, classified.commands);
@@ -12393,10 +12401,11 @@ function runParser(parserOrProgram, programNameOrArgs, argsOrOptions, optionsPar
12393
12401
  maxWidth: maxWidth == null ? void 0 : maxWidth - 7,
12394
12402
  expandCommands: true
12395
12403
  }), 7)}`);
12396
- stderr(`Error: ${formatMessage(classified.error, {
12404
+ const errorMessage = formatMessage(classified.error, {
12397
12405
  colors,
12398
12406
  quotes: !colors
12399
- })}`);
12407
+ });
12408
+ stderr(`Error: ${errorMessage}`);
12400
12409
  return onError(1);
12401
12410
  };
12402
12411
  if (aboveError === "help") {
@@ -12412,18 +12421,20 @@ function runParser(parserOrProgram, programNameOrArgs, argsOrOptions, optionsPar
12412
12421
  const parserMode = parser.mode;
12413
12422
  return dispatchByMode(parserMode, () => {
12414
12423
  const attempted = attemptParseSync(parser, args);
12415
- const handled = handleResult(attempted.kind === "success" ? {
12424
+ const classified = attempted.kind === "success" ? {
12416
12425
  type: "success",
12417
12426
  value: attempted.value
12418
- } : classifyParseFailure(attempted, helpOptionConfig ? [...helpOptionNames] : [], helpCommandConfig ? [...helpCommandNames] : [], versionOptionConfig ? [...versionOptionNames] : [], versionCommandConfig ? [...versionCommandNames] : [], completionOptionConfig ? [...completionOptionNames] : [], completionCommandConfig ? [...completionCommandNames] : []));
12427
+ } : classifyParseFailure(attempted, helpOptionConfig ? [...helpOptionNames] : [], helpCommandConfig ? [...helpCommandNames] : [], versionOptionConfig ? [...versionOptionNames] : [], versionCommandConfig ? [...versionCommandNames] : [], completionOptionConfig ? [...completionOptionNames] : [], completionCommandConfig ? [...completionCommandNames] : []);
12428
+ const handled = handleResult(classified);
12419
12429
  if (handled instanceof Promise) throw new RunParserError("Synchronous parser returned async result.");
12420
12430
  return handled;
12421
12431
  }, async () => {
12422
12432
  const attempted = await attemptParseAsync(parser, args);
12423
- const handled = handleResult(attempted.kind === "success" ? {
12433
+ const classified = attempted.kind === "success" ? {
12424
12434
  type: "success",
12425
12435
  value: attempted.value
12426
- } : classifyParseFailure(attempted, helpOptionConfig ? [...helpOptionNames] : [], helpCommandConfig ? [...helpCommandNames] : [], versionOptionConfig ? [...versionOptionNames] : [], versionCommandConfig ? [...versionCommandNames] : [], completionOptionConfig ? [...completionOptionNames] : [], completionCommandConfig ? [...completionCommandNames] : []));
12436
+ } : classifyParseFailure(attempted, helpOptionConfig ? [...helpOptionNames] : [], helpCommandConfig ? [...helpCommandNames] : [], versionOptionConfig ? [...versionOptionNames] : [], versionCommandConfig ? [...versionCommandNames] : [], completionOptionConfig ? [...completionOptionNames] : [], completionCommandConfig ? [...completionCommandNames] : []);
12437
+ const handled = handleResult(classified);
12427
12438
  return handled instanceof Promise ? await handled : handled;
12428
12439
  });
12429
12440
  }
@@ -12885,38 +12896,59 @@ import jsse from "@jsse/eslint-config";
12885
12896
  export default jsse(
12886
12897
  {
12887
12898
  /**
12888
- * ===================
12889
- * jsse eslint options
12890
- * ===================
12891
- */
12892
- debug: false,
12893
-
12894
- /**
12895
- * Enable TypeScript support.
12899
+ * @jsse/eslint-config defaults
12900
+ *
12901
+ * Uncomment an option to override its default.
12896
12902
  */
12903
+ // command: true,
12904
+ // componentExts: [],
12905
+ // debug: false, // debugging of config
12906
+ // diagnostics: true, // report cfg problems/diagnostics
12907
+ // extendTsconfigLintGlobs: ["tsconfig.json", "tsconfig.*.json"],
12908
+ // fast: false,
12909
+ // filesTypeAware: ["**/*.{ts,tsx}"],
12910
+ // gitignore: true,
12911
+ // ignoresTypeAware: ["**/*.md/**"],
12912
+ // isInEditor: false, // Auto-detected from the environment.
12913
+ // jsonc: true,
12914
+ // jsx: true,
12915
+ // markdown: false,
12916
+ // off: [],
12917
+ // overrides: {
12918
+ // javascript: {},
12919
+ // jsonc: {},
12920
+ // markdown: {},
12921
+ // test: {},
12922
+ // typescript: {},
12923
+ // yaml: {},
12924
+ // },
12925
+ // parserOptions: {},
12926
+ // pnpm: false,
12927
+ // prettier: true,
12928
+ // preReturn: (configs) => configs,
12929
+ // react: false,
12930
+ // reactRefresh: false,
12931
+ // regexp: true,
12932
+ // reportUnusedDisableDirectives: true,
12933
+ // rootId: "jsse",
12934
+ // sortGeojson: false,
12935
+ // sortImports: false,
12936
+ // sortPackageJson: true,
12937
+ // sortTsconfig: true,
12938
+ // stylistic: true,
12939
+ // stylistic: { indent: 2, jsx: true, quotes: "double" },
12940
+ // test: false, // Auto-detected from installed dependencies.
12941
+ // tsPrefix: "@typescript-eslint",
12942
+ // typeAware: false,
12943
+ // typescript: true,
12897
12944
  // typescript: {
12898
- // tsconfig: "tsconfig.json", // or ["tsconfig.json", "tsconfig.eslint.json", ...]
12945
+ // overridesTypeAware: {},
12946
+ // strict: false,
12947
+ // tsconfig: "tsconfig.json",
12948
+ // typeAware: false,
12899
12949
  // },
12900
-
12901
- /**
12902
- * Enable React support.
12903
- * @default false
12904
- */
12905
- // react: true,
12906
- // reactRefresh: true,
12907
-
12908
- /**
12909
- * Report unused disable directives
12910
- * @default true
12911
- */
12912
- // reportUnusedDisableDirectives: false,
12913
-
12914
- /**
12915
- * rules 2 turn off
12916
- * @default []
12917
- * @example ["super-annoying-rule"]
12918
- */
12919
- // off: [],
12950
+ // useProjectService: false,
12951
+ // yaml: false,
12920
12952
  }
12921
12953
  );
12922
12954
  `;
@@ -12949,7 +12981,7 @@ function writeInitConfig(options) {
12949
12981
  console.log(`made ${configPath} (esm-only)`);
12950
12982
  }
12951
12983
  async function main() {
12952
- const parsed = run(PARSER, {
12984
+ const runOptions = {
12953
12985
  brief: message`\`@jsse/eslint-config\` ~ cli ~ v${VERSION}`,
12954
12986
  help: "both",
12955
12987
  programName: "jsselint",
@@ -12958,7 +12990,8 @@ async function main() {
12958
12990
  option: true,
12959
12991
  value: VERSION
12960
12992
  }
12961
- });
12993
+ };
12994
+ const parsed = run(PARSER, { ...runOptions });
12962
12995
  try {
12963
12996
  if (DEBUG || parsed.debug) {
12964
12997
  console.log("=====");
@@ -1,6 +1,6 @@
1
1
  import process from "node:process";
2
2
  //#region src/_generated/version.ts
3
- const VERSION = "0.8.5";
3
+ const VERSION = "0.8.6";
4
4
  //#endregion
5
5
  //#region src/const.ts
6
6
  /**
package/dist/index.d.ts CHANGED
@@ -16,7 +16,7 @@ import { Linter } from "eslint";
16
16
  import { FlatGitignoreOptions } from "eslint-config-flat-gitignore";
17
17
 
18
18
  //#region src/_generated/version.d.ts
19
- declare const VERSION = "0.8.5";
19
+ declare const VERSION = "0.8.6";
20
20
  //#endregion
21
21
  //#region src/_generated/dts/builtins.d.ts
22
22
  interface BuiltinsRuleOptions {
@@ -16323,9 +16323,10 @@ type OptionsConfig = OptionsComponentExts & OptionsTypeScriptParserOptions & {
16323
16323
  */
16324
16324
  debug?: boolean;
16325
16325
  /**
16326
- * Enable warnings. (default: true)
16326
+ * Enable configuration diagnostics.
16327
+ * @default true
16327
16328
  */
16328
- warnings?: boolean;
16329
+ diagnostics?: boolean;
16329
16330
  /**
16330
16331
  * Enable reporting of unused disable directives.
16331
16332
  * @default true
@@ -16334,7 +16335,7 @@ type OptionsConfig = OptionsComponentExts & OptionsTypeScriptParserOptions & {
16334
16335
  /**
16335
16336
  * Array of rules to turn off.
16336
16337
  */
16337
- off?: string[];
16338
+ off?: RuleName[] | Set<RuleName>;
16338
16339
  /**
16339
16340
  * Enable `eslint-plugin-command`
16340
16341
  * @default true
@@ -16479,6 +16480,9 @@ type OptionsConfig = OptionsComponentExts & OptionsTypeScriptParserOptions & {
16479
16480
  yaml?: Config["rules"];
16480
16481
  };
16481
16482
  };
16483
+ type NormalizedOptionsConfig = Omit<OptionsConfig, "off"> & {
16484
+ off: RuleName[];
16485
+ };
16482
16486
  type RenamePrefix<T extends Record<string, unknown>, FromPref extends string, ToPref extends string> = { [K in keyof T as K extends `${FromPref}${infer Rest}` ? `${ToPref}${Rest}` : K]: T[K] };
16483
16487
  //#endregion
16484
16488
  //#region src/const.d.ts
@@ -16528,7 +16532,7 @@ declare const GLOB_EXCLUDE: string[];
16528
16532
  //#endregion
16529
16533
  //#region src/options.d.ts
16530
16534
  declare function defaultOptions(): OptionsConfig;
16531
- declare function normalizeOptions(options?: OptionsConfig): OptionsConfig;
16535
+ declare function normalizeOptions(options?: OptionsConfig): NormalizedOptionsConfig;
16532
16536
  //#endregion
16533
16537
  //#region src/plugins.d.ts
16534
16538
  declare function importPluginReact(): Promise<{
@@ -16926,4 +16930,4 @@ declare function error2warn<T extends Config>(configs: T[]): T[];
16926
16930
  declare function warn2error<T extends Config>(configs: T[]): T[];
16927
16931
  declare function replaceTypescriptEslintPrefixInplace<T>(items: Record<string, T>, tsPrefix: string): void;
16928
16932
  //#endregion
16929
- export { type Awaitable, type Config, type EslintConfigFn, type JavascriptRuleOptions, type LanguageOptions, type OptionsCommon, type OptionsComponentExts, type OptionsConfig, type OptionsFiles, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsPrefix, type OptionsReact, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type RenamePrefix, type RuleName, type RulesRecord, SLOW_RULES, type StylisticConfig, type TailwindEslintSettings, type TailwindOptions, type TypedFlatConfigItemWithId, type TypescriptConfigRules, type UnPromise, VERSION, changeRuleEntrySeverity, combine, combineAsync, jsse as default, jsse, defaultOptions, defineConfig, error2warn, globs_d_exports as globs, importPluginMarkdown, importPluginReact, importPluginReactRefresh, importPluginStylistic, interopDefault, isCI, isInEditor, jsseReact, normalizeOptions, parserPlain, parserTs, pluginAntfu, pluginDeMorgan, pluginE18e, pluginEslintComments, pluginImportLite, pluginN, pluginPerfectionist, pluginPnpm, pluginRegexp, pluginTs, pluginUnicorn, pluginUnusedImports, renameRules, replaceTypescriptEslintPrefixInplace, scopeTypeScriptRules, turnOffRules, uniqueStrings, warn2error };
16933
+ export { type Awaitable, type Config, type EslintConfigFn, type JavascriptRuleOptions, type LanguageOptions, type NormalizedOptionsConfig, type OptionsCommon, type OptionsComponentExts, type OptionsConfig, type OptionsFiles, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsPrefix, type OptionsReact, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type RenamePrefix, type RuleName, type RulesRecord, SLOW_RULES, type StylisticConfig, type TailwindEslintSettings, type TailwindOptions, type TypedFlatConfigItemWithId, type TypescriptConfigRules, type UnPromise, VERSION, changeRuleEntrySeverity, combine, combineAsync, jsse as default, jsse, defaultOptions, defineConfig, error2warn, globs_d_exports as globs, importPluginMarkdown, importPluginReact, importPluginReactRefresh, importPluginStylistic, interopDefault, isCI, isInEditor, jsseReact, normalizeOptions, parserPlain, parserTs, pluginAntfu, pluginDeMorgan, pluginE18e, pluginEslintComments, pluginImportLite, pluginN, pluginPerfectionist, pluginPnpm, pluginRegexp, pluginTs, pluginUnicorn, pluginUnusedImports, renameRules, replaceTypescriptEslintPrefixInplace, scopeTypeScriptRules, turnOffRules, uniqueStrings, warn2error };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { n as __exportAll, r as __toESM, t as __commonJSMin } from "./rolldown-runtime-DJK8HYOj.js";
2
- import { n as SLOW_RULES, r as VERSION, t as DEBUG } from "./const-a9k0qaHM.js";
2
+ import { n as SLOW_RULES, r as VERSION, t as DEBUG } from "./const-xMi9KGIh.js";
3
3
  import { builtinModules, createRequire } from "node:module";
4
4
  import process$1 from "node:process";
5
5
  import fs, { realpathSync, statSync } from "node:fs";
@@ -319,7 +319,7 @@ const parserPlain = {
319
319
  };
320
320
  function turnOffRules(configs, off, debug) {
321
321
  if (off.length > 0) {
322
- for (const rule of off) dbg(`turning-off: ${rule}`);
322
+ dbg("turning off rules: %O", off);
323
323
  const currentlyActiveRules = /* @__PURE__ */ new Set();
324
324
  for (const config of configs) {
325
325
  const cfgRules = Object.keys(config.rules ?? {});
@@ -337,6 +337,7 @@ function turnOffRules(configs, off, debug) {
337
337
  for (const rule of off) if (cfgRules[rule] !== void 0 && cfgRules[rule] !== "off" && cfgRules[rule] !== 0) cfgRules[rule] = "off";
338
338
  }
339
339
  }
340
+ dbg("finished turning off rules");
340
341
  }
341
342
  return configs;
342
343
  }
@@ -5037,13 +5038,11 @@ function typescriptRulesTypeAware() {
5037
5038
  }],
5038
5039
  "@typescript-eslint/no-import-type-side-effects": "error",
5039
5040
  "@typescript-eslint/no-unnecessary-qualifier": "error",
5040
- "@typescript-eslint/no-redundant-type-constituents": "warn",
5041
5041
  "@typescript-eslint/require-array-sort-compare": ["error", { ignoreStringArrays: true }],
5042
5042
  "@typescript-eslint/no-floating-promises": ["error", {
5043
5043
  ignoreVoid: true,
5044
5044
  ignoreIIFE: true
5045
- }],
5046
- "@typescript-eslint/no-deprecated": "warn"
5045
+ }]
5047
5046
  };
5048
5047
  }
5049
5048
  function typescriptRulesTypeOblivious() {
@@ -5159,7 +5158,8 @@ function typescriptRulesTypeOblivious() {
5159
5158
  };
5160
5159
  }
5161
5160
  function tsPresetRules(props) {
5162
- return extractRules(props?.typeAware ? props.strict ? tseslint.configs.strictTypeChecked : tseslint.configs.recommendedTypeChecked : props?.strict ? tseslint.configs.strict : tseslint.configs.recommended);
5161
+ const tseslintConfig = props?.typeAware ? props.strict ? tseslint.configs.strictTypeChecked : tseslint.configs.recommendedTypeChecked : props?.strict ? tseslint.configs.strict : tseslint.configs.recommended;
5162
+ return extractRules(tseslintConfig);
5163
5163
  }
5164
5164
  function typescriptRules(props) {
5165
5165
  const normalized = {
@@ -5174,7 +5174,9 @@ function typescriptRules(props) {
5174
5174
  return {
5175
5175
  ...rulesFromPreset,
5176
5176
  ...typescriptRulesTypeOblivious(),
5177
- ...normalized.typeAware && typescriptRulesTypeAware()
5177
+ ...normalized.typeAware && typescriptRulesTypeAware(),
5178
+ ...normalized.typeAware && !normalized.strict && { "@typescript-eslint/no-deprecated": "error" },
5179
+ ...normalized.typeAware && normalized.strict && { "@typescript-eslint/no-unnecessary-condition": ["error", { allowConstantLoopConditions: "only-allowed-literals" }] }
5178
5180
  };
5179
5181
  }
5180
5182
  //#endregion
@@ -11748,7 +11750,8 @@ function getFileProtocolModuleFormat(url, _context, ignoreErrors) {
11748
11750
  const format = extensionFormatMap[value];
11749
11751
  if (format) return format;
11750
11752
  if (ignoreErrors) return;
11751
- throw new ERR_UNKNOWN_FILE_EXTENSION(value, fileURLToPath(url));
11753
+ const filepath = fileURLToPath(url);
11754
+ throw new ERR_UNKNOWN_FILE_EXTENSION(value, filepath);
11752
11755
  }
11753
11756
  function getHttpProtocolModuleFormat() {}
11754
11757
  /**
@@ -11957,7 +11960,8 @@ function exportsNotFound(subpath, packageJsonUrl, base) {
11957
11960
  * @returns {never}
11958
11961
  */
11959
11962
  function throwInvalidSubpath(request, match, packageJsonUrl, internal, base) {
11960
- throw new ERR_INVALID_MODULE_SPECIFIER(request, `request is not a valid match in pattern "${match}" for the "${internal ? "imports" : "exports"}" resolution of ${fileURLToPath(packageJsonUrl)}`, base && fileURLToPath(base));
11963
+ const reason = `request is not a valid match in pattern "${match}" for the "${internal ? "imports" : "exports"}" resolution of ${fileURLToPath(packageJsonUrl)}`;
11964
+ throw new ERR_INVALID_MODULE_SPECIFIER(request, reason, base && fileURLToPath(base));
11961
11965
  }
11962
11966
  /**
11963
11967
  * @param {string} subpath
@@ -12624,6 +12628,7 @@ function defaultOptions() {
12624
12628
  command: true,
12625
12629
  componentExts: [],
12626
12630
  debug: DEBUG && process$1.env.TEST !== "true",
12631
+ diagnostics: true,
12627
12632
  fast: false,
12628
12633
  gitignore: true,
12629
12634
  isInEditor: isInEditor(),
@@ -12647,15 +12652,23 @@ function defaultOptions() {
12647
12652
  tsPrefix: "@typescript-eslint",
12648
12653
  typeAware: false,
12649
12654
  typescript: typescriptExists,
12650
- warnings: true,
12651
12655
  yaml: false
12652
12656
  };
12653
12657
  }
12654
- function normalizeOptions(options = {}) {
12655
- const off = [.../* @__PURE__ */ new Set([...options.off ?? [], ...options.fast ? [...SLOW_RULES] : []])].sort((a, b) => a.localeCompare(b, void 0, {
12658
+ function normalizeOff(off) {
12659
+ const offArr = [...off instanceof Set ? off : new Set(off)].sort((a, b) => a.localeCompare(b, void 0, {
12656
12660
  numeric: true,
12657
12661
  sensitivity: "base"
12658
12662
  }));
12663
+ const offSet = off instanceof Set ? off : new Set(off);
12664
+ if (offArr.length !== offSet.size && offArr.length > 1) {
12665
+ for (let i = 1; i < offArr.length; i++) if (offArr[i] === offArr[i - 1]) warn(`Duplicate rule "${offArr[i]}" found in the "off" array`);
12666
+ }
12667
+ return offArr;
12668
+ }
12669
+ function normalizeOptions(options = {}) {
12670
+ const configuredOff = normalizeOff(options.off ?? []);
12671
+ const off = options.fast ? normalizeOff(/* @__PURE__ */ new Set([...configuredOff, ...SLOW_RULES])) : configuredOff;
12659
12672
  const stylisticOptions = options.stylistic === false ? false : typeof options.stylistic === "object" ? { ...options.stylistic } : {};
12660
12673
  if (stylisticOptions && !("jsx" in stylisticOptions)) stylisticOptions.jsx = options.jsx ?? true;
12661
12674
  const defaults = defaultOptions();
@@ -1 +1 @@
1
- {"root":["../src/cli.ts","../src/config-fns.ts","../src/configs.test.ts","../src/const.ts","../src/define-config.ts","../src/fixable.test.ts","../src/fixable.ts","../src/globs.ts","../src/index.ts","../src/lager.ts","../src/options.test.ts","../src/options.ts","../src/plugins-all.test.ts","../src/plugins-all.ts","../src/plugins.ts","../src/postprocess.test.ts","../src/postprocess.ts","../src/presets.ts","../src/types.ts","../src/utils.ts","../src/_generated/fixable-rules-map.ts","../src/_generated/rule-options.d.ts","../src/_generated/version.ts","../src/_generated/dts/antfu.d.ts","../src/_generated/dts/builtins.d.ts","../src/_generated/dts/command.d.ts","../src/_generated/dts/de-morgan.d.ts","../src/_generated/dts/e18e.d.ts","../src/_generated/dts/eslint-comments.d.ts","../src/_generated/dts/eslint-react.d.ts","../src/_generated/dts/ignores.d.ts","../src/_generated/dts/imports.d.ts","../src/_generated/dts/javascript.d.ts","../src/_generated/dts/jsdoc.d.ts","../src/_generated/dts/jsonc.d.ts","../src/_generated/dts/markdown.d.ts","../src/_generated/dts/n.d.ts","../src/_generated/dts/no-only-tests.d.ts","../src/_generated/dts/perfectionist.d.ts","../src/_generated/dts/pnpm.d.ts","../src/_generated/dts/prettier.d.ts","../src/_generated/dts/react-hooks.d.ts","../src/_generated/dts/regexp.d.ts","../src/_generated/dts/sort-package-json.d.ts","../src/_generated/dts/sort-tsconfig.d.ts","../src/_generated/dts/stylistic.d.ts","../src/_generated/dts/toml.d.ts","../src/_generated/dts/typescript.d.ts","../src/_generated/dts/unicorn.d.ts","../src/_generated/dts/vitest.d.ts","../src/_generated/dts/yml.d.ts","../src/configs/_template.ts","../src/configs/antfu.ts","../src/configs/command.ts","../src/configs/de-morgan.ts","../src/configs/disables.ts","../src/configs/e18e.ts","../src/configs/eslint-comments.ts","../src/configs/eslint-react.ts","../src/configs/ignores.ts","../src/configs/imports.ts","../src/configs/javascript.ts","../src/configs/jsdoc.ts","../src/configs/jsonc.ts","../src/configs/markdown.ts","../src/configs/n.ts","../src/configs/no-only-tests.ts","../src/configs/perfectionist.ts","../src/configs/pnpm.ts","../src/configs/prettier.ts","../src/configs/react-hooks.ts","../src/configs/react.ts","../src/configs/regexp.ts","../src/configs/rules.test.ts","../src/configs/sort-geojson.ts","../src/configs/sort-package-json.ts","../src/configs/sort-tsconfig.ts","../src/configs/stylistic.ts","../src/configs/toml.ts","../src/configs/tsdoc.ts","../src/configs/unicorn.ts","../src/configs/vitest.ts","../src/configs/yml.ts","../src/configs/_legacy/tailwind.ts","../src/configs/ts/parser.ts","../src/configs/ts/requires-type-checking.ts","../src/configs/ts/typescript-language-options.ts","../src/configs/ts/typescript-rules.ts","../src/configs/ts/typescript.ts"],"version":"6.0.3"}
1
+ {"root":["../src/cli.ts","../src/config-registry.test.ts","../src/config-registry.ts","../src/const.ts","../src/define-config.ts","../src/fixable.test.ts","../src/fixable.ts","../src/globs.ts","../src/index.ts","../src/lager.ts","../src/options.test.ts","../src/options.ts","../src/plugin-registry.test.ts","../src/plugin-registry.ts","../src/plugins.ts","../src/postprocess.test.ts","../src/postprocess.ts","../src/presets.ts","../src/types.ts","../src/utils.ts","../src/_generated/fixable-rules-map.ts","../src/_generated/rule-options.d.ts","../src/_generated/version.ts","../src/_generated/dts/antfu.d.ts","../src/_generated/dts/builtins.d.ts","../src/_generated/dts/command.d.ts","../src/_generated/dts/de-morgan.d.ts","../src/_generated/dts/e18e.d.ts","../src/_generated/dts/eslint-comments.d.ts","../src/_generated/dts/eslint-react.d.ts","../src/_generated/dts/ignores.d.ts","../src/_generated/dts/imports.d.ts","../src/_generated/dts/javascript.d.ts","../src/_generated/dts/jsdoc.d.ts","../src/_generated/dts/jsonc.d.ts","../src/_generated/dts/markdown.d.ts","../src/_generated/dts/n.d.ts","../src/_generated/dts/no-only-tests.d.ts","../src/_generated/dts/perfectionist.d.ts","../src/_generated/dts/pnpm.d.ts","../src/_generated/dts/prettier.d.ts","../src/_generated/dts/react-hooks.d.ts","../src/_generated/dts/regexp.d.ts","../src/_generated/dts/sort-package-json.d.ts","../src/_generated/dts/sort-tsconfig.d.ts","../src/_generated/dts/stylistic.d.ts","../src/_generated/dts/toml.d.ts","../src/_generated/dts/typescript.d.ts","../src/_generated/dts/unicorn.d.ts","../src/_generated/dts/vitest.d.ts","../src/_generated/dts/yml.d.ts","../src/configs/_template.ts","../src/configs/antfu.ts","../src/configs/command.ts","../src/configs/de-morgan.ts","../src/configs/disables.ts","../src/configs/e18e.ts","../src/configs/eslint-comments.ts","../src/configs/eslint-react.ts","../src/configs/ignores.ts","../src/configs/imports.ts","../src/configs/javascript.ts","../src/configs/jsdoc.ts","../src/configs/jsonc.ts","../src/configs/markdown.ts","../src/configs/n.ts","../src/configs/no-only-tests.ts","../src/configs/perfectionist.ts","../src/configs/pnpm.ts","../src/configs/prettier.ts","../src/configs/react-hooks.ts","../src/configs/react.ts","../src/configs/regexp.ts","../src/configs/rules.test.ts","../src/configs/sort-geojson.ts","../src/configs/sort-package-json.ts","../src/configs/sort-tsconfig.ts","../src/configs/stylistic.ts","../src/configs/toml.ts","../src/configs/tsdoc.ts","../src/configs/unicorn.ts","../src/configs/vitest.ts","../src/configs/yml.ts","../src/configs/_legacy/tailwind.ts","../src/configs/_legacy/typescript-legacy-rules.ts","../src/configs/ts/parser.ts","../src/configs/ts/requires-type-checking.ts","../src/configs/ts/typescript-language-options.ts","../src/configs/ts/typescript-rules.ts","../src/configs/ts/typescript.ts"],"version":"6.0.3"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jsse/eslint-config",
3
3
  "type": "module",
4
- "version": "0.8.5",
4
+ "version": "0.8.6",
5
5
  "description": "@jsse/eslint-config ~ WYSIWYG",
6
6
  "author": "jessekrubin <jessekrubin@gmail.com> (https://github.com/jessekrubin/)",
7
7
  "license": "MIT",
@@ -62,7 +62,7 @@
62
62
  "@e18e/eslint-plugin": "^0.5.1",
63
63
  "@eslint-community/eslint-plugin-eslint-comments": "^4.7.2",
64
64
  "@eslint/js": "^10.0.1",
65
- "@eslint/markdown": "^8.0.2",
65
+ "@eslint/markdown": "^8.0.3",
66
66
  "@stylistic/eslint-plugin": "5.10.0",
67
67
  "@typescript-eslint/eslint-plugin": "^8.62.1",
68
68
  "@typescript-eslint/parser": "^8.62.1",
@@ -90,7 +90,7 @@
90
90
  "eslint-plugin-yml": "^3.5.0",
91
91
  "jsonc-eslint-parser": "^3.1.0",
92
92
  "toml-eslint-parser": "^1.0.3",
93
- "typescript-eslint": "^8.62.0",
93
+ "typescript-eslint": "^8.62.1",
94
94
  "yaml-eslint-parser": "^2.0.0"
95
95
  },
96
96
  "devDependencies": {
@@ -111,14 +111,14 @@
111
111
  "execa": "~9.6.1",
112
112
  "fast-equals": "^6.0.0",
113
113
  "fast-glob": "^3.3.3",
114
- "fs-extra": "^11.3.5",
114
+ "fs-extra": "^11.3.6",
115
115
  "globals": "^17.7.0",
116
116
  "knip": "^6.23.0",
117
117
  "local-pkg": "^1.2.1",
118
- "oxfmt": "^0.56.0",
119
- "oxlint": "^1.71.0",
118
+ "oxfmt": "^0.57.0",
119
+ "oxlint": "^1.72.0",
120
120
  "picocolors": "^1.1.1",
121
- "prettier": "^3.9.3",
121
+ "prettier": "^3.9.4",
122
122
  "publint": "^0.3.21",
123
123
  "react": "~19.2.7",
124
124
  "rimraf": "^6.1.3",