@isentinel/eslint-config 6.0.0-beta.24 → 6.0.0-beta.26

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.
@@ -0,0 +1,8 @@
1
+ import module from "node:module";
2
+
3
+ // ESLint's own bin enables this, so its CLI already benefits; a language server
4
+ // loading `dist/index.mjs` directly never does. Only the bins call it —
5
+ // `enableCompileCache` is a host-process side effect and the package declares
6
+ // `"sideEffects": false`. Importing it as a module keeps it ahead of the entry:
7
+ // static imports are evaluated before any statement of the importer.
8
+ module.enableCompileCache();
package/bin/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import "./compile-cache.js";
3
4
  import "../dist/cli.mjs";
package/bin/lint.js CHANGED
@@ -1,3 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import "./compile-cache.js";
3
4
  import "../dist/lint-cli.mjs";
package/dist/cli.mjs CHANGED
@@ -9,7 +9,7 @@ import path from "node:path";
9
9
  import { existsSync, readFileSync } from "fs";
10
10
  import { execSync } from "node:child_process";
11
11
  //#region package.json
12
- var version = "6.0.0-beta.24";
12
+ var version = "6.0.0-beta.26";
13
13
  var package_default = {
14
14
  name: "@isentinel/eslint-config",
15
15
  version,
@@ -62,8 +62,9 @@ var package_default = {
62
62
  "build:inspector": "pnpm build && pnpm dlx @eslint/config-inspector build --config eslint-inspector.config.ts --out-dir ./.eslint-config-inspector",
63
63
  "check:extensions": "node scripts/check-package-extensions.ts && node scripts/gen-package-extensions.ts --check",
64
64
  "check:published": "node scripts/check-published-extensions.ts",
65
+ "check:type-aware": "node scripts/typeawaregen.ts --check",
65
66
  "dev": "npx @eslint/config-inspector --config eslint-inspector.config.ts",
66
- "gen": "node scripts/typegen.ts && node scripts/typegen-oxlint.ts && node scripts/typegen-defaults.ts && node scripts/typegen-defaults-oxlint.ts && node scripts/versiongen.ts && node scripts/stylisticgen.ts && node scripts/gen-package-extensions.ts",
67
+ "gen": "node scripts/typegen.ts && node scripts/typegen-oxlint.ts && node scripts/typegen-defaults.ts && node scripts/typegen-defaults-oxlint.ts && node scripts/versiongen.ts && node scripts/stylisticgen.ts && node scripts/typeawaregen.ts && node scripts/gen-package-extensions.ts",
67
68
  "postgen": "echo 'Generation complete!'",
68
69
  "lint": "isentinel-lint",
69
70
  "oxlint": "oxlint",
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { FlatConfigComposer } from "eslint-flat-config-utils";
2
- import { StylisticCustomizeOptions } from "@stylistic/eslint-plugin";
3
2
  import { ParserOptions } from "@typescript-eslint/parser";
4
3
  import { SetRequired } from "type-fest";
5
4
  import { Linter } from "eslint";
5
+ import { StylisticCustomizeOptions } from "@stylistic/eslint-plugin";
6
6
  import { Options, Options as PrettierOptions } from "prettier";
7
7
  import { FormatConfig, JsdocConfig } from "oxfmt";
8
8
  //#region src/redundancy.d.ts
@@ -1867,6 +1867,84 @@ interface MainRuleDefaults {
1867
1867
  };
1868
1868
  "perfectionist/sort-objects": {
1869
1869
  "*": ["error", {
1870
+ "customGroups": [{
1871
+ "elementNamePattern": "^name$";
1872
+ "groupName": "name";
1873
+ }, {
1874
+ "elementNamePattern": "^filename$";
1875
+ "groupName": "filename";
1876
+ }, {
1877
+ "elementNamePattern": "^code$";
1878
+ "groupName": "code";
1879
+ }, {
1880
+ "elementNamePattern": "^output$";
1881
+ "groupName": "output";
1882
+ }, {
1883
+ "elementNamePattern": "^options$";
1884
+ "groupName": "options";
1885
+ }, {
1886
+ "elementNamePattern": "^parser$";
1887
+ "groupName": "parser";
1888
+ }, {
1889
+ "elementNamePattern": "^languageOptions$";
1890
+ "groupName": "languageOptions";
1891
+ }, {
1892
+ "elementNamePattern": "^parserOptions$";
1893
+ "groupName": "parserOptions";
1894
+ }, {
1895
+ "elementNamePattern": "^globals$";
1896
+ "groupName": "globals";
1897
+ }, {
1898
+ "elementNamePattern": "^env$";
1899
+ "groupName": "env";
1900
+ }, {
1901
+ "elementNamePattern": "^errors$";
1902
+ "groupName": "errors";
1903
+ }];
1904
+ "groups": ["name", "filename", "code", "output", "options", "parser", "languageOptions", "parserOptions", "globals", "env", "errors", "unknown"];
1905
+ "useConfigurationIf": {
1906
+ "matchesAstSelector": "Property[key.name=/^(?:invalid|valid)$/] > ArrayExpression > ObjectExpression";
1907
+ };
1908
+ }, {
1909
+ "customGroups": [{
1910
+ "elementNamePattern": "^name$";
1911
+ "groupName": "name";
1912
+ }, {
1913
+ "elementNamePattern": "^filename$";
1914
+ "groupName": "filename";
1915
+ }, {
1916
+ "elementNamePattern": "^code$";
1917
+ "groupName": "code";
1918
+ }, {
1919
+ "elementNamePattern": "^output$";
1920
+ "groupName": "output";
1921
+ }, {
1922
+ "elementNamePattern": "^options$";
1923
+ "groupName": "options";
1924
+ }, {
1925
+ "elementNamePattern": "^parser$";
1926
+ "groupName": "parser";
1927
+ }, {
1928
+ "elementNamePattern": "^languageOptions$";
1929
+ "groupName": "languageOptions";
1930
+ }, {
1931
+ "elementNamePattern": "^parserOptions$";
1932
+ "groupName": "parserOptions";
1933
+ }, {
1934
+ "elementNamePattern": "^globals$";
1935
+ "groupName": "globals";
1936
+ }, {
1937
+ "elementNamePattern": "^env$";
1938
+ "groupName": "env";
1939
+ }, {
1940
+ "elementNamePattern": "^errors$";
1941
+ "groupName": "errors";
1942
+ }];
1943
+ "groups": ["name", "filename", "code", "output", "options", "parser", "languageOptions", "parserOptions", "globals", "env", "errors", "unknown"];
1944
+ "useConfigurationIf": {
1945
+ "declarationMatchesPattern": "^(?:in)?valid(?:Cases|TestCases|Tests)?$";
1946
+ };
1947
+ }, {
1870
1948
  "customGroups": [{
1871
1949
  "elementNamePattern": "^id$";
1872
1950
  "groupName": "id";
@@ -4732,25 +4810,9 @@ interface ReactRuleDefaults {
4732
4810
  }];
4733
4811
  };
4734
4812
  "perfectionist/sort-objects": {
4735
- "*": ["error", {
4736
- "customGroups": [{
4737
- "elementNamePattern": "^id$";
4738
- "groupName": "id";
4739
- }, {
4740
- "elementNamePattern": "^key$";
4741
- "groupName": "key";
4742
- }, {
4743
- "elementNamePattern": "^name$";
4744
- "groupName": "name";
4745
- }, {
4746
- "elementNamePattern": ["\b(on[A-Z][a-zA-Z]*)\b"];
4747
- "groupName": "callbacks";
4748
- }, {
4749
- "elementNamePattern": ["^children$", "^ref$"];
4750
- "groupName": "react";
4751
- }];
4752
- "groups": ["id", "key", "name", "unknown", "react", "callbacks"];
4753
- }];
4813
+ "*": {
4814
+ "severityOnly": "error";
4815
+ };
4754
4816
  };
4755
4817
  "react-jsx/no-children-prop": {
4756
4818
  "*": "warn";
@@ -5057,7 +5119,7 @@ interface SourceFeatureRuleDefaults {
5057
5119
  "*": "error";
5058
5120
  };
5059
5121
  "eslint-plugin/test-case-property-ordering": {
5060
- "*": ["error", ["filename", "code", "output", "options", "parser", "languageOptions", "parserOptions", "globals", "env", "errors"]];
5122
+ "*": ["off", ["filename", "code", "output", "options", "parser", "languageOptions", "parserOptions", "globals", "env", "errors"]];
5061
5123
  };
5062
5124
  "eslint-plugin/test-case-shorthand-strings": {
5063
5125
  "*": ["error", "as-needed"];
@@ -27535,7 +27597,7 @@ declare function gitignore({ config, explicit }?: GitignoreOptions): Promise<Arr
27535
27597
  declare function ignores$1(userIgnores?: ((originals: Array<string>) => Array<string>) | Array<string>): Array<TypedFlatConfigItem>;
27536
27598
  //#endregion
27537
27599
  //#region src/eslint/configs/imports.d.ts
27538
- declare function imports({ stylistic, type }?: OptionsProjectType & OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
27600
+ declare function imports({ stylistic, type }?: OptionsProjectType & OptionsStylistic): Array<TypedFlatConfigItem>;
27539
27601
  //#endregion
27540
27602
  //#region src/eslint/configs/javascript.d.ts
27541
27603
  declare function javascript({ complementIgnores, isInEditor, overrides, roblox, stylistic }?: OptionsFiles & OptionsHasRoblox & OptionsIsInEditor & OptionsOverrides & OptionsStylistic & {
@@ -27548,13 +27610,18 @@ declare function javascript({ complementIgnores, isInEditor, overrides, roblox,
27548
27610
  }): Promise<Array<TypedFlatConfigItem>>;
27549
27611
  //#endregion
27550
27612
  //#region src/eslint/configs/jsdoc.d.ts
27551
- declare function jsdoc({ full, stylistic, type }?: JsdocOptions & OptionsProjectType & OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
27613
+ declare function jsdoc({ full, stylistic, type }?: JsdocOptions & OptionsProjectType & OptionsStylistic): Array<TypedFlatConfigItem>;
27552
27614
  //#endregion
27553
27615
  //#region src/eslint/configs/jsonc.d.ts
27554
27616
  declare function jsonc({ files, overrides, stylistic }?: OptionsFiles & OptionsOverrides & OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
27555
27617
  //#endregion
27556
27618
  //#region src/eslint/configs/markdown.d.ts
27557
- declare function markdown({ componentExts: componentExtensions, files, overrides, type }?: OptionsComponentExtensions & OptionsFiles & OptionsOverrides & OptionsProjectType): Promise<Array<TypedFlatConfigItem>>;
27619
+ /**
27620
+ * The plugin's own name for its processor, restated so it can be read without
27621
+ * loading the plugin. `test/lazy-plugin.spec.ts` asserts the two match.
27622
+ */
27623
+ declare const MARKDOWN_PROCESSOR_NAME = "@eslint/markdown/markdown";
27624
+ declare function markdown({ componentExts: componentExtensions, files, overrides, type }?: OptionsComponentExtensions & OptionsFiles & OptionsOverrides & OptionsProjectType): Array<TypedFlatConfigItem>;
27558
27625
  //#endregion
27559
27626
  //#region src/eslint/configs/naming.d.ts
27560
27627
  declare function naming(options?: NamingConfig & OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes): Promise<Array<TypedFlatConfigItem>>;
@@ -27575,13 +27642,13 @@ declare function packageJson({ roblox, stylistic, type }?: OptionsHasRoblox & Op
27575
27642
  * @returns The configuration.
27576
27643
  * @see https://github.com/azat-io/eslint-plugin-perfectionist
27577
27644
  */
27578
- declare function perfectionist(config?: OptionsProjectType & PerfectionistConfig): Promise<Array<TypedFlatConfigItem>>;
27645
+ declare function perfectionist(config?: OptionsProjectType & PerfectionistConfig): Array<TypedFlatConfigItem>;
27579
27646
  //#endregion
27580
27647
  //#region src/eslint/configs/pnpm.d.ts
27581
27648
  declare function pnpm(options: OptionsPnpm & Required<OptionsIsInEditor>): Promise<Array<TypedFlatConfigItem>>;
27582
27649
  //#endregion
27583
27650
  //#region src/eslint/configs/promise.d.ts
27584
- declare function promise(): Promise<Array<TypedFlatConfigItem>>;
27651
+ declare function promise(): Array<TypedFlatConfigItem>;
27585
27652
  //#endregion
27586
27653
  //#region src/eslint/configs/react.d.ts
27587
27654
  declare function react(options?: OptionsComponentExtensions & OptionsFiles & OptionsStylistic & OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes & ReactConfig): Promise<Array<TypedFlatConfigItem>>;
@@ -27591,16 +27658,15 @@ declare function roblox$1(options?: OptionsComponentExtensions & OptionsFilesTyp
27591
27658
  //#endregion
27592
27659
  //#region src/eslint/configs/small-rules.d.ts
27593
27660
  /**
27594
- * Load the Oxlint-native `@pobammer-ts/small-rules` plugin and adapt it for
27661
+ * Register the Oxlint-native `@pobammer-ts/small-rules` plugin, adapted for
27595
27662
  * ESLint. `eslintCompatPlugin` generates an ESLint `create` for the plugin's
27596
- * `createOnce` rules (`prefer-singular-enums`); it mutates the module in place
27597
- * and is idempotent, so the shared plugin object works under both linters
27598
- * wherever it is registered.
27663
+ * `createOnce` rules (`prefer-singular-enums`); it runs once, when the lazy
27664
+ * plugin hydrates, and the memoised object is shared by every registration.
27599
27665
  *
27600
27666
  * @returns The ESLint-compatible small-rules plugin.
27601
27667
  */
27602
- declare function loadSmallRulesPlugin(): Promise<NonNullable<TypedFlatConfigItem["plugins"]>[string]>;
27603
- declare function smallRules(options?: OptionsComponentExtensions & OptionsFiles & OptionsIsInEditor & OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
27668
+ declare function loadSmallRulesPlugin(): NonNullable<TypedFlatConfigItem["plugins"]>[string];
27669
+ declare function smallRules(options?: OptionsComponentExtensions & OptionsFiles & OptionsIsInEditor & OptionsStylistic): Array<TypedFlatConfigItem>;
27604
27670
  //#endregion
27605
27671
  //#region src/eslint/configs/sonarjs.d.ts
27606
27672
  declare function sonarjs({ isInEditor, roblox }: OptionsHasRoblox & Required<OptionsIsInEditor>): Promise<Array<TypedFlatConfigItem>>;
@@ -27649,11 +27715,11 @@ declare function sortTsconfig(): Array<TypedFlatConfigItem>;
27649
27715
  declare function sortCspell(): Array<TypedFlatConfigItem>;
27650
27716
  //#endregion
27651
27717
  //#region src/eslint/configs/spelling.d.ts
27652
- declare function spelling(options?: OptionsComponentExtensions & OptionsFiles & OptionsIsInEditor & SpellCheckConfig): Promise<Array<TypedFlatConfigItem>>;
27718
+ declare function spelling(options?: OptionsComponentExtensions & OptionsFiles & OptionsIsInEditor & SpellCheckConfig): Array<TypedFlatConfigItem>;
27653
27719
  //#endregion
27654
27720
  //#region src/eslint/configs/stylistic.d.ts
27655
27721
  declare const StylisticConfigDefaults: StylisticConfig;
27656
- declare function stylistic$1(options?: StylisticConfig): Promise<Array<TypedFlatConfigItem>>;
27722
+ declare function stylistic$1(options?: StylisticConfig): Array<TypedFlatConfigItem>;
27657
27723
  //#endregion
27658
27724
  //#region src/eslint/configs/test.d.ts
27659
27725
  declare function test({ files, isInEditor, jest, overrides, roblox: isRoblox, stylistic, type, vitest }?: OptionsFiles & OptionsHasRoblox & OptionsIsInEditor & OptionsOverrides & OptionsProjectType & OptionsStylistic & OptionsTestFramework): Promise<Array<TypedFlatConfigItem>>;
@@ -27685,4 +27751,4 @@ declare function unicorn({ complementIgnores, nameReplacements, roblox, root: cu
27685
27751
  //#region src/eslint/configs/yaml.d.ts
27686
27752
  declare function yaml({ files, overrides, stylistic }?: OptionsFiles & OptionsOverrides & OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
27687
27753
  //#endregion
27688
- export { type Awaitable, type ConfigNames, type FlatConfigComposer, GLOB_ALL_JSON, GLOB_ALL_SRC, GLOB_BIN, GLOB_BUILD_TOOLS, 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, 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 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, promise, react, roblox$1 as roblox, smallRules, sonarjs, sortCspell, sortGithubAction, sortMiseToml, sortPnpmWorkspace, sortRojoProject, sortTsconfig, spelling, stylistic$1 as stylistic, test, toml, typescript, unicorn, yaml };
27754
+ export { type Awaitable, type ConfigNames, type FlatConfigComposer, GLOB_ALL_JSON, GLOB_ALL_SRC, GLOB_BIN, GLOB_BUILD_TOOLS, 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 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, promise, react, roblox$1 as roblox, smallRules, sonarjs, sortCspell, sortGithubAction, sortMiseToml, sortPnpmWorkspace, sortRojoProject, sortTsconfig, spelling, stylistic$1 as stylistic, test, toml, typescript, unicorn, yaml };