@isentinel/eslint-config 6.1.0 → 6.2.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/dist/index.d.mts CHANGED
@@ -280,7 +280,9 @@ interface JsoncRuleDefaults {
280
280
  "*": ["error", "last"];
281
281
  };
282
282
  "jsonc/indent": {
283
- "*": ["error", "tab"];
283
+ "*": {
284
+ "severityOnly": "error";
285
+ };
284
286
  };
285
287
  "jsonc/key-spacing": {
286
288
  "*": ["error", {
@@ -2578,36 +2580,14 @@ interface MainRuleDefaults {
2578
2580
  "*": ["off", "beside"];
2579
2581
  };
2580
2582
  "style/indent": {
2581
- "*": ["off", "tab", {
2582
- "SwitchCase": 1;
2583
- "flatTernaryExpressions": false;
2584
- "ignoredNodes": ["TSUnionType", "TSIntersectionType"];
2585
- "ArrayExpression": 1;
2586
- "CallExpression": {
2587
- "arguments": 1;
2588
- };
2589
- "FunctionDeclaration": {
2590
- "body": 1;
2591
- "parameters": 1;
2592
- "returnType": 1;
2593
- };
2594
- "FunctionExpression": {
2595
- "body": 1;
2596
- "parameters": 1;
2597
- "returnType": 1;
2598
- };
2599
- "ignoreComments": false;
2600
- "ImportDeclaration": 1;
2601
- "MemberExpression": 1;
2602
- "ObjectExpression": 1;
2603
- "offsetTernaryExpressions": true;
2604
- "outerIIFEBody": 1;
2605
- "tabLength": 4;
2606
- "VariableDeclarator": 1;
2607
- }];
2583
+ "*": {
2584
+ "severityOnly": "off";
2585
+ };
2608
2586
  };
2609
2587
  "style/indent-binary-ops": {
2610
- "*": ["off", "tab"];
2588
+ "*": {
2589
+ "severityOnly": "off";
2590
+ };
2611
2591
  };
2612
2592
  "style/js/array-bracket-newline": {
2613
2593
  "*": "off";
@@ -2839,7 +2819,9 @@ interface MainRuleDefaults {
2839
2819
  "*": ["off", 4];
2840
2820
  };
2841
2821
  "style/jsx-indent-props": {
2842
- "*": ["off", "tab"];
2822
+ "*": {
2823
+ "severityOnly": "off";
2824
+ };
2843
2825
  };
2844
2826
  "style/jsx-max-props-per-line": {
2845
2827
  "*": ["off", {
@@ -27288,7 +27270,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
27288
27270
  onlyEquality?: boolean;
27289
27271
  }];
27290
27272
  // Names of all the configs
27291
- type ConfigNames = 'isentinel/eslint/comments' | 'isentinel/eslint/comments/src' | 'isentinel/e18e/rules' | 'isentinel/eslint-plugin/setup' | 'isentinel/eslint-plugin/rules' | 'isentinel/flawless/setup' | 'isentinel/flawless/rules' | 'isentinel/flawless/markdown-code' | 'isentinel/flawless/rules-type-aware' | 'isentinel/gitignore' | 'isentinel/ignores' | 'isentinel/imports/rules' | 'isentinel/imports/game' | 'isentinel/javascript/setup' | 'isentinel/javascript/rules' | 'isentinel/jsdoc/setup' | 'isentinel/jsdoc' | 'isentinel/jsonc/setup' | 'isentinel/jsonc/rules' | 'isentinel/jsonc/tsconfig' | 'isentinel/markdown/setup' | 'isentinel/markdown/processor' | 'isentinel/markdown/parser' | 'isentinel/markdown/disables' | 'isentinel/naming/setup' | 'isentinel/naming/ts/rules-type-aware' | 'isentinel/naming/tsx/rules-type-aware' | 'isentinel/node/rules' | 'isentinel/oxfmt/setup' | 'isentinel/oxfmt/javascript' | 'isentinel/oxfmt/typescript' | 'isentinel/oxfmt/css' | 'isentinel/oxfmt/scss' | 'isentinel/oxfmt/less' | 'isentinel/oxfmt/html' | 'isentinel/oxfmt/markdown' | 'isentinel/oxfmt/graphql' | 'isentinel/oxfmt/json' | 'isentinel/oxfmt/yaml' | 'isentinel/package-json/setup' | 'isentinel/package-json' | 'isentinel/package-json/root' | 'isentinel/perfectionist/setup' | 'isentinel/perfectionist' | 'isentinel/perfectionist/jsx' | 'isentinel/pnpm/setup' | 'isentinel/pnpm/package-json' | 'isentinel/pnpm/pnpm-workspace-yaml' | 'isentinel/project-structure/setup' | 'isentinel/project-structure/rules' | 'isentinel/promise' | 'isentinel/react/setup' | 'isentinel/react/setup/naming' | 'isentinel/react/setup/testing-library' | 'isentinel/react/rules' | 'isentinel/react/type-aware-rules' | 'isentinel/roblox/setup' | 'isentinel/roblox/parser' | 'isentinel/roblox/type-aware-parser' | 'isentinel/roblox' | 'isentinel/roblox/rules-type-aware' | 'isentinel/roblox/format-lua/setup' | 'isentinel/roblox/format-lua' | 'isentinel/small-rules/setup' | 'isentinel/small-rules' | 'isentinel/sonarjs' | 'isentinel/spelling/setup' | 'isentinel/spelling' | 'isentinel/stylistic/setup' | 'isentinel/stylistic' | 'isentinel/test/jest/setup' | 'isentinel/test/jest/rules' | 'isentinel/test/jest/type-tests' | 'isentinel/test/vitest/setup' | 'isentinel/test/vitest/rules' | 'isentinel/test/vitest/type-tests' | 'isentinel/toml/setup' | 'isentinel/toml/rules' | 'isentinel/typescript/setup' | 'isentinel/typescript/parser' | 'isentinel/typescript/type-aware-parser' | 'isentinel/typescript/rules' | 'isentinel/typescript/rules-type-aware' | 'isentinel/typescript/erasable-syntax-only' | 'isentinel/unicorn/setup' | 'isentinel/unicorn/rules' | 'isentinel/unicorn/root' | 'isentinel/yaml/setup' | 'isentinel/yaml/rules';
27273
+ type ConfigNames = 'isentinel/eslint/comments' | 'isentinel/eslint/comments/src' | 'isentinel/e18e/rules' | 'isentinel/eslint-plugin/setup' | 'isentinel/eslint-plugin/rules' | 'isentinel/flawless/setup' | 'isentinel/flawless/rules' | 'isentinel/flawless/markdown-code' | 'isentinel/flawless/rules-type-aware' | 'isentinel/gitignore' | 'isentinel/ignores' | 'isentinel/imports/rules' | 'isentinel/imports/game' | 'isentinel/javascript/setup' | 'isentinel/javascript/rules' | 'isentinel/jsdoc/setup' | 'isentinel/jsdoc' | 'isentinel/jsonc/setup' | 'isentinel/jsonc/rules' | 'isentinel/jsonc/tsconfig' | 'isentinel/markdown/setup' | 'isentinel/markdown/processor' | 'isentinel/markdown/parser' | 'isentinel/markdown/disables' | 'isentinel/naming/setup' | 'isentinel/naming/ts/rules-type-aware' | 'isentinel/naming/tsx/rules-type-aware' | 'isentinel/node/rules' | 'isentinel/oxfmt/setup' | 'isentinel/oxfmt/javascript' | 'isentinel/oxfmt/typescript' | 'isentinel/oxfmt/css' | 'isentinel/oxfmt/scss' | 'isentinel/oxfmt/less' | 'isentinel/oxfmt/html' | 'isentinel/oxfmt/markdown' | 'isentinel/oxfmt/graphql' | 'isentinel/oxfmt/json' | 'isentinel/oxfmt/json5' | 'isentinel/oxfmt/yaml' | 'isentinel/package-json/setup' | 'isentinel/package-json' | 'isentinel/package-json/root' | 'isentinel/perfectionist/setup' | 'isentinel/perfectionist' | 'isentinel/perfectionist/jsx' | 'isentinel/pnpm/setup' | 'isentinel/pnpm/package-json' | 'isentinel/pnpm/pnpm-workspace-yaml' | 'isentinel/project-structure/setup' | 'isentinel/project-structure/rules' | 'isentinel/promise' | 'isentinel/react/setup' | 'isentinel/react/setup/naming' | 'isentinel/react/setup/testing-library' | 'isentinel/react/rules' | 'isentinel/react/type-aware-rules' | 'isentinel/roblox/setup' | 'isentinel/roblox/parser' | 'isentinel/roblox/type-aware-parser' | 'isentinel/roblox' | 'isentinel/roblox/rules-type-aware' | 'isentinel/roblox/format-lua/setup' | 'isentinel/roblox/format-lua' | 'isentinel/small-rules/setup' | 'isentinel/small-rules' | 'isentinel/sonarjs' | 'isentinel/spelling/setup' | 'isentinel/spelling' | 'isentinel/stylistic/setup' | 'isentinel/stylistic' | 'isentinel/test/jest/setup' | 'isentinel/test/jest/rules' | 'isentinel/test/jest/type-tests' | 'isentinel/test/vitest/setup' | 'isentinel/test/vitest/rules' | 'isentinel/test/vitest/type-tests' | 'isentinel/toml/setup' | 'isentinel/toml/rules' | 'isentinel/typescript/setup' | 'isentinel/typescript/parser' | 'isentinel/typescript/type-aware-parser' | 'isentinel/typescript/rules' | 'isentinel/typescript/rules-type-aware' | 'isentinel/typescript/erasable-syntax-only' | 'isentinel/unicorn/setup' | 'isentinel/unicorn/rules' | 'isentinel/unicorn/root' | 'isentinel/yaml/setup' | 'isentinel/yaml/rules';
27292
27274
  //#endregion
27293
27275
  //#region src/utils.d.ts
27294
27276
  type ExtractRuleOptions<T> = T extends Linter.RuleEntry<infer U> ? U : never;
@@ -27333,6 +27315,21 @@ type OxfmtOptions = Omit<FormatConfig, "jsdoc"> & {
27333
27315
  lineWrappingStyle?: "balance" | "greedy";
27334
27316
  });
27335
27317
  };
27318
+ /** The widths oxfmt formats Markdown files with. */
27319
+ interface MarkdownWidths {
27320
+ printWidth?: number;
27321
+ tabWidth?: number;
27322
+ }
27323
+ /** A config override that changes the widths of some Markdown files. */
27324
+ /** Where an oxfmt override applies, relative to the config directory. */
27325
+ interface OverrideScope {
27326
+ /** Globs it skips: its `excludeFiles` and its negated `files`. */
27327
+ excludeFiles: Array<string>;
27328
+ files: Array<string>;
27329
+ }
27330
+ interface MarkdownWidthOverride extends OverrideScope {
27331
+ widths: MarkdownWidths;
27332
+ }
27336
27333
  //#endregion
27337
27334
  //#region src/types.d.ts
27338
27335
  type Awaitable<T> = Promise<T> | T;
@@ -27885,6 +27882,20 @@ interface OptionsConfig extends OptionsComponentExtensions, OptionsProjectType {
27885
27882
  * @requires eslint-plugin-eslint-plugin
27886
27883
  */
27887
27884
  eslintPlugin?: boolean | OptionsOverrides;
27885
+ /**
27886
+ * Where formatting runs.
27887
+ *
27888
+ * - `"eslint"`: oxfmt runs inside the linter as the `oxfmt/oxfmt` rule.
27889
+ * - `"standalone"`: oxfmt runs as its own tool (`oxfmt`, with an
27890
+ * `oxfmt.config.ts` built by `isentinelOxfmt` from
27891
+ * `@isentinel/eslint-config/oxfmt`). The linter keeps the
27892
+ * formatter-conflict disables and still reads the oxfmt config so
27893
+ * width-aware rules agree with it, but enables `oxfmt/oxfmt` nowhere.
27894
+ * Lua formatting (Stylua) stays in ESLint, as oxfmt does not format Lua.
27895
+ *
27896
+ * @default "eslint"
27897
+ */
27898
+ formatter?: "eslint" | "standalone";
27888
27899
  /**
27889
27900
  * Use external formatters to format files.
27890
27901
  *
@@ -28351,7 +28362,12 @@ declare const GLOB_ALL_SRC: string[];
28351
28362
  declare const GLOB_EXCLUDE: string[];
28352
28363
  //#endregion
28353
28364
  //#region src/eslint/configs/comments.d.ts
28354
- declare function comments({ prettierOptions, stylistic }?: OptionsFormatters & OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
28365
+ declare function comments({ markdownCode, markdownCodeOverrides, prettierOptions, stylistic }?: OptionsFormatters & OptionsStylistic & {
28366
+ /** The widths oxfmt formats Markdown code blocks with. */
28367
+ markdownCode?: MarkdownWidths;
28368
+ /** Oxfmt config overrides that change the Markdown widths. */
28369
+ markdownCodeOverrides?: Array<MarkdownWidthOverride>;
28370
+ }): Promise<Array<TypedFlatConfigItem>>;
28355
28371
  //#endregion
28356
28372
  //#region src/eslint/configs/disables.d.ts
28357
28373
  /**
@@ -28402,6 +28418,11 @@ declare function oxfmt(options?: OptionsComponentExtensions & OptionsFiles & Opt
28402
28418
  oxfmtOptions?: OxfmtOptions;
28403
28419
  oxlint?: boolean;
28404
28420
  prettierOptions?: Options;
28421
+ /**
28422
+ * Oxfmt runs as its own tool: keep the formatter-conflict
28423
+ * disables and the plain parsers but enable `oxfmt/oxfmt` nowhere.
28424
+ */
28425
+ standalone?: boolean;
28405
28426
  }): Promise<Array<TypedFlatConfigItem>>;
28406
28427
  //#endregion
28407
28428
  //#region src/eslint/configs/flawless.d.ts
@@ -28412,6 +28433,14 @@ declare function flawless(options?: FlawlessRuleOptions & OptionsOverridesTypeAw
28412
28433
  * linted as standard-TS/Node land.
28413
28434
  */
28414
28435
  complementIgnores?: Array<string>;
28436
+ /**
28437
+ * The widths oxfmt formats Markdown code blocks with, when it
28438
+ * formats Markdown: it formats embedded code with the Markdown
28439
+ * options, not the root ones.
28440
+ */
28441
+ markdownCode?: MarkdownWidths;
28442
+ /** Oxfmt config overrides that change the Markdown widths. */
28443
+ markdownCodeOverrides?: Array<MarkdownWidthOverride>;
28415
28444
  }, prettierOptions?: PrettierOptions): Promise<Array<TypedFlatConfigItem>>;
28416
28445
  //#endregion
28417
28446
  //#region src/eslint/configs/gitignore.d.ts
@@ -28419,7 +28448,7 @@ interface GitignoreOptions {
28419
28448
  config?: boolean | FlatGitignoreOptions;
28420
28449
  explicit?: boolean;
28421
28450
  }
28422
- declare function gitignore({ config, explicit }?: GitignoreOptions): Promise<Array<TypedFlatConfigItem>>;
28451
+ declare function gitignore$1({ config, explicit }?: GitignoreOptions): Promise<Array<TypedFlatConfigItem>>;
28423
28452
  //#endregion
28424
28453
  //#region src/eslint/configs/ignores.d.ts
28425
28454
  declare function ignores$1(userIgnores?: ((originals: Array<string>) => Array<string>) | Array<string>): Array<TypedFlatConfigItem>;
@@ -28441,7 +28470,19 @@ declare function javascript({ complementIgnores, isInEditor, overrides, roblox,
28441
28470
  declare function jsdoc({ full, stylistic, type }?: JsdocOptions & OptionsProjectType & OptionsStylistic): Array<TypedFlatConfigItem>;
28442
28471
  //#endregion
28443
28472
  //#region src/eslint/configs/jsonc.d.ts
28444
- declare function jsonc({ files, overrides, stylistic }?: OptionsFiles & OptionsOverrides & OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
28473
+ declare function jsonc({ bracketSpacing, files, formatIndent, layoutOverrides, overrides, singleQuote, stylistic }?: OptionsFiles & OptionsOverrides & OptionsStylistic & {
28474
+ /** Space inside braces; follows the formatter's `bracketSpacing`. */
28475
+ bracketSpacing?: boolean;
28476
+ /** The indent oxfmt writes, used unless `stylistic.indent` is set. */
28477
+ formatIndent?: "tab" | number;
28478
+ /**
28479
+ * Overrides that change oxfmt's JSON layout. The layout rules are off
28480
+ * where they apply.
28481
+ */
28482
+ layoutOverrides?: Array<OverrideScope>;
28483
+ /** JSON5 quotes; follows the formatter's `singleQuote`. */
28484
+ singleQuote?: boolean;
28485
+ }): Promise<Array<TypedFlatConfigItem>>;
28445
28486
  //#endregion
28446
28487
  //#region src/eslint/configs/markdown.d.ts
28447
28488
  /**
@@ -28591,4 +28632,4 @@ declare function unicorn({ complementIgnores, nameReplacements, roblox, root: cu
28591
28632
  //#region src/eslint/configs/yaml.d.ts
28592
28633
  declare function yaml({ files, overrides, stylistic }?: OptionsFiles & OptionsOverrides & OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
28593
28634
  //#endregion
28594
- export { type Awaitable, type ConfigNames, type ConfigSettings, type FlatConfigComposer, GLOB_ALL_JSON, GLOB_ALL_SRC, GLOB_BIN, GLOB_BUILD_CONFIGS, GLOB_CSS, GLOB_DTS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LINTABLE_EXTENSIONS, GLOB_LUA, GLOB_MARKDOWN, GLOB_MARKDOWN_BLOCKS, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_MISE, GLOB_PACKAGE_JSON, GLOB_PACKAGE_JSON_ROOT, GLOB_POSTCSS, GLOB_ROOT, GLOB_ROOT_SRC, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_SRC_EXTENSIONS, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG, GLOB_TSX, GLOB_TYPE_TESTS, GLOB_XML, GLOB_YAML, GitignoreOptions, type JsdocOptions, MARKDOWN_PROCESSOR_NAME, type NamedFlatConfigItem, type NamedOptionsConfig, type NamingConfig, type NamingSelector, type OptionsComponentExtensions, type OptionsConfig, type OptionsE18e, type OptionsFiles, type OptionsFilesTypeAware, type OptionsFormatters, type OptionsHasRoblox, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsJest, type OptionsOverrides, type OptionsOverridesTypeAware, type OptionsPnpm, type OptionsProjectType, type OptionsStylistic, type OptionsTestFramework, type OptionsTypeScriptErasableOnly, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type OptionsUnicorn, type OptionsVitest, type OxfmtOptions, type PerfectionistConfig, type PrettierOptions, type ProjectStructureConfig, ROBLOX_ALLOWED_WORDS, type ReactConfig, type ReactSettings, type Rules, type SpellCheckConfig, type StylisticConfig, StylisticConfigDefaults, type TypedFlatConfigItem, comments, isentinel as default, isentinel, defaultPluginRenaming, disables, e18e, eslintPlugin, flawless, gitignore, ignores$1 as ignores, imports, isAgentAutofixDisabled, isInAgentSession, isInEditorEnvironment, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, loadSmallRulesPlugin, markdown, naming, node, oxfmt, packageJson, perfectionist, pnpm, projectStructure, promise, react, roblox$1 as roblox, smallRules, sonarjs, sortCspell, sortGithubAction, sortMiseToml, sortPnpmWorkspace, sortRojoProject, sortTsconfig, spelling, stylistic$1 as stylistic, test, toml, typescript, unicorn, yaml };
28635
+ export { type Awaitable, type ConfigNames, type ConfigSettings, type FlatConfigComposer, GLOB_ALL_JSON, GLOB_ALL_SRC, GLOB_BIN, GLOB_BUILD_CONFIGS, GLOB_CSS, GLOB_DTS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LINTABLE_EXTENSIONS, GLOB_LUA, GLOB_MARKDOWN, GLOB_MARKDOWN_BLOCKS, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_MISE, GLOB_PACKAGE_JSON, GLOB_PACKAGE_JSON_ROOT, GLOB_POSTCSS, GLOB_ROOT, GLOB_ROOT_SRC, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_SRC_EXTENSIONS, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG, GLOB_TSX, GLOB_TYPE_TESTS, GLOB_XML, GLOB_YAML, GitignoreOptions, type JsdocOptions, MARKDOWN_PROCESSOR_NAME, type NamedFlatConfigItem, type NamedOptionsConfig, type NamingConfig, type NamingSelector, type OptionsComponentExtensions, type OptionsConfig, type OptionsE18e, type OptionsFiles, type OptionsFilesTypeAware, type OptionsFormatters, type OptionsHasRoblox, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsJest, type OptionsOverrides, type OptionsOverridesTypeAware, type OptionsPnpm, type OptionsProjectType, type OptionsStylistic, type OptionsTestFramework, type OptionsTypeScriptErasableOnly, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type OptionsUnicorn, type OptionsVitest, type OxfmtOptions, type PerfectionistConfig, type PrettierOptions, type ProjectStructureConfig, ROBLOX_ALLOWED_WORDS, type ReactConfig, type ReactSettings, type Rules, type SpellCheckConfig, type StylisticConfig, StylisticConfigDefaults, type TypedFlatConfigItem, comments, isentinel as default, isentinel, defaultPluginRenaming, disables, e18e, eslintPlugin, flawless, gitignore$1 as gitignore, ignores$1 as ignores, imports, isAgentAutofixDisabled, isInAgentSession, isInEditorEnvironment, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, loadSmallRulesPlugin, markdown, naming, node, oxfmt, packageJson, perfectionist, pnpm, projectStructure, promise, react, roblox$1 as roblox, smallRules, sonarjs, sortCspell, sortGithubAction, sortMiseToml, sortPnpmWorkspace, sortRojoProject, sortTsconfig, spelling, stylistic$1 as stylistic, test, toml, typescript, unicorn, yaml };