@infernodesign/eslint-config 2.3.0 → 2.4.1

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.ts CHANGED
@@ -501,8 +501,7 @@ interface RuleOptions {
501
501
  */
502
502
  'dot-notation'?: Linter.RuleEntry<DotNotation>;
503
503
  /**
504
- * Bans a list of dependencies from being used
505
- * @see https://github.com/es-tooling/eslint-plugin-depend/blob/main/docs/rules/ban-dependencies.md
504
+ * Disallow dependencies in favor of more performant or secure alternatives
506
505
  */
507
506
  'e18e/ban-dependencies'?: Linter.RuleEntry<E18EBanDependencies>;
508
507
  /**
@@ -3303,11 +3302,6 @@ interface RuleOptions {
3303
3302
  */
3304
3303
  'radix'?: Linter.RuleEntry<Radix>;
3305
3304
  'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>;
3306
- /**
3307
- * Disallows higher order functions that define components or hooks inside them.
3308
- * @see https://eslint-react.xyz/docs/rules/component-hook-factories
3309
- */
3310
- 'react/component-hook-factories'?: Linter.RuleEntry<[]>;
3311
3305
  /**
3312
3306
  * Disallows DOM elements from using 'dangerouslySetInnerHTML'.
3313
3307
  * @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
@@ -3388,11 +3382,6 @@ interface RuleOptions {
3388
3382
  * @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
3389
3383
  */
3390
3384
  'react/dom-no-void-elements-with-children'?: Linter.RuleEntry<[]>;
3391
- /**
3392
- * Enforces importing React DOM via a namespace import.
3393
- * @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import
3394
- */
3395
- 'react/dom-prefer-namespace-import'?: Linter.RuleEntry<[]>;
3396
3385
  /**
3397
3386
  * Validates usage of Error Boundaries instead of try/catch for errors in child components.
3398
3387
  * @see https://eslint-react.xyz/docs/rules/error-boundaries
@@ -3403,6 +3392,11 @@ interface RuleOptions {
3403
3392
  * @see https://github.com/facebook/react/issues/14920
3404
3393
  */
3405
3394
  'react/exhaustive-deps'?: Linter.RuleEntry<ReactExhaustiveDeps>;
3395
+ /**
3396
+ * Validates against assignment/mutation of globals during render, part of ensuring that side effects must run outside of render.
3397
+ * @see https://eslint-react.xyz/docs/rules/globals
3398
+ */
3399
+ 'react/globals'?: Linter.RuleEntry<[]>;
3406
3400
  /**
3407
3401
  * Validates against mutating props, state, and other values that are immutable.
3408
3402
  * @see https://eslint-react.xyz/docs/rules/immutability
@@ -3598,11 +3592,6 @@ interface RuleOptions {
3598
3592
  * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
3599
3593
  */
3600
3594
  'react/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
3601
- /**
3602
- * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
3603
- * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
3604
- */
3605
- 'react/no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
3606
3595
  /**
3607
3596
  * Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks.
3608
3597
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
@@ -3618,16 +3607,6 @@ interface RuleOptions {
3618
3607
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
3619
3608
  */
3620
3609
  'react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
3621
- /**
3622
- * Disallows unnecessary usage of 'useCallback'.
3623
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
3624
- */
3625
- 'react/no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
3626
- /**
3627
- * Disallows unnecessary usage of 'useMemo'.
3628
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
3629
- */
3630
- 'react/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
3631
3610
  /**
3632
3611
  * Enforces that a function with the 'use' prefix uses at least one Hook inside it.
3633
3612
  * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
@@ -3669,7 +3648,7 @@ interface RuleOptions {
3669
3648
  */
3670
3649
  'react/no-unused-props'?: Linter.RuleEntry<[]>;
3671
3650
  /**
3672
- * Warns about unused class component state.
3651
+ * Warns about state variables that are defined but never used, or only used in effects.
3673
3652
  * @see https://eslint-react.xyz/docs/rules/no-unused-state
3674
3653
  */
3675
3654
  'react/no-unused-state'?: Linter.RuleEntry<[]>;
@@ -3678,16 +3657,6 @@ interface RuleOptions {
3678
3657
  * @see https://eslint-react.xyz/docs/rules/no-use-context
3679
3658
  */
3680
3659
  'react/no-use-context'?: Linter.RuleEntry<[]>;
3681
- /**
3682
- * Enforces destructuring assignment for component props and context.
3683
- * @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
3684
- */
3685
- 'react/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
3686
- /**
3687
- * Enforces importing React via a namespace import.
3688
- * @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
3689
- */
3690
- 'react/prefer-namespace-import'?: Linter.RuleEntry<[]>;
3691
3660
  /**
3692
3661
  * Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
3693
3662
  * @see https://eslint-react.xyz/docs/rules/purity
@@ -3718,6 +3687,11 @@ interface RuleOptions {
3718
3687
  * @see https://eslint-react.xyz/docs/rules/set-state-in-render
3719
3688
  */
3720
3689
  'react/set-state-in-render'?: Linter.RuleEntry<[]>;
3690
+ /**
3691
+ * Validates that components are static, not recreated every render.
3692
+ * @see https://eslint-react.xyz/docs/rules/static-components
3693
+ */
3694
+ 'react/static-components'?: Linter.RuleEntry<[]>;
3721
3695
  /**
3722
3696
  * Validates against syntax that React Compiler does not support.
3723
3697
  * @see https://eslint-react.xyz/docs/rules/unsupported-syntax
@@ -3738,6 +3712,11 @@ interface RuleOptions {
3738
3712
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
3739
3713
  */
3740
3714
  'react/web-api-no-leaked-event-listener'?: Linter.RuleEntry<[]>;
3715
+ /**
3716
+ * Enforces that every 'fetch' in a component or custom hook has a corresponding 'AbortController' abort in the cleanup function.
3717
+ * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-fetch
3718
+ */
3719
+ 'react/web-api-no-leaked-fetch'?: Linter.RuleEntry<[]>;
3741
3720
  /**
3742
3721
  * Enforces that every 'setInterval' in a component or custom hook has a corresponding 'clearInterval'.
3743
3722
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
@@ -3753,11 +3732,6 @@ interface RuleOptions {
3753
3732
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
3754
3733
  */
3755
3734
  'react/web-api-no-leaked-timeout'?: Linter.RuleEntry<[]>;
3756
- /**
3757
- * Disallows higher order functions that define components or hooks inside them.
3758
- * @see https://eslint-react.xyz/docs/rules/component-hook-factories
3759
- */
3760
- 'react/x-component-hook-factories'?: Linter.RuleEntry<[]>;
3761
3735
  /**
3762
3736
  * Validates usage of Error Boundaries instead of try/catch for errors in child components.
3763
3737
  * @see https://eslint-react.xyz/docs/rules/error-boundaries
@@ -3768,6 +3742,11 @@ interface RuleOptions {
3768
3742
  * @see https://github.com/facebook/react/issues/14920
3769
3743
  */
3770
3744
  'react/x-exhaustive-deps'?: Linter.RuleEntry<ReactXExhaustiveDeps>;
3745
+ /**
3746
+ * Validates against assignment/mutation of globals during render, part of ensuring that side effects must run outside of render.
3747
+ * @see https://eslint-react.xyz/docs/rules/globals
3748
+ */
3749
+ 'react/x-globals'?: Linter.RuleEntry<[]>;
3771
3750
  /**
3772
3751
  * Validates against mutating props, state, and other values that are immutable.
3773
3752
  * @see https://eslint-react.xyz/docs/rules/immutability
@@ -3908,11 +3887,6 @@ interface RuleOptions {
3908
3887
  * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
3909
3888
  */
3910
3889
  'react/x-no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
3911
- /**
3912
- * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
3913
- * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
3914
- */
3915
- 'react/x-no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
3916
3890
  /**
3917
3891
  * Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks.
3918
3892
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
@@ -3928,16 +3902,6 @@ interface RuleOptions {
3928
3902
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
3929
3903
  */
3930
3904
  'react/x-no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
3931
- /**
3932
- * Disallows unnecessary usage of 'useCallback'.
3933
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
3934
- */
3935
- 'react/x-no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
3936
- /**
3937
- * Disallows unnecessary usage of 'useMemo'.
3938
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
3939
- */
3940
- 'react/x-no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
3941
3905
  /**
3942
3906
  * Enforces that a function with the 'use' prefix uses at least one Hook inside it.
3943
3907
  * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
@@ -3979,7 +3943,7 @@ interface RuleOptions {
3979
3943
  */
3980
3944
  'react/x-no-unused-props'?: Linter.RuleEntry<[]>;
3981
3945
  /**
3982
- * Warns about unused class component state.
3946
+ * Warns about state variables that are defined but never used, or only used in effects.
3983
3947
  * @see https://eslint-react.xyz/docs/rules/no-unused-state
3984
3948
  */
3985
3949
  'react/x-no-unused-state'?: Linter.RuleEntry<[]>;
@@ -3988,16 +3952,6 @@ interface RuleOptions {
3988
3952
  * @see https://eslint-react.xyz/docs/rules/no-use-context
3989
3953
  */
3990
3954
  'react/x-no-use-context'?: Linter.RuleEntry<[]>;
3991
- /**
3992
- * Enforces destructuring assignment for component props and context.
3993
- * @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
3994
- */
3995
- 'react/x-prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
3996
- /**
3997
- * Enforces importing React via a namespace import.
3998
- * @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
3999
- */
4000
- 'react/x-prefer-namespace-import'?: Linter.RuleEntry<[]>;
4001
3955
  /**
4002
3956
  * Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
4003
3957
  * @see https://eslint-react.xyz/docs/rules/purity
@@ -4023,6 +3977,11 @@ interface RuleOptions {
4023
3977
  * @see https://eslint-react.xyz/docs/rules/set-state-in-render
4024
3978
  */
4025
3979
  'react/x-set-state-in-render'?: Linter.RuleEntry<[]>;
3980
+ /**
3981
+ * Validates that components are static, not recreated every render.
3982
+ * @see https://eslint-react.xyz/docs/rules/static-components
3983
+ */
3984
+ 'react/x-static-components'?: Linter.RuleEntry<[]>;
4026
3985
  /**
4027
3986
  * Validates against syntax that React Compiler does not support.
4028
3987
  * @see https://eslint-react.xyz/docs/rules/unsupported-syntax
@@ -5766,7 +5725,7 @@ interface RuleOptions {
5766
5725
  */
5767
5726
  'test/no-mocks-import'?: Linter.RuleEntry<[]>;
5768
5727
  /**
5769
- * disallow .only blocks in tests
5728
+ * disallow focused/only tests
5770
5729
  * @see https://github.com/levibuzolic/eslint-plugin-no-only-tests
5771
5730
  */
5772
5731
  'test/no-only-tests'?: Linter.RuleEntry<TestNoOnlyTests>;
@@ -8258,7 +8217,7 @@ interface RuleOptions {
8258
8217
  * disallow object, array, and function literals in template
8259
8218
  * @see https://eslint.vuejs.org/rules/no-literals-in-template.html
8260
8219
  */
8261
- 'vue/no-literals-in-template'?: Linter.RuleEntry<[]>;
8220
+ 'vue/no-literals-in-template'?: Linter.RuleEntry<VueNoLiteralsInTemplate>;
8262
8221
  /**
8263
8222
  * disallow unnecessary `<template>`
8264
8223
  * @see https://eslint.vuejs.org/rules/no-lone-template.html
@@ -8651,6 +8610,11 @@ interface RuleOptions {
8651
8610
  * @see https://eslint.vuejs.org/rules/prefer-separate-static-class.html
8652
8611
  */
8653
8612
  'vue/prefer-separate-static-class'?: Linter.RuleEntry<[]>;
8613
+ /**
8614
+ * enforce passing a single argument to custom event emissions
8615
+ * @see https://eslint.vuejs.org/rules/prefer-single-event-payload.html
8616
+ */
8617
+ 'vue/prefer-single-event-payload'?: Linter.RuleEntry<[]>;
8654
8618
  /**
8655
8619
  * Require template literals instead of string concatenation in `<template>`
8656
8620
  * @see https://eslint.vuejs.org/rules/prefer-template.html
@@ -8666,6 +8630,11 @@ interface RuleOptions {
8666
8630
  * @see https://eslint.vuejs.org/rules/prefer-use-template-ref.html
8667
8631
  */
8668
8632
  'vue/prefer-use-template-ref'?: Linter.RuleEntry<[]>;
8633
+ /**
8634
+ * enforce using `v-model` instead of `:prop`/`@update:prop` pair
8635
+ * @see https://eslint.vuejs.org/rules/prefer-v-model.html
8636
+ */
8637
+ 'vue/prefer-v-model'?: Linter.RuleEntry<[]>;
8669
8638
  /**
8670
8639
  * enforce specific casing for the Prop name in Vue components
8671
8640
  * @see https://eslint.vuejs.org/rules/prop-name-casing.html
@@ -18208,6 +18177,9 @@ type VueNoIrregularWhitespace = [] | [{
18208
18177
  skipRegExps?: boolean;
18209
18178
  skipHTMLAttributeValues?: boolean;
18210
18179
  skipHTMLTextContents?: boolean;
18180
+ }]; // ----- vue/no-literals-in-template -----
18181
+ type VueNoLiteralsInTemplate = [] | [{
18182
+ ignores?: string[];
18211
18183
  }]; // ----- vue/no-lone-template -----
18212
18184
  type VueNoLoneTemplate = [] | [{
18213
18185
  ignoreAccessible?: boolean;
@@ -18362,7 +18334,7 @@ type VueNoUnusedComponents = [] | [{
18362
18334
  ignoreWhenBindingPresent?: boolean;
18363
18335
  }]; // ----- vue/no-unused-properties -----
18364
18336
  type VueNoUnusedProperties = [] | [{
18365
- groups?: ("props" | "data" | "asyncData" | "computed" | "methods" | "setup")[];
18337
+ groups?: ("props" | "data" | "asyncData" | "computed" | "methods" | "setup" | "inject")[];
18366
18338
  deepData?: boolean;
18367
18339
  ignorePublicMembers?: boolean;
18368
18340
  unreferencedOptions?: ("unknownMemberAsUnreferenced" | "returnAsUnreferenced")[];
@@ -18790,55 +18762,259 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
18790
18762
  type ConfigNames = 'config/gitignore' | 'config/ignores' | 'config/javascript/setup' | 'config/javascript/rules' | 'config/eslint-comments/rules' | 'config/node/setup' | 'config/node/rules' | 'config/imports/rules' | 'config/command/rules' | 'config/perfectionist/setup' | 'config/imports/rules' | 'config/e18e/rules' | 'config/unicorn/rules' | 'config/jsdoc/rules' | 'config/jsx/setup' | 'config/typescript/setup' | 'config/typescript/parser' | 'config/typescript/type-aware-parser' | 'config/typescript/rules' | 'config/typescript/rules-type-aware' | 'config/typescript/erasable-syntax-only' | 'config/stylistic/rules' | 'config/regexp/rules' | 'config/test/setup' | 'config/test/rules' | 'config/storybook/setup' | 'config/vue/setup' | 'config/vue/rules' | 'config/react/setup' | 'config/react/rules' | 'config/react/typescript' | 'config/react/type-aware-rules' | 'config/nextjs/setup' | 'config/nextjs/rules' | 'config/solid/setup' | 'config/solid/rules' | 'config/svelte/setup' | 'config/svelte/rules' | 'config/unocss' | 'config/astro/setup' | 'config/astro/rules' | 'config/jsonc/setup' | 'config/jsonc/rules' | 'config/sort/package-json' | 'config/sort/tsconfig-json' | 'config/pnpm/package-json' | 'config/pnpm/pnpm-workspace-yaml' | 'config/pnpm/pnpm-workspace-yaml-sort' | 'config/yaml/setup' | 'config/yaml/rules' | 'config/yaml/pnpm-workspace' | 'config/toml/setup' | 'config/toml/rules' | 'config/markdown/setup' | 'config/markdown/processor' | 'config/markdown/parser' | 'config/markdown/rules' | 'config/markdown/disables' | 'config/formatter/setup' | 'config/formatter/css' | 'config/formatter/scss' | 'config/formatter/less' | 'config/formatter/html' | 'config/formatter/xml' | 'config/formatter/svg' | 'config/formatter/markdown' | 'config/formatter/astro' | 'config/formatter/astro/disables' | 'config/formatter/graphql' | 'config/disables/scripts' | 'config/disables/cli' | 'config/disables/bin' | 'config/disables/dts' | 'config/disables/cjs' | 'config/disables/config-files';
18791
18763
  //#endregion
18792
18764
  //#region src/vendor/prettier-types.d.ts
18765
+ /**
18766
+ * Vendor types from Prettier so we don't rely on the dependency.
18767
+ */
18793
18768
  type VendoredPrettierOptions = Partial<VendoredPrettierOptionsRequired>;
18794
18769
  interface VendoredPrettierOptionsRequired {
18770
+ /**
18771
+ * Specify the line length that the printer will wrap on.
18772
+ * @default 120
18773
+ */
18795
18774
  printWidth: number;
18775
+ /**
18776
+ * Specify the number of spaces per indentation-level.
18777
+ */
18796
18778
  tabWidth: number;
18779
+ /**
18780
+ * Indent lines with tabs instead of spaces
18781
+ */
18797
18782
  useTabs?: boolean;
18783
+ /**
18784
+ * Print semicolons at the ends of statements.
18785
+ */
18798
18786
  semi: boolean;
18787
+ /**
18788
+ * Use single quotes instead of double quotes.
18789
+ */
18799
18790
  singleQuote: boolean;
18791
+ /**
18792
+ * Use single quotes in JSX.
18793
+ */
18800
18794
  jsxSingleQuote: boolean;
18795
+ /**
18796
+ * Print trailing commas wherever possible.
18797
+ * @default "all"
18798
+ */
18801
18799
  trailingComma: 'none' | 'es5' | 'all';
18800
+ /**
18801
+ * Print spaces between brackets in object literals.
18802
+ * @default true
18803
+ */
18802
18804
  bracketSpacing: boolean;
18805
+ /**
18806
+ * Put the `>` of a multi-line HTML (HTML, XML, JSX, Vue, Angular) element at the end of the last line instead of being
18807
+ * alone on the next line (does not apply to self closing elements).
18808
+ * @default false
18809
+ */
18803
18810
  bracketSameLine: boolean;
18811
+ /**
18812
+ * Put the `>` of a multi-line JSX element at the end of the last line instead of being alone on the next line.
18813
+ * @deprecated use bracketSameLine instead
18814
+ */
18804
18815
  jsxBracketSameLine: boolean;
18816
+ /**
18817
+ * Format only a segment of a file.
18818
+ */
18805
18819
  rangeStart: number;
18820
+ /**
18821
+ * Format only a segment of a file.
18822
+ * @default Number.POSITIVE_INFINITY
18823
+ */
18806
18824
  rangeEnd: number;
18825
+ /**
18826
+ * By default, Prettier will wrap markdown text as-is since some services use a linebreak-sensitive renderer.
18827
+ * In some cases you may want to rely on editor/viewer soft wrapping instead, so this option allows you to opt out.
18828
+ * @default "preserve"
18829
+ */
18807
18830
  proseWrap: 'always' | 'never' | 'preserve';
18831
+ /**
18832
+ * Include parentheses around a sole arrow function parameter.
18833
+ * @default "always"
18834
+ */
18808
18835
  arrowParens: 'avoid' | 'always';
18836
+ /**
18837
+ * Provide ability to support new languages to prettier.
18838
+ */
18809
18839
  plugins: Array<string | any>;
18840
+ /**
18841
+ * How to handle whitespaces in HTML.
18842
+ * @default "css"
18843
+ */
18810
18844
  htmlWhitespaceSensitivity: 'css' | 'strict' | 'ignore';
18845
+ /**
18846
+ * Which end of line characters to apply.
18847
+ * @default "lf"
18848
+ */
18811
18849
  endOfLine: 'auto' | 'lf' | 'crlf' | 'cr';
18850
+ /**
18851
+ * Change when properties in objects are quoted.
18852
+ * @default "consistent"
18853
+ */
18812
18854
  quoteProps: 'as-needed' | 'consistent' | 'preserve';
18855
+ /**
18856
+ * Whether or not to indent the code inside <script> and <style> tags in Vue files.
18857
+ * @default false
18858
+ */
18813
18859
  vueIndentScriptAndStyle: boolean;
18860
+ /**
18861
+ * Enforce single attribute per line in HTML, XML, Vue and JSX.
18862
+ * @default false
18863
+ */
18814
18864
  singleAttributePerLine: boolean;
18865
+ /**
18866
+ * How to handle whitespaces in XML.
18867
+ * @default "preserve"
18868
+ */
18815
18869
  xmlQuoteAttributes: 'single' | 'double' | 'preserve';
18870
+ /**
18871
+ * Whether to put a space inside the brackets of self-closing XML elements.
18872
+ * @default true
18873
+ */
18816
18874
  xmlSelfClosingSpace: boolean;
18875
+ /**
18876
+ * Whether to sort attributes by key in XML elements.
18877
+ * @default false
18878
+ */
18817
18879
  xmlSortAttributesByKey: boolean;
18880
+ /**
18881
+ * How to handle whitespaces in XML.
18882
+ * @default "ignore"
18883
+ */
18818
18884
  xmlWhitespaceSensitivity: 'ignore' | 'strict' | 'preserve';
18819
18885
  }
18820
18886
  //#endregion
18821
18887
  //#region src/types.d.ts
18822
18888
  type Awaitable<T> = Promise<T> | T;
18823
18889
  interface OptionsComponentExts {
18890
+ /**
18891
+ * Additional extensions for components.
18892
+ *
18893
+ * @example ['vue']
18894
+ *
18895
+ * @default []
18896
+ */
18824
18897
  componentExts?: string[];
18825
18898
  }
18826
18899
  interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
18900
+ /**
18901
+ * Enable ASTRO support.
18902
+ *
18903
+ * Requires installing:
18904
+ * - `eslint-plugin-astro`
18905
+ *
18906
+ * Requires installing for formatting .astro:
18907
+ * - `prettier-plugin-astro`
18908
+ *
18909
+ * @default false
18910
+ */
18827
18911
  astro?: boolean | OptionsOverrides;
18912
+ /**
18913
+ * Automatically rename plugins in the config.
18914
+ *
18915
+ * @default true
18916
+ */
18828
18917
  autoRenamePlugins?: boolean;
18918
+ /**
18919
+ * Use external formatters to format files.
18920
+ *
18921
+ * Requires installing:
18922
+ * - `eslint-plugin-format`
18923
+ *
18924
+ * When set to `true`, it will enable all formatters.
18925
+ *
18926
+ * @default false
18927
+ */
18829
18928
  formatters?: boolean | OptionsFormatters;
18929
+ /**
18930
+ * Enable gitignore support.
18931
+ *
18932
+ * Passing an object to configure the options.
18933
+ *
18934
+ * @see https://github.com/antfu/eslint-config-flat-gitignore
18935
+ *
18936
+ * @default true
18937
+ */
18830
18938
  gitignore?: boolean | FlatGitignoreOptions;
18939
+ /**
18940
+ * Extend the global ignores.
18941
+ *
18942
+ * Passing an array to extend the ignores.
18943
+ * Passing a function to modify the default ignores.
18944
+ *
18945
+ * @default []
18946
+ */
18831
18947
  ignores?: ((originals: string[]) => string[]) | string[];
18948
+ /**
18949
+ * Options for eslint-plugin-import-lite.
18950
+ *
18951
+ * @default true
18952
+ */
18832
18953
  imports?: boolean | OptionsOverrides;
18954
+ /**
18955
+ * Control to disable some rules in editors.
18956
+ *
18957
+ * @default auto-detect based on the process.env
18958
+ */
18833
18959
  isInEditor?: boolean;
18960
+ /**
18961
+ * Enable Node.js rules
18962
+ *
18963
+ * @default true
18964
+ */
18834
18965
  node?: boolean;
18966
+ /**
18967
+ * Core rules. Can't be disabled.
18968
+ */
18835
18969
  javascript?: OptionsOverrides;
18970
+ /**
18971
+ * Enable JSONC support.
18972
+ *
18973
+ * @default true
18974
+ */
18836
18975
  jsonc?: boolean | OptionsOverrides;
18976
+ /**
18977
+ * Enable JSDoc support to enforce JSDoc comments.
18978
+ *
18979
+ * @default false
18980
+ */
18837
18981
  jsdoc?: boolean | OptionsOverrides | OptionsProjectType | OptionsStylistic;
18982
+ /**
18983
+ * Enable JSX related rules.
18984
+ *
18985
+ * Passing an object to enable JSX accessibility rules.
18986
+ *
18987
+ * @default true
18988
+ */
18838
18989
  jsx?: boolean | OptionsJSX;
18990
+ /**
18991
+ * Options for [@e18e/eslint-plugin](https://github.com/e18e/eslint-plugin)
18992
+ *
18993
+ * @default true
18994
+ */
18839
18995
  e18e?: boolean | OptionsE18e;
18996
+ /**
18997
+ * Enable linting for **code snippets** in Markdown.
18998
+ *
18999
+ * For formatting Markdown content, enable also `formatters.markdown`.
19000
+ *
19001
+ * @default true
19002
+ */
18840
19003
  markdown?: boolean | OptionsOverrides;
19004
+ /**
19005
+ * Enable nextjs rules.
19006
+ *
19007
+ * Requires installing:
19008
+ * - `@next/eslint-plugin-next`
19009
+ *
19010
+ * @default false
19011
+ */
18841
19012
  nextjs?: boolean | OptionsNextjs | OptionsOverrides;
19013
+ /**
19014
+ * Provide overrides for rules for each integration.
19015
+ *
19016
+ * @deprecated use `overrides` option in each integration key instead
19017
+ */
18842
19018
  overrides?: {
18843
19019
  javascript?: TypedFlatConfigItem['rules'];
18844
19020
  jsdoc?: TypedFlatConfigItem['rules'];
@@ -18856,42 +19032,218 @@ interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
18856
19032
  vue?: TypedFlatConfigItem['rules'];
18857
19033
  yaml?: TypedFlatConfigItem['rules'];
18858
19034
  };
19035
+ /**
19036
+ * Enable pnpm (workspace/catalogs) support.
19037
+ *
19038
+ * Currently it's disabled by default, as it's still experimental.
19039
+ * In the future it will be smartly enabled based on the project usage.
19040
+ *
19041
+ * @see https://github.com/antfu/pnpm-workspace-utils
19042
+ * @experimental
19043
+ * @default false
19044
+ */
18859
19045
  pnpm?: boolean | OptionsPnpm;
19046
+ /**
19047
+ * Enable react rules.
19048
+ *
19049
+ * Requires installing:
19050
+ * - `@eslint-react/eslint-plugin`
19051
+ * - `eslint-plugin-react-refresh`
19052
+ *
19053
+ * @default false
19054
+ */
18860
19055
  react?: boolean | OptionsReact;
19056
+ /**
19057
+ * Enable regexp rules.
19058
+ *
19059
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/
19060
+ *
19061
+ * @default true
19062
+ */
18861
19063
  regexp?: (OptionsOverrides & OptionsRegExp) | boolean;
19064
+ /**
19065
+ * Enable solid rules.
19066
+ *
19067
+ * Requires installing:
19068
+ * - `eslint-plugin-solid`
19069
+ *
19070
+ * @default false
19071
+ */
18862
19072
  solid?: boolean | OptionsOverrides;
19073
+ /**
19074
+ * Enable Storybook rules.
19075
+ *
19076
+ * Requires installing:
19077
+ * - `eslint-plugin-storybook`
19078
+ *
19079
+ * @default false
19080
+ */
18863
19081
  storybook?: boolean | OptionsOverrides;
19082
+ /**
19083
+ * Enable stylistic rules.
19084
+ *
19085
+ * @see https://eslint.style/
19086
+ *
19087
+ * @default true
19088
+ */
18864
19089
  stylistic?: (StylisticConfig & OptionsOverrides) | boolean;
19090
+ /**
19091
+ * Enable svelte rules.
19092
+ *
19093
+ * Requires installing:
19094
+ * - `eslint-plugin-svelte`
19095
+ *
19096
+ * @default false
19097
+ */
18865
19098
  svelte?: boolean | OptionsOverrides;
19099
+ /**
19100
+ * Enable Tailwind CSS support.
19101
+ *
19102
+ * Requires installing:
19103
+ * - `eslint-plugin-better-tailwindcss`
19104
+ *
19105
+ * @default false
19106
+ */
18866
19107
  tailwindcss?: boolean | OptionsOverrides | OptionsTailwindcss;
19108
+ /**
19109
+ * Enable test support.
19110
+ *
19111
+ * @default true
19112
+ */
18867
19113
  test?: boolean | OptionsOverrides;
19114
+ /**
19115
+ * Enable TOML support.
19116
+ *
19117
+ * @default true
19118
+ */
18868
19119
  toml?: boolean | OptionsOverrides;
19120
+ /**
19121
+ * Enable TypeScript support.
19122
+ *
19123
+ * Passing an object to enable TypeScript Language Server support.
19124
+ *
19125
+ * @default auto-detect based on the dependencies
19126
+ */
18869
19127
  typescript?: boolean | OptionsTypescript;
19128
+ /**
19129
+ * Options for eslint-plugin-unicorn.
19130
+ *
19131
+ * @default true
19132
+ */
18870
19133
  unicorn?: boolean | OptionsUnicorn;
19134
+ /**
19135
+ * Enable unocss rules.
19136
+ *
19137
+ * Requires installing:
19138
+ * - `@unocss/eslint-plugin`
19139
+ *
19140
+ * @default false
19141
+ */
18871
19142
  unocss?: boolean | OptionsUnoCSS;
19143
+ /**
19144
+ * Enable Vue support.
19145
+ *
19146
+ * @default auto-detect based on the dependencies
19147
+ */
18872
19148
  vue?: boolean | OptionsVue;
19149
+ /**
19150
+ * Enable YAML support.
19151
+ *
19152
+ * @default true
19153
+ */
18873
19154
  yaml?: boolean | OptionsOverrides;
18874
19155
  }
18875
19156
  interface OptionsE18e extends OptionsOverrides {
19157
+ /**
19158
+ * Include modernization rules
19159
+ *
19160
+ * @see https://github.com/e18e/eslint-plugin#modernization
19161
+ * @default true
19162
+ */
18876
19163
  modernization?: boolean;
19164
+ /**
19165
+ * Include module replacements rules
19166
+ *
19167
+ * @see https://github.com/e18e/eslint-plugin#module-replacements
19168
+ * @default type === 'lib' && isInEditor
19169
+ */
18877
19170
  moduleReplacements?: boolean;
19171
+ /**
19172
+ * Include performance improvements rules
19173
+ *
19174
+ * @see https://github.com/e18e/eslint-plugin#performance-improvements
19175
+ * @default true
19176
+ */
18878
19177
  performanceImprovements?: boolean;
18879
19178
  }
18880
19179
  interface OptionsFiles {
19180
+ /**
19181
+ * Override the `files` option to provide custom globs.
19182
+ */
18881
19183
  files?: string[];
18882
19184
  }
18883
19185
  interface OptionsFormatters {
19186
+ /**
19187
+ * Enable formatting support for Astro.
19188
+ *
19189
+ * Currently only support Prettier.
19190
+ */
18884
19191
  astro?: boolean | 'prettier';
19192
+ /**
19193
+ * Enable formatting support for CSS, Less, Sass, and SCSS.
19194
+ *
19195
+ * Currently only support Prettier.
19196
+ */
18885
19197
  css?: boolean | 'prettier';
19198
+ /**
19199
+ * Custom options for dprint.
19200
+ *
19201
+ * By default it's controlled by our own config.
19202
+ */
18886
19203
  dprintOptions?: boolean;
19204
+ /**
19205
+ * Enable formatting support for GraphQL.
19206
+ */
18887
19207
  graphql?: boolean | 'prettier';
19208
+ /**
19209
+ * Enable formatting support for HTML.
19210
+ *
19211
+ * Currently only support Prettier.
19212
+ */
18888
19213
  html?: boolean | 'prettier';
19214
+ /**
19215
+ * Enable formatting support for Markdown.
19216
+ *
19217
+ * Support both Prettier and dprint.
19218
+ *
19219
+ * When set to `true`, it will use Prettier.
19220
+ */
18889
19221
  markdown?: boolean | 'dprint' | 'prettier';
19222
+ /**
19223
+ * Custom options for Prettier.
19224
+ *
19225
+ * By default it's controlled by our own config.
19226
+ */
18890
19227
  prettierOptions?: VendoredPrettierOptions;
19228
+ /**
19229
+ * Install the prettier plugin for handle Slidev markdown
19230
+ *
19231
+ * Only works when `markdown` is enabled with `prettier`.
19232
+ */
18891
19233
  slidev?: boolean | {
18892
19234
  files?: string[];
18893
19235
  };
19236
+ /**
19237
+ * Enable formatting support for SVG.
19238
+ *
19239
+ * Currently only support Prettier.
19240
+ */
18894
19241
  svg?: boolean | 'prettier';
19242
+ /**
19243
+ * Enable formatting support for XML.
19244
+ *
19245
+ * Currently only support Prettier.
19246
+ */
18895
19247
  xml?: boolean | 'prettier';
18896
19248
  }
18897
19249
  interface OptionsHasTypeScript {
@@ -18904,69 +19256,278 @@ interface OptionsIsInEditor {
18904
19256
  isInEditor?: boolean;
18905
19257
  }
18906
19258
  interface OptionsJSX {
19259
+ /**
19260
+ * Enable JSX accessibility rules.
19261
+ *
19262
+ * Requires installing:
19263
+ * - `eslint-plugin-jsx-a11y`
19264
+ *
19265
+ * Can be a boolean or an object for custom options and overrides.
19266
+ *
19267
+ * @default false
19268
+ */
18907
19269
  a11y?: boolean | OptionsJSXA11y;
18908
19270
  }
18909
19271
  interface OptionsJSXA11y extends OptionsOverrides {}
18910
19272
  interface OptionsNextjs {
19273
+ /**
19274
+ * Specify a root directory within a monorepo.
19275
+ *
19276
+ * If you're using `@next/eslint-plugin-next` in a project where Next.js isn't installed in
19277
+ * your root directory (such as a monorepo), you can tell `@next/eslint-plugin-next` where
19278
+ * to find your Next.js application using the `rootDir` property.
19279
+ *
19280
+ * `rootDir` can be a path (relative or absolute), a glob, or an array of paths and/or globs.
19281
+ *
19282
+ * @see https://nextjs.org/docs/app/api-reference/config/eslint#specifying-a-root-directory-within-a-monorepo
19283
+ *
19284
+ * @example
19285
+ * ```ts
19286
+ * nextjs: {
19287
+ * rootDir: 'apps/web/',
19288
+ * },
19289
+ * ```
19290
+ *
19291
+ * @example
19292
+ * ```ts
19293
+ * nextjs: {
19294
+ * rootDir: 'packages/**',
19295
+ * },
19296
+ * ```
19297
+ *
19298
+ * @example
19299
+ * ```ts
19300
+ * nextjs: {
19301
+ * rootDir: [ 'packages/**', 'apps/**' ],
19302
+ * },
19303
+ * ```
19304
+ *
19305
+ * @default undefined
19306
+ */
18911
19307
  rootDir?: string | string[];
18912
19308
  }
18913
19309
  interface OptionsOverrides {
18914
19310
  overrides?: TypedFlatConfigItem['rules'];
18915
19311
  }
18916
19312
  interface OptionsPnpm extends OptionsIsInEditor {
19313
+ /**
19314
+ * Requires catalogs usage
19315
+ *
19316
+ * Detects automatically based if `catalogs` is used in the pnpm-workspace.yaml file
19317
+ */
18917
19318
  catalogs?: boolean;
19319
+ /**
19320
+ * Enable linting for package.json, will install the jsonc parser
19321
+ *
19322
+ * @default true
19323
+ */
18918
19324
  json?: boolean;
19325
+ /**
19326
+ * Enable linting for pnpm-workspace.yaml, will install the yaml parser
19327
+ *
19328
+ * @default true
19329
+ */
18919
19330
  yaml?: boolean;
19331
+ /**
19332
+ * Sort entries in pnpm-workspace.yaml
19333
+ *
19334
+ * @default false
19335
+ */
18920
19336
  sort?: boolean;
18921
19337
  }
18922
19338
  interface OptionsProjectType {
19339
+ /**
19340
+ * Type of the project. `lib` will enable more strict rules for libraries.
19341
+ *
19342
+ * @default 'app'
19343
+ */
18923
19344
  type?: 'app' | 'lib';
18924
19345
  }
18925
19346
  interface OptionsReact extends OptionsOverrides {
19347
+ /**
19348
+ * Enable React Compiler support.
19349
+ *
19350
+ * Requires installing:
19351
+ * - `babel-plugin-react-compiler`
19352
+ *
19353
+ * @default false
19354
+ */
18926
19355
  reactCompiler?: boolean;
18927
19356
  }
18928
19357
  interface OptionsRegExp {
19358
+ /**
19359
+ * Override rulelevels
19360
+ */
18929
19361
  level?: 'error' | 'warn';
18930
19362
  }
18931
19363
  interface OptionsStylistic {
19364
+ /**
19365
+ * Enable stylistic rules.
19366
+ *
19367
+ * @see https://eslint.style/
19368
+ *
19369
+ * @default true
19370
+ */
18932
19371
  stylistic?: boolean | StylisticConfig;
18933
19372
  }
19373
+ /**
19374
+ * Options for Tailwind CSS.
19375
+ *
19376
+ * Uses `eslint-plugin-better-tailwindcss` to lint Tailwind CSS.
19377
+ *
19378
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss
19379
+ */
18934
19380
  interface OptionsTailwindcss {
19381
+ /**
19382
+ * Detect component classes.
19383
+ *
19384
+ * If enabled, the plugin will detect component classes in the project.
19385
+ *
19386
+ * @example
19387
+ * ```ts
19388
+ * tailwindcss: {
19389
+ * detectComponentClasses: true,
19390
+ * },
19391
+ * ```
19392
+ *
19393
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/settings/settings.md
19394
+ *
19395
+ * @default false
19396
+ */
18935
19397
  detectComponentClasses?: boolean;
19398
+ /**
19399
+ * Entry point for Tailwind CSS.
19400
+ *
19401
+ * If not provided, the config will try to find the `global.css` or `globals.css` file in the project.
19402
+ *
19403
+ * @example
19404
+ * ```ts
19405
+ * tailwindcss: {
19406
+ * entryPoint: 'src/styles/globals.css',
19407
+ * },
19408
+ * ```
19409
+ *
19410
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/settings/settings.md
19411
+ *
19412
+ * @default undefined
19413
+ */
18936
19414
  entryPoint?: string;
18937
19415
  }
18938
19416
  type OptionsTypescript = (OptionsTypeScriptParserOptions & OptionsOverrides & OptionsTypeScriptErasableOnly) | (OptionsTypeScriptWithTypes & OptionsOverrides & OptionsTypeScriptErasableOnly);
18939
19417
  interface OptionsTypeScriptErasableOnly {
19418
+ /**
19419
+ * Enable erasable syntax only rules.
19420
+ *
19421
+ * @see https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only
19422
+ * @default false
19423
+ */
18940
19424
  erasableOnly?: boolean;
18941
19425
  }
18942
19426
  interface OptionsTypeScriptParserOptions {
19427
+ /**
19428
+ * Additional parser options for TypeScript.
19429
+ */
18943
19430
  parserOptions?: Partial<ParserOptions>;
19431
+ /**
19432
+ * Glob patterns for files that should be type aware.
19433
+ * @default ['**\/*.{ts,tsx}']
19434
+ */
18944
19435
  filesTypeAware?: string[];
19436
+ /**
19437
+ * Glob patterns for files that should not be type aware.
19438
+ * @default ['**\/*.md\/**', '**\/*.astro/*.ts']
19439
+ */
18945
19440
  ignoresTypeAware?: string[];
19441
+ /**
19442
+ * Enable strict mode.
19443
+ *
19444
+ * @default false
19445
+ */
18946
19446
  strict?: boolean;
18947
19447
  }
18948
19448
  interface OptionsTypeScriptWithTypes {
19449
+ /**
19450
+ * When this options is provided, type aware rules will be enabled.
19451
+ * @see https://typescript-eslint.io/linting/typed-linting/
19452
+ */
18949
19453
  tsconfigPath?: string;
19454
+ /**
19455
+ * Override type aware rules.
19456
+ */
18950
19457
  overridesTypeAware?: TypedFlatConfigItem['rules'];
18951
19458
  }
18952
19459
  interface OptionsUnicorn extends OptionsOverrides {
19460
+ /**
19461
+ * Include all rules recommended by `eslint-plugin-unicorn`.
19462
+ *
19463
+ * @default false
19464
+ */
18953
19465
  allRecommended?: boolean;
18954
19466
  }
18955
19467
  interface OptionsUnoCSS extends OptionsOverrides {
19468
+ /**
19469
+ * Enable attributify support.
19470
+ *
19471
+ * @default true
19472
+ */
18956
19473
  attributify?: boolean;
19474
+ /**
19475
+ * Enable strict mode by throwing errors about blocklisted classes.
19476
+ *
19477
+ * @default false
19478
+ */
18957
19479
  strict?: boolean;
18958
19480
  }
18959
19481
  interface OptionsVue extends OptionsOverrides {
19482
+ /**
19483
+ * Vue accessibility plugin. Help check a11y issue in `.vue` files upon enabled
19484
+ *
19485
+ * @see https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/
19486
+ *
19487
+ * @default false
19488
+ */
18960
19489
  a11y?: boolean;
19490
+ /**
19491
+ * Create virtual files for Vue SFC blocks to enable linting.
19492
+ *
19493
+ * @see https://github.com/antfu/eslint-processor-vue-blocks
19494
+ *
19495
+ * @default true
19496
+ */
18961
19497
  sfcBlocks?: boolean | Options;
19498
+ /**
19499
+ * Vue version. Apply different rules set from `eslint-plugin-vue`.
19500
+ *
19501
+ * @default 3
19502
+ */
18962
19503
  vueVersion?: 2 | 3;
18963
19504
  }
18964
19505
  type Rules = Record<string, Linter.RuleEntry<any> | undefined> & RuleOptions;
18965
19506
  interface StylisticConfig extends Pick<StylisticCustomizeOptions, 'arrowParens' | 'blockSpacing' | 'braceStyle' | 'commaDangle' | 'experimental' | 'indent' | 'jsx' | 'quoteProps' | 'quotes' | 'semi'> {
19507
+ /**
19508
+ * Enable or disable the opinionated spacing rules (space in parenthesis, objects, arrays, etc.).
19509
+ *
19510
+ * @default false
19511
+ */
18966
19512
  lessOpinionated?: boolean;
18967
19513
  }
19514
+ /**
19515
+ * An updated version of ESLint's `Linter.Config`, which provides autocompletion
19516
+ * for `rules` and relaxes type limitations for `plugins` and `rules`, because
19517
+ * many plugins still lack proper type definitions.
19518
+ */
18968
19519
  type TypedFlatConfigItem = Omit<ConfigWithExtends, 'plugins' | 'rules'> & {
19520
+ /**
19521
+ * An object containing a name-value mapping of plugin names to plugin objects.
19522
+ * When `files` is specified, these plugins are only available to the matching files.
19523
+ *
19524
+ * @see [Using plugins in your configuration](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#using-plugins-in-your-configuration)
19525
+ */
18969
19526
  plugins?: Record<string, any>;
19527
+ /**
19528
+ * An object containing the configured rules. When `files` or `ignores` are
19529
+ * specified, these rule configurations are only available to the matching files.
19530
+ */
18970
19531
  rules?: Rules;
18971
19532
  };
18972
19533
  //#endregion
@@ -18985,6 +19546,16 @@ declare const defaultPluginRenaming: {
18985
19546
  yml: string;
18986
19547
  };
18987
19548
  type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
19549
+ /**
19550
+ * Construct an array of ESLint flat config items.
19551
+ *
19552
+ * @param {OptionsConfig & TypedFlatConfigItem} options
19553
+ * The options for generating the ESLint configurations.
19554
+ * @param {Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[]>[]} userConfigs
19555
+ * The user configurations to be merged with the generated configurations.
19556
+ * @returns {TypedFlatConfigItem[]}
19557
+ * The merged ESLint configurations.
19558
+ */
18988
19559
  declare function config(options?: OptionsConfig & Omit<TypedFlatConfigItem, 'files' | 'ignores'>, ...userConfigs: Awaitable<FlatConfigComposer<any, any> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>[]): FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
18989
19560
  declare function getOverrides<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): Partial<Linter.RulesRecord & RuleOptions>;
18990
19561
  declare function resolveSubOptions<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): ResolvedOptions<OptionsConfig[K]>;
@@ -19021,6 +19592,12 @@ declare function imports(options?: OptionsOverrides & OptionsStylistic): Promise
19021
19592
  declare function javascript(options?: OptionsIsInEditor & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
19022
19593
  //#endregion
19023
19594
  //#region src/configs/jsdoc.d.ts
19595
+ /**
19596
+ * JSDoc configuration.
19597
+ *
19598
+ * @param {OptionsStylistic} options The options for the JSDoc configuration.
19599
+ * @returns {Promise<TypedFlatConfigItem[]>} The JSDoc configuration.
19600
+ */
19024
19601
  declare function jsdoc(options?: OptionsOverrides & OptionsProjectType & OptionsStylistic): Promise<TypedFlatConfigItem[]>;
19025
19602
  //#endregion
19026
19603
  //#region src/configs/jsonc.d.ts
@@ -19039,6 +19616,11 @@ declare function nextjs(options?: OptionsFiles & OptionsNextjs & OptionsOverride
19039
19616
  declare function node(): Promise<TypedFlatConfigItem[]>;
19040
19617
  //#endregion
19041
19618
  //#region src/configs/perfectionist.d.ts
19619
+ /**
19620
+ * Perfectionist plugin for props and items sorting.
19621
+ *
19622
+ * @see https://perfectionist.dev
19623
+ */
19042
19624
  declare function perfectionist(): Promise<TypedFlatConfigItem[]>;
19043
19625
  //#endregion
19044
19626
  //#region src/configs/pnpm.d.ts
@@ -19054,12 +19636,54 @@ declare function regexp(options?: OptionsOverrides & OptionsRegExp): Promise<Typ
19054
19636
  declare function solid(options?: OptionsFiles & OptionsHasTypeScript & OptionsOverrides & OptionsTypeScriptWithTypes): Promise<TypedFlatConfigItem[]>;
19055
19637
  //#endregion
19056
19638
  //#region src/configs/sort.d.ts
19639
+ /**
19640
+ * packageSortOrder
19641
+ *
19642
+ * Specifies the order in which package.json properties should appear.
19643
+ *
19644
+ * This array establishes a preferred sequence to maintain consistency and readability
19645
+ * when managing package.json files in JavaScript projects. It categorizes common properties
19646
+ * such as metadata details, scripts, dependencies, and configuration settings in a logical
19647
+ * and organized manner.
19648
+ *
19649
+ * Complex logic explanation:
19650
+ * - The list starts with high-level metadata properties such as 'publisher', 'name', 'description',
19651
+ * and 'version', which are typically the primary identifiers of the package.
19652
+ * - After the initial metadata, configuration and module-related fields like 'type', 'private',
19653
+ * and 'author' are listed to group related attributes together.
19654
+ * - Dependency-related fields are grouped towards the end, including 'dependencies', 'devDependencies',
19655
+ * and 'optionalDependencies'.
19656
+ * - Special configurations and overrides, such as 'resolutions' and 'overrides', are at the end
19657
+ * to keep the file manageable and to separate primary package information from auxiliary settings.
19658
+ *
19659
+ * @type {string[]}
19660
+ *
19661
+ * @returns {string[]} Returns the package.json sort order
19662
+ */
19057
19663
  declare const packageSortOrder: string[];
19058
19664
  declare const packageExportsSortOrder: string[];
19665
+ /**
19666
+ * Sort package.json
19667
+ *
19668
+ * Requires `jsonc` config
19669
+ */
19059
19670
  declare function sortPackageJson(): Promise<TypedFlatConfigItem[]>;
19671
+ /**
19672
+ * Sort tsconfig.json
19673
+ *
19674
+ * Requires `jsonc` config
19675
+ */
19060
19676
  declare function sortTsconfig(): TypedFlatConfigItem[];
19061
19677
  //#endregion
19062
19678
  //#region src/configs/storybook.d.ts
19679
+ /**
19680
+ * Storybook plugin for ESLint.
19681
+ *
19682
+ * @see https://github.com/storybookjs/eslint-plugin-storybook
19683
+ *
19684
+ * @param {OptionsFiles & OptionsOverrides} options Options
19685
+ * @returns {Promise<TypedFlatConfigItem[]>} Returns the Storybook config
19686
+ */
19063
19687
  declare function storybook(options?: OptionsFiles & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
19064
19688
  //#endregion
19065
19689
  //#region src/configs/stylistic.d.ts
@@ -19134,6 +19758,11 @@ declare const GLOB_EXCLUDE: string[];
19134
19758
  declare const GLOB_SEARCH_EXCLUDE: Set<string>;
19135
19759
  //#endregion
19136
19760
  //#region src/utils.d.ts
19761
+ /**
19762
+ * Plain parser.
19763
+ *
19764
+ * @returns {Linter.Parser} The plain parser.
19765
+ */
19137
19766
  declare const parserPlain: {
19138
19767
  meta: {
19139
19768
  name: string;
@@ -19159,19 +19788,90 @@ declare const parserPlain: {
19159
19788
  };
19160
19789
  };
19161
19790
  };
19791
+ /**
19792
+ * Combine array and non-array configs into a single array.
19793
+ *
19794
+ * @param {Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[]>[]} configs The configs to be combined.
19795
+ * @returns {Promise<TypedFlatConfigItem[]>} The combined configs.
19796
+ */
19162
19797
  declare function combine(...configs: Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[]>[]): Promise<TypedFlatConfigItem[]>;
19798
+ /**
19799
+ * Ensure packages are installed.
19800
+ *
19801
+ * @param {string[]} packages The packages to ensure are installed.
19802
+ * @returns {Promise<void>} The promise to ensure packages are installed.
19803
+ */
19163
19804
  declare function ensurePackages(packages: (string | undefined)[]): Promise<void>;
19805
+ /**
19806
+ * Interop default.
19807
+ *
19808
+ * @param {Awaitable<T>} m The module to interop default from.
19809
+ * @returns {Promise<T extends { default: infer U } ? U : T>} The interop default.
19810
+ */
19164
19811
  declare function interopDefault<T>(m: Awaitable<T>): Promise<T extends {
19165
19812
  default: infer U;
19166
19813
  } ? U : T>;
19814
+ /**
19815
+ * Check if running in Cursor Agent.
19816
+ *
19817
+ * @returns {boolean} True if running in Cursor Agent, false otherwise.
19818
+ */
19167
19819
  declare function isInCursorAgent(): boolean;
19820
+ /**
19821
+ * Check if running in editor environment.
19822
+ *
19823
+ * @returns {boolean} True if running in editor environment, false otherwise.
19824
+ */
19168
19825
  declare function isInEditorEnv(): boolean;
19826
+ /**
19827
+ * Check if running in git hooks or lint staged.
19828
+ *
19829
+ * @returns {boolean} True if running in git hooks or lint staged, false otherwise.
19830
+ */
19169
19831
  declare function isInGitHooksOrLintStaged(): boolean;
19832
+ /**
19833
+ * Check if running in VSCode ESLint extension host process
19834
+ *
19835
+ * @returns {boolean} True if running in VSCode ESLint extension host process, false otherwise.
19836
+ */
19170
19837
  declare function isInVSCodeESLintExtension(): boolean;
19838
+ /**
19839
+ * Check if package is in scope.
19840
+ *
19841
+ * @param {string} name The name of the package to check.
19842
+ * @returns {boolean} True if package is in scope, false otherwise.
19843
+ */
19171
19844
  declare function isPackageInScope(name: string): boolean;
19845
+ /**
19846
+ * Normalize rules.
19847
+ *
19848
+ * @param {Record<string, any>} rules The rules to normalize.
19849
+ * @returns {Record<string, any>} The normalized rules.
19850
+ */
19172
19851
  declare function normalizeRules(rules: Record<string, any>): Record<string, any>;
19852
+ /**
19853
+ * Rename plugin names a flat configs array.
19854
+ *
19855
+ * @param {TypedFlatConfigItem[]} configs The configs to rename plugin names in.
19856
+ * @param {Record<string, string>} map The map of plugin names to rename.
19857
+ * @returns {TypedFlatConfigItem[]} The configs with renamed plugin names.
19858
+ */
19173
19859
  declare function renamePluginInConfigs(configs: TypedFlatConfigItem[], map: Record<string, string>): TypedFlatConfigItem[];
19860
+ /**
19861
+ * Rename plugin prefixes in a rule object.
19862
+ * Accepts a map of prefixes to rename.
19863
+ *
19864
+ * @param {Record<string, any>} rules The rules to rename plugin prefixes in.
19865
+ * @param {Record<string, string>} map The map of plugin prefixes to rename.
19866
+ * @returns {Record<string, any>} The rules with renamed plugin prefixes.
19867
+ */
19174
19868
  declare function renameRules(rules: Record<string, any>, map: Record<string, string>): Record<string, any>;
19869
+ /**
19870
+ * Convert value to array.
19871
+ *
19872
+ * @param {T | T[]} value The value to convert to array.
19873
+ * @returns {T[]} The value as array.
19874
+ */
19175
19875
  declare function toArray<T>(value: T | T[]): T[];
19176
19876
  //#endregion
19177
19877
  export { Awaitable, CONFIG_PRESET_FULL_OFF, CONFIG_PRESET_FULL_ON, type ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SEARCH_EXCLUDE, GLOB_SRC, GLOB_SRC_EXT, GLOB_STORYBOOK, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsE18e, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsJSX, OptionsJSXA11y, OptionsNextjs, OptionsOverrides, OptionsPnpm, OptionsProjectType, OptionsReact, OptionsRegExp, OptionsStylistic, OptionsTailwindcss, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, OptionsVue, PACKAGE_NAME, ResolvedOptions, Rules, StylisticConfig, StylisticConfigDefaults, StylisticOptions, TypedFlatConfigItem, astro, combine, command, comments, config, config as inferno, defaultPluginRenaming, disables, e18e, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInCursorAgent, isInEditorEnv, isInGitHooksOrLintStaged, isInVSCodeESLintExtension, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, normalizeRules, packageExportsSortOrder, packageSortOrder, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, solid, sortPackageJson, sortTsconfig, storybook, stylistic, svelte, tailwindcss, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };