@2digits/eslint-config 4.0.2 → 4.1.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.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +439 -5
- package/dist/index.d.ts +439 -5
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +10 -8
package/dist/index.d.cts
CHANGED
|
@@ -2650,6 +2650,31 @@ Backward pagination arguments
|
|
|
2650
2650
|
* @deprecated
|
|
2651
2651
|
*/
|
|
2652
2652
|
'padding-line-between-statements'?: Linter.RuleEntry<PaddingLineBetweenStatements>
|
|
2653
|
+
/**
|
|
2654
|
+
* Enforce using "catalog:" in `package.json`
|
|
2655
|
+
* @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/json-enforce-catalog.test.ts
|
|
2656
|
+
*/
|
|
2657
|
+
'pnpm/json-enforce-catalog'?: Linter.RuleEntry<PnpmJsonEnforceCatalog>
|
|
2658
|
+
/**
|
|
2659
|
+
* Prefer having pnpm settings in `pnpm-workspace.yaml` instead of `package.json`. This would requires pnpm v10.6+, see https://github.com/orgs/pnpm/discussions/9037.
|
|
2660
|
+
* @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/json-prefer-workspace-settings.test.ts
|
|
2661
|
+
*/
|
|
2662
|
+
'pnpm/json-prefer-workspace-settings'?: Linter.RuleEntry<PnpmJsonPreferWorkspaceSettings>
|
|
2663
|
+
/**
|
|
2664
|
+
* Enforce using valid catalog in `package.json`
|
|
2665
|
+
* @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/json-valid-catalog.test.ts
|
|
2666
|
+
*/
|
|
2667
|
+
'pnpm/json-valid-catalog'?: Linter.RuleEntry<PnpmJsonValidCatalog>
|
|
2668
|
+
/**
|
|
2669
|
+
* Disallow unused catalogs in `pnpm-workspace.yaml`
|
|
2670
|
+
* @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/yaml-no-duplicate-catalog-item.test.ts
|
|
2671
|
+
*/
|
|
2672
|
+
'pnpm/yaml-no-duplicate-catalog-item'?: Linter.RuleEntry<PnpmYamlNoDuplicateCatalogItem>
|
|
2673
|
+
/**
|
|
2674
|
+
* Disallow unused catalogs in `pnpm-workspace.yaml`
|
|
2675
|
+
* @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/yaml-no-unused-catalog-item.test.ts
|
|
2676
|
+
*/
|
|
2677
|
+
'pnpm/yaml-no-unused-catalog-item'?: Linter.RuleEntry<[]>
|
|
2653
2678
|
/**
|
|
2654
2679
|
* Require using arrow functions for callbacks
|
|
2655
2680
|
* @see https://eslint.org/docs/latest/rules/prefer-arrow-callback
|
|
@@ -2767,6 +2792,11 @@ Backward pagination arguments
|
|
|
2767
2792
|
* @see https://eslint-react.xyz/docs/rules/dom-no-flush-sync
|
|
2768
2793
|
*/
|
|
2769
2794
|
'react-dom/no-flush-sync'?: Linter.RuleEntry<[]>
|
|
2795
|
+
/**
|
|
2796
|
+
* replaces usages of 'ReactDom.hydrate()' with 'hydrateRoot()'
|
|
2797
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-hydrate
|
|
2798
|
+
*/
|
|
2799
|
+
'react-dom/no-hydrate'?: Linter.RuleEntry<[]>
|
|
2770
2800
|
/**
|
|
2771
2801
|
* enforce that button component have an explicit 'type' attribute
|
|
2772
2802
|
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-button-type
|
|
@@ -2782,6 +2812,11 @@ Backward pagination arguments
|
|
|
2782
2812
|
* @see https://eslint-react.xyz/docs/rules/dom-no-namespace
|
|
2783
2813
|
*/
|
|
2784
2814
|
'react-dom/no-namespace'?: Linter.RuleEntry<[]>
|
|
2815
|
+
/**
|
|
2816
|
+
* replace usages of 'ReactDom.render()' with 'createRoot(node).render()'
|
|
2817
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-render
|
|
2818
|
+
*/
|
|
2819
|
+
'react-dom/no-render'?: Linter.RuleEntry<[]>
|
|
2785
2820
|
/**
|
|
2786
2821
|
* disallow usage of the return value of 'ReactDOM.render'
|
|
2787
2822
|
* @see https://eslint-react.xyz/docs/rules/dom-no-render-return-value
|
|
@@ -2807,6 +2842,11 @@ Backward pagination arguments
|
|
|
2807
2842
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank
|
|
2808
2843
|
*/
|
|
2809
2844
|
'react-dom/no-unsafe-target-blank'?: Linter.RuleEntry<[]>
|
|
2845
|
+
/**
|
|
2846
|
+
* replace usages of 'ReactDom.render()' with 'createRoot(node).render()'
|
|
2847
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-use-form-state
|
|
2848
|
+
*/
|
|
2849
|
+
'react-dom/no-use-form-state'?: Linter.RuleEntry<[]>
|
|
2810
2850
|
/**
|
|
2811
2851
|
* disallow void elements (AKA self-closing elements) from having children
|
|
2812
2852
|
* @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
|
|
@@ -3099,7 +3139,7 @@ Backward pagination arguments
|
|
|
3099
3139
|
'react-extra/use-jsx-vars'?: Linter.RuleEntry<[]>
|
|
3100
3140
|
/**
|
|
3101
3141
|
* enforce custom Hooks to use at least one other hook inside
|
|
3102
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-
|
|
3142
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
3103
3143
|
*/
|
|
3104
3144
|
'react-hooks-extra/ensure-custom-hooks-using-other-hooks'?: Linter.RuleEntry<[]>
|
|
3105
3145
|
/**
|
|
@@ -3124,7 +3164,7 @@ Backward pagination arguments
|
|
|
3124
3164
|
'react-hooks-extra/no-direct-set-state-in-use-layout-effect'?: Linter.RuleEntry<[]>
|
|
3125
3165
|
/**
|
|
3126
3166
|
* enforce custom Hooks to use at least one other hook inside
|
|
3127
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-
|
|
3167
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
3128
3168
|
*/
|
|
3129
3169
|
'react-hooks-extra/no-redundant-custom-hook'?: Linter.RuleEntry<[]>
|
|
3130
3170
|
/**
|
|
@@ -3139,7 +3179,12 @@ Backward pagination arguments
|
|
|
3139
3179
|
'react-hooks-extra/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>
|
|
3140
3180
|
/**
|
|
3141
3181
|
* enforce custom Hooks to use at least one other hook inside
|
|
3142
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-
|
|
3182
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
3183
|
+
*/
|
|
3184
|
+
'react-hooks-extra/no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>
|
|
3185
|
+
/**
|
|
3186
|
+
* enforce custom Hooks to use at least one other hook inside
|
|
3187
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
3143
3188
|
*/
|
|
3144
3189
|
'react-hooks-extra/no-useless-custom-hooks'?: Linter.RuleEntry<[]>
|
|
3145
3190
|
/**
|
|
@@ -7047,6 +7092,146 @@ Backward pagination arguments
|
|
|
7047
7092
|
* @deprecated
|
|
7048
7093
|
*/
|
|
7049
7094
|
'yield-star-spacing'?: Linter.RuleEntry<YieldStarSpacing>
|
|
7095
|
+
/**
|
|
7096
|
+
* require or disallow block style mappings.
|
|
7097
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping.html
|
|
7098
|
+
*/
|
|
7099
|
+
'yml/block-mapping'?: Linter.RuleEntry<YmlBlockMapping>
|
|
7100
|
+
/**
|
|
7101
|
+
* enforce consistent line breaks after `:` indicator
|
|
7102
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-colon-indicator-newline.html
|
|
7103
|
+
*/
|
|
7104
|
+
'yml/block-mapping-colon-indicator-newline'?: Linter.RuleEntry<YmlBlockMappingColonIndicatorNewline>
|
|
7105
|
+
/**
|
|
7106
|
+
* enforce consistent line breaks after `?` indicator
|
|
7107
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-question-indicator-newline.html
|
|
7108
|
+
*/
|
|
7109
|
+
'yml/block-mapping-question-indicator-newline'?: Linter.RuleEntry<YmlBlockMappingQuestionIndicatorNewline>
|
|
7110
|
+
/**
|
|
7111
|
+
* require or disallow block style sequences.
|
|
7112
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence.html
|
|
7113
|
+
*/
|
|
7114
|
+
'yml/block-sequence'?: Linter.RuleEntry<YmlBlockSequence>
|
|
7115
|
+
/**
|
|
7116
|
+
* enforce consistent line breaks after `-` indicator
|
|
7117
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence-hyphen-indicator-newline.html
|
|
7118
|
+
*/
|
|
7119
|
+
'yml/block-sequence-hyphen-indicator-newline'?: Linter.RuleEntry<YmlBlockSequenceHyphenIndicatorNewline>
|
|
7120
|
+
/**
|
|
7121
|
+
* enforce YAML file extension
|
|
7122
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/file-extension.html
|
|
7123
|
+
*/
|
|
7124
|
+
'yml/file-extension'?: Linter.RuleEntry<YmlFileExtension>
|
|
7125
|
+
/**
|
|
7126
|
+
* enforce consistent line breaks inside braces
|
|
7127
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-newline.html
|
|
7128
|
+
*/
|
|
7129
|
+
'yml/flow-mapping-curly-newline'?: Linter.RuleEntry<YmlFlowMappingCurlyNewline>
|
|
7130
|
+
/**
|
|
7131
|
+
* enforce consistent spacing inside braces
|
|
7132
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-spacing.html
|
|
7133
|
+
*/
|
|
7134
|
+
'yml/flow-mapping-curly-spacing'?: Linter.RuleEntry<YmlFlowMappingCurlySpacing>
|
|
7135
|
+
/**
|
|
7136
|
+
* enforce linebreaks after opening and before closing flow sequence brackets
|
|
7137
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-sequence-bracket-newline.html
|
|
7138
|
+
*/
|
|
7139
|
+
'yml/flow-sequence-bracket-newline'?: Linter.RuleEntry<YmlFlowSequenceBracketNewline>
|
|
7140
|
+
/**
|
|
7141
|
+
* enforce consistent spacing inside flow sequence brackets
|
|
7142
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-sequence-bracket-spacing.html
|
|
7143
|
+
*/
|
|
7144
|
+
'yml/flow-sequence-bracket-spacing'?: Linter.RuleEntry<YmlFlowSequenceBracketSpacing>
|
|
7145
|
+
/**
|
|
7146
|
+
* enforce consistent indentation
|
|
7147
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/indent.html
|
|
7148
|
+
*/
|
|
7149
|
+
'yml/indent'?: Linter.RuleEntry<YmlIndent>
|
|
7150
|
+
/**
|
|
7151
|
+
* enforce naming convention to key names
|
|
7152
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/key-name-casing.html
|
|
7153
|
+
*/
|
|
7154
|
+
'yml/key-name-casing'?: Linter.RuleEntry<YmlKeyNameCasing>
|
|
7155
|
+
/**
|
|
7156
|
+
* enforce consistent spacing between keys and values in mapping pairs
|
|
7157
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/key-spacing.html
|
|
7158
|
+
*/
|
|
7159
|
+
'yml/key-spacing'?: Linter.RuleEntry<YmlKeySpacing>
|
|
7160
|
+
/**
|
|
7161
|
+
* disallow empty document
|
|
7162
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-document.html
|
|
7163
|
+
*/
|
|
7164
|
+
'yml/no-empty-document'?: Linter.RuleEntry<[]>
|
|
7165
|
+
/**
|
|
7166
|
+
* disallow empty mapping keys
|
|
7167
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-key.html
|
|
7168
|
+
*/
|
|
7169
|
+
'yml/no-empty-key'?: Linter.RuleEntry<[]>
|
|
7170
|
+
/**
|
|
7171
|
+
* disallow empty mapping values
|
|
7172
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-mapping-value.html
|
|
7173
|
+
*/
|
|
7174
|
+
'yml/no-empty-mapping-value'?: Linter.RuleEntry<[]>
|
|
7175
|
+
/**
|
|
7176
|
+
* disallow empty sequence entries
|
|
7177
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-sequence-entry.html
|
|
7178
|
+
*/
|
|
7179
|
+
'yml/no-empty-sequence-entry'?: Linter.RuleEntry<[]>
|
|
7180
|
+
/**
|
|
7181
|
+
* disallow irregular whitespace
|
|
7182
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-irregular-whitespace.html
|
|
7183
|
+
*/
|
|
7184
|
+
'yml/no-irregular-whitespace'?: Linter.RuleEntry<YmlNoIrregularWhitespace>
|
|
7185
|
+
/**
|
|
7186
|
+
* disallow multiple empty lines
|
|
7187
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-multiple-empty-lines.html
|
|
7188
|
+
*/
|
|
7189
|
+
'yml/no-multiple-empty-lines'?: Linter.RuleEntry<YmlNoMultipleEmptyLines>
|
|
7190
|
+
/**
|
|
7191
|
+
* disallow tabs for indentation.
|
|
7192
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-tab-indent.html
|
|
7193
|
+
*/
|
|
7194
|
+
'yml/no-tab-indent'?: Linter.RuleEntry<[]>
|
|
7195
|
+
/**
|
|
7196
|
+
* disallow trailing zeros for floats
|
|
7197
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-trailing-zeros.html
|
|
7198
|
+
*/
|
|
7199
|
+
'yml/no-trailing-zeros'?: Linter.RuleEntry<[]>
|
|
7200
|
+
/**
|
|
7201
|
+
* require or disallow plain style scalar.
|
|
7202
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/plain-scalar.html
|
|
7203
|
+
*/
|
|
7204
|
+
'yml/plain-scalar'?: Linter.RuleEntry<YmlPlainScalar>
|
|
7205
|
+
/**
|
|
7206
|
+
* enforce the consistent use of either double, or single quotes
|
|
7207
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/quotes.html
|
|
7208
|
+
*/
|
|
7209
|
+
'yml/quotes'?: Linter.RuleEntry<YmlQuotes>
|
|
7210
|
+
/**
|
|
7211
|
+
* disallow mapping keys other than strings
|
|
7212
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/require-string-key.html
|
|
7213
|
+
*/
|
|
7214
|
+
'yml/require-string-key'?: Linter.RuleEntry<[]>
|
|
7215
|
+
/**
|
|
7216
|
+
* require mapping keys to be sorted
|
|
7217
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/sort-keys.html
|
|
7218
|
+
*/
|
|
7219
|
+
'yml/sort-keys'?: Linter.RuleEntry<YmlSortKeys>
|
|
7220
|
+
/**
|
|
7221
|
+
* require sequence values to be sorted
|
|
7222
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/sort-sequence-values.html
|
|
7223
|
+
*/
|
|
7224
|
+
'yml/sort-sequence-values'?: Linter.RuleEntry<YmlSortSequenceValues>
|
|
7225
|
+
/**
|
|
7226
|
+
* enforce consistent spacing after the `#` in a comment
|
|
7227
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/spaced-comment.html
|
|
7228
|
+
*/
|
|
7229
|
+
'yml/spaced-comment'?: Linter.RuleEntry<YmlSpacedComment>
|
|
7230
|
+
/**
|
|
7231
|
+
* disallow parsing errors in Vue custom blocks
|
|
7232
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/vue-custom-block/no-parsing-error.html
|
|
7233
|
+
*/
|
|
7234
|
+
'yml/vue-custom-block/no-parsing-error'?: Linter.RuleEntry<[]>
|
|
7050
7235
|
/**
|
|
7051
7236
|
* Require or disallow "Yoda" conditions
|
|
7052
7237
|
* @see https://eslint.org/docs/latest/rules/yoda
|
|
@@ -9593,6 +9778,43 @@ type PaddingLineBetweenStatements = {
|
|
|
9593
9778
|
prev: _PaddingLineBetweenStatementsStatementType
|
|
9594
9779
|
next: _PaddingLineBetweenStatementsStatementType
|
|
9595
9780
|
}[]
|
|
9781
|
+
// ----- pnpm/json-enforce-catalog -----
|
|
9782
|
+
type PnpmJsonEnforceCatalog = []|[{
|
|
9783
|
+
|
|
9784
|
+
allowedProtocols?: string[]
|
|
9785
|
+
|
|
9786
|
+
autofix?: boolean
|
|
9787
|
+
|
|
9788
|
+
defaultCatalog?: string
|
|
9789
|
+
|
|
9790
|
+
reuseExistingCatalog?: boolean
|
|
9791
|
+
|
|
9792
|
+
conflicts?: ("new-catalog" | "overrides" | "error")
|
|
9793
|
+
|
|
9794
|
+
fields?: string[]
|
|
9795
|
+
}]
|
|
9796
|
+
// ----- pnpm/json-prefer-workspace-settings -----
|
|
9797
|
+
type PnpmJsonPreferWorkspaceSettings = []|[{
|
|
9798
|
+
|
|
9799
|
+
autofix?: boolean
|
|
9800
|
+
}]
|
|
9801
|
+
// ----- pnpm/json-valid-catalog -----
|
|
9802
|
+
type PnpmJsonValidCatalog = []|[{
|
|
9803
|
+
|
|
9804
|
+
autoInsert?: boolean
|
|
9805
|
+
|
|
9806
|
+
autoInsertDefaultSpecifier?: string
|
|
9807
|
+
|
|
9808
|
+
autofix?: boolean
|
|
9809
|
+
|
|
9810
|
+
enforceNoConflict?: boolean
|
|
9811
|
+
|
|
9812
|
+
fields?: unknown[]
|
|
9813
|
+
}]
|
|
9814
|
+
// ----- pnpm/yaml-no-duplicate-catalog-item -----
|
|
9815
|
+
type PnpmYamlNoDuplicateCatalogItem = []|[{
|
|
9816
|
+
allow?: string[]
|
|
9817
|
+
}]
|
|
9596
9818
|
// ----- prefer-arrow-callback -----
|
|
9597
9819
|
type PreferArrowCallback = []|[{
|
|
9598
9820
|
allowNamedFunctions?: boolean
|
|
@@ -12810,13 +13032,220 @@ type YieldStarSpacing = []|[(("before" | "after" | "both" | "neither") | {
|
|
|
12810
13032
|
before?: boolean
|
|
12811
13033
|
after?: boolean
|
|
12812
13034
|
})]
|
|
13035
|
+
// ----- yml/block-mapping -----
|
|
13036
|
+
type YmlBlockMapping = []|[(("always" | "never") | {
|
|
13037
|
+
singleline?: ("always" | "never" | "ignore")
|
|
13038
|
+
multiline?: ("always" | "never" | "ignore")
|
|
13039
|
+
})]
|
|
13040
|
+
// ----- yml/block-mapping-colon-indicator-newline -----
|
|
13041
|
+
type YmlBlockMappingColonIndicatorNewline = []|[("always" | "never")]
|
|
13042
|
+
// ----- yml/block-mapping-question-indicator-newline -----
|
|
13043
|
+
type YmlBlockMappingQuestionIndicatorNewline = []|[("always" | "never")]
|
|
13044
|
+
// ----- yml/block-sequence -----
|
|
13045
|
+
type YmlBlockSequence = []|[(("always" | "never") | {
|
|
13046
|
+
singleline?: ("always" | "never" | "ignore")
|
|
13047
|
+
multiline?: ("always" | "never" | "ignore")
|
|
13048
|
+
})]
|
|
13049
|
+
// ----- yml/block-sequence-hyphen-indicator-newline -----
|
|
13050
|
+
type YmlBlockSequenceHyphenIndicatorNewline = []|[("always" | "never")]|[("always" | "never"), {
|
|
13051
|
+
nestedHyphen?: ("always" | "never")
|
|
13052
|
+
blockMapping?: ("always" | "never")
|
|
13053
|
+
}]
|
|
13054
|
+
// ----- yml/file-extension -----
|
|
13055
|
+
type YmlFileExtension = []|[{
|
|
13056
|
+
extension?: ("yaml" | "yml")
|
|
13057
|
+
caseSensitive?: boolean
|
|
13058
|
+
}]
|
|
13059
|
+
// ----- yml/flow-mapping-curly-newline -----
|
|
13060
|
+
type YmlFlowMappingCurlyNewline = []|[(("always" | "never") | {
|
|
13061
|
+
multiline?: boolean
|
|
13062
|
+
minProperties?: number
|
|
13063
|
+
consistent?: boolean
|
|
13064
|
+
})]
|
|
13065
|
+
// ----- yml/flow-mapping-curly-spacing -----
|
|
13066
|
+
type YmlFlowMappingCurlySpacing = []|[("always" | "never")]|[("always" | "never"), {
|
|
13067
|
+
arraysInObjects?: boolean
|
|
13068
|
+
objectsInObjects?: boolean
|
|
13069
|
+
}]
|
|
13070
|
+
// ----- yml/flow-sequence-bracket-newline -----
|
|
13071
|
+
type YmlFlowSequenceBracketNewline = []|[(("always" | "never" | "consistent") | {
|
|
13072
|
+
multiline?: boolean
|
|
13073
|
+
minItems?: (number | null)
|
|
13074
|
+
})]
|
|
13075
|
+
// ----- yml/flow-sequence-bracket-spacing -----
|
|
13076
|
+
type YmlFlowSequenceBracketSpacing = []|[("always" | "never")]|[("always" | "never"), {
|
|
13077
|
+
singleValue?: boolean
|
|
13078
|
+
objectsInArrays?: boolean
|
|
13079
|
+
arraysInArrays?: boolean
|
|
13080
|
+
}]
|
|
13081
|
+
// ----- yml/indent -----
|
|
13082
|
+
type YmlIndent = []|[number]|[number, {
|
|
13083
|
+
indentBlockSequences?: boolean
|
|
13084
|
+
indicatorValueIndent?: number
|
|
13085
|
+
}]
|
|
13086
|
+
// ----- yml/key-name-casing -----
|
|
13087
|
+
type YmlKeyNameCasing = []|[{
|
|
13088
|
+
camelCase?: boolean
|
|
13089
|
+
PascalCase?: boolean
|
|
13090
|
+
SCREAMING_SNAKE_CASE?: boolean
|
|
13091
|
+
"kebab-case"?: boolean
|
|
13092
|
+
snake_case?: boolean
|
|
13093
|
+
ignores?: string[]
|
|
13094
|
+
}]
|
|
13095
|
+
// ----- yml/key-spacing -----
|
|
13096
|
+
type YmlKeySpacing = []|[({
|
|
13097
|
+
align?: (("colon" | "value") | {
|
|
13098
|
+
on?: ("colon" | "value")
|
|
13099
|
+
mode?: ("strict" | "minimum")
|
|
13100
|
+
beforeColon?: boolean
|
|
13101
|
+
afterColon?: boolean
|
|
13102
|
+
})
|
|
13103
|
+
mode?: ("strict" | "minimum")
|
|
13104
|
+
beforeColon?: boolean
|
|
13105
|
+
afterColon?: boolean
|
|
13106
|
+
} | {
|
|
13107
|
+
singleLine?: {
|
|
13108
|
+
mode?: ("strict" | "minimum")
|
|
13109
|
+
beforeColon?: boolean
|
|
13110
|
+
afterColon?: boolean
|
|
13111
|
+
}
|
|
13112
|
+
multiLine?: {
|
|
13113
|
+
align?: (("colon" | "value") | {
|
|
13114
|
+
on?: ("colon" | "value")
|
|
13115
|
+
mode?: ("strict" | "minimum")
|
|
13116
|
+
beforeColon?: boolean
|
|
13117
|
+
afterColon?: boolean
|
|
13118
|
+
})
|
|
13119
|
+
mode?: ("strict" | "minimum")
|
|
13120
|
+
beforeColon?: boolean
|
|
13121
|
+
afterColon?: boolean
|
|
13122
|
+
}
|
|
13123
|
+
} | {
|
|
13124
|
+
singleLine?: {
|
|
13125
|
+
mode?: ("strict" | "minimum")
|
|
13126
|
+
beforeColon?: boolean
|
|
13127
|
+
afterColon?: boolean
|
|
13128
|
+
}
|
|
13129
|
+
multiLine?: {
|
|
13130
|
+
mode?: ("strict" | "minimum")
|
|
13131
|
+
beforeColon?: boolean
|
|
13132
|
+
afterColon?: boolean
|
|
13133
|
+
}
|
|
13134
|
+
align?: {
|
|
13135
|
+
on?: ("colon" | "value")
|
|
13136
|
+
mode?: ("strict" | "minimum")
|
|
13137
|
+
beforeColon?: boolean
|
|
13138
|
+
afterColon?: boolean
|
|
13139
|
+
}
|
|
13140
|
+
})]
|
|
13141
|
+
// ----- yml/no-irregular-whitespace -----
|
|
13142
|
+
type YmlNoIrregularWhitespace = []|[{
|
|
13143
|
+
skipComments?: boolean
|
|
13144
|
+
skipQuotedScalars?: boolean
|
|
13145
|
+
}]
|
|
13146
|
+
// ----- yml/no-multiple-empty-lines -----
|
|
13147
|
+
type YmlNoMultipleEmptyLines = []|[{
|
|
13148
|
+
max: number
|
|
13149
|
+
maxEOF?: number
|
|
13150
|
+
maxBOF?: number
|
|
13151
|
+
}]
|
|
13152
|
+
// ----- yml/plain-scalar -----
|
|
13153
|
+
type YmlPlainScalar = []|[("always" | "never")]|[("always" | "never"), {
|
|
13154
|
+
ignorePatterns?: string[]
|
|
13155
|
+
overrides?: {
|
|
13156
|
+
mappingKey?: ("always" | "never" | null)
|
|
13157
|
+
}
|
|
13158
|
+
}]
|
|
13159
|
+
// ----- yml/quotes -----
|
|
13160
|
+
type YmlQuotes = []|[{
|
|
13161
|
+
prefer?: ("double" | "single")
|
|
13162
|
+
avoidEscape?: boolean
|
|
13163
|
+
}]
|
|
13164
|
+
// ----- yml/sort-keys -----
|
|
13165
|
+
type YmlSortKeys = ([{
|
|
13166
|
+
pathPattern: string
|
|
13167
|
+
hasProperties?: string[]
|
|
13168
|
+
order: ((string | {
|
|
13169
|
+
keyPattern?: string
|
|
13170
|
+
order?: {
|
|
13171
|
+
type?: ("asc" | "desc")
|
|
13172
|
+
caseSensitive?: boolean
|
|
13173
|
+
natural?: boolean
|
|
13174
|
+
}
|
|
13175
|
+
})[] | {
|
|
13176
|
+
type?: ("asc" | "desc")
|
|
13177
|
+
caseSensitive?: boolean
|
|
13178
|
+
natural?: boolean
|
|
13179
|
+
})
|
|
13180
|
+
minKeys?: number
|
|
13181
|
+
allowLineSeparatedGroups?: boolean
|
|
13182
|
+
}, ...({
|
|
13183
|
+
pathPattern: string
|
|
13184
|
+
hasProperties?: string[]
|
|
13185
|
+
order: ((string | {
|
|
13186
|
+
keyPattern?: string
|
|
13187
|
+
order?: {
|
|
13188
|
+
type?: ("asc" | "desc")
|
|
13189
|
+
caseSensitive?: boolean
|
|
13190
|
+
natural?: boolean
|
|
13191
|
+
}
|
|
13192
|
+
})[] | {
|
|
13193
|
+
type?: ("asc" | "desc")
|
|
13194
|
+
caseSensitive?: boolean
|
|
13195
|
+
natural?: boolean
|
|
13196
|
+
})
|
|
13197
|
+
minKeys?: number
|
|
13198
|
+
allowLineSeparatedGroups?: boolean
|
|
13199
|
+
})[]] | []|[("asc" | "desc")]|[("asc" | "desc"), {
|
|
13200
|
+
caseSensitive?: boolean
|
|
13201
|
+
natural?: boolean
|
|
13202
|
+
minKeys?: number
|
|
13203
|
+
allowLineSeparatedGroups?: boolean
|
|
13204
|
+
}])
|
|
13205
|
+
// ----- yml/sort-sequence-values -----
|
|
13206
|
+
type YmlSortSequenceValues = [{
|
|
13207
|
+
pathPattern: string
|
|
13208
|
+
order: ((string | {
|
|
13209
|
+
valuePattern?: string
|
|
13210
|
+
order?: {
|
|
13211
|
+
type?: ("asc" | "desc")
|
|
13212
|
+
caseSensitive?: boolean
|
|
13213
|
+
natural?: boolean
|
|
13214
|
+
}
|
|
13215
|
+
})[] | {
|
|
13216
|
+
type?: ("asc" | "desc")
|
|
13217
|
+
caseSensitive?: boolean
|
|
13218
|
+
natural?: boolean
|
|
13219
|
+
})
|
|
13220
|
+
minValues?: number
|
|
13221
|
+
}, ...({
|
|
13222
|
+
pathPattern: string
|
|
13223
|
+
order: ((string | {
|
|
13224
|
+
valuePattern?: string
|
|
13225
|
+
order?: {
|
|
13226
|
+
type?: ("asc" | "desc")
|
|
13227
|
+
caseSensitive?: boolean
|
|
13228
|
+
natural?: boolean
|
|
13229
|
+
}
|
|
13230
|
+
})[] | {
|
|
13231
|
+
type?: ("asc" | "desc")
|
|
13232
|
+
caseSensitive?: boolean
|
|
13233
|
+
natural?: boolean
|
|
13234
|
+
})
|
|
13235
|
+
minValues?: number
|
|
13236
|
+
})[]]
|
|
13237
|
+
// ----- yml/spaced-comment -----
|
|
13238
|
+
type YmlSpacedComment = []|[("always" | "never")]|[("always" | "never"), {
|
|
13239
|
+
exceptions?: string[]
|
|
13240
|
+
markers?: string[]
|
|
13241
|
+
}]
|
|
12813
13242
|
// ----- yoda -----
|
|
12814
13243
|
type Yoda = []|[("always" | "never")]|[("always" | "never"), {
|
|
12815
13244
|
exceptRange?: boolean
|
|
12816
13245
|
onlyEquality?: boolean
|
|
12817
13246
|
}]
|
|
12818
13247
|
// Names of all the configs
|
|
12819
|
-
type ConfigNames = '2digits:antfu' | '2digits:boolean' | '2digits:comments' | '2digits:css' | '2digits:drizzle' | '2digits:graphql' | '2digits:ignores' | '2digits:gitignore' | '2digits:javascript' | '2digits:jsdoc' | '2digits:jsonc/base' | '2digits:jsonc/base' | '2digits:jsonc/json' | '2digits:jsonc/jsonc' | '2digits:jsonc/json5' | '2digits:jsonc/package.json' | '2digits:jsonc/tsconfig.json' | '2digits:jsonc/prettier' | '2digits:jsonc/prettier' | '2digits:jsonc/prettier' | '2digits:next/setup' | '2digits:next/rules' | '2digits:node' | '2digits:prettier' | '2digits:react/setup' | '2digits:react/rules' | '2digits:regexp' | '2digits:sonar' | '2digits:storybook/setup' | '2digits:storybook/rules' | '2digits:storybook/disables' | '2digits:storybook/config' | '2digits:tailwind' | '2digits:tanstack' | '2digits:turbo' | '2digits:typescript/setup' | '2digits:typescript/rules' | '2digits:typescript/disables/dts' | '2digits:typescript/disables/test' | '2digits:typescript/disables/cjs' | '2digits:unicorn'
|
|
13248
|
+
type ConfigNames = '2digits:antfu' | '2digits:boolean' | '2digits:comments' | '2digits:css' | '2digits:drizzle' | '2digits:graphql' | '2digits:ignores' | '2digits:gitignore' | '2digits:javascript' | '2digits:jsdoc' | '2digits:jsonc/base' | '2digits:jsonc/base' | '2digits:jsonc/json' | '2digits:jsonc/jsonc' | '2digits:jsonc/json5' | '2digits:jsonc/package.json' | '2digits:jsonc/tsconfig.json' | '2digits:jsonc/prettier' | '2digits:jsonc/prettier' | '2digits:jsonc/prettier' | '2digits:next/setup' | '2digits:next/rules' | '2digits:node' | '2digits:pnpm/package-json' | '2digits:pnpm/pnpm-workspace-yaml' | '2digits:prettier' | '2digits:react/setup' | '2digits:react/rules' | '2digits:regexp' | '2digits:sonar' | '2digits:storybook/setup' | '2digits:storybook/rules' | '2digits:storybook/disables' | '2digits:storybook/config' | '2digits:tailwind' | '2digits:tanstack' | '2digits:turbo' | '2digits:typescript/setup' | '2digits:typescript/rules' | '2digits:typescript/disables/dts' | '2digits:typescript/disables/test' | '2digits:typescript/disables/cjs' | '2digits:unicorn' | '2digits:yaml/setup' | '2digits:yaml/base' | '2digits:yaml/recommended' | '2digits:yaml/standard' | '2digits:yaml/pnpm-workspace' | '2digits:yaml/prettier'
|
|
12820
13249
|
|
|
12821
13250
|
type Rules = RuleOptions;
|
|
12822
13251
|
interface TypedFlatConfigItem extends Omit<Linter.Config<Linter.RulesRecord & Rules>, 'plugins' | 'languageOptions'> {
|
|
@@ -12901,6 +13330,8 @@ declare function next(options?: OptionsWithFiles & OptionsTypeScriptWithTypes):
|
|
|
12901
13330
|
|
|
12902
13331
|
declare function node(): TypedFlatConfigItem[];
|
|
12903
13332
|
|
|
13333
|
+
declare function pnpm(): Promise<TypedFlatConfigItem[]>;
|
|
13334
|
+
|
|
12904
13335
|
declare function prettier(): Promise<TypedFlatConfigItem[]>;
|
|
12905
13336
|
|
|
12906
13337
|
declare function react(options?: OptionsWithReact & OptionsTypeScriptWithTypes): Promise<TypedFlatConfigItem[]>;
|
|
@@ -12921,6 +13352,8 @@ declare function typescript(options?: OptionsTypeScriptWithTypes): Promise<Typed
|
|
|
12921
13352
|
|
|
12922
13353
|
declare function unicorn(): TypedFlatConfigItem[];
|
|
12923
13354
|
|
|
13355
|
+
declare function yaml(): TypedFlatConfigItem[];
|
|
13356
|
+
|
|
12924
13357
|
type SharedOptions<T = unknown> = T & {
|
|
12925
13358
|
enable?: boolean;
|
|
12926
13359
|
};
|
|
@@ -12929,6 +13362,7 @@ interface ESLint2DigitsOptions {
|
|
|
12929
13362
|
turbo?: SharedOptions<OptionsOverrides> | boolean;
|
|
12930
13363
|
js?: OptionsOverrides;
|
|
12931
13364
|
ts?: SharedOptions<OptionsTypeScriptWithTypes> | boolean;
|
|
13365
|
+
pnpm?: SharedOptions | boolean;
|
|
12932
13366
|
graphql?: SharedOptions<OptionsWithFiles> | boolean;
|
|
12933
13367
|
react?: SharedOptions<OptionsWithReact> | boolean;
|
|
12934
13368
|
next?: SharedOptions<OptionsWithFiles> | boolean;
|
|
@@ -12939,4 +13373,4 @@ interface ESLint2DigitsOptions {
|
|
|
12939
13373
|
}
|
|
12940
13374
|
declare function twoDigits(options?: ESLint2DigitsOptions, ...userConfig: TypedFlatConfigItem[]): Promise<TypedFlatConfigItem[]>;
|
|
12941
13375
|
|
|
12942
|
-
export { type ConfigNames, type OptionsOverrides, type OptionsTypeScriptWithTypes, type OptionsWithDrizzle, type OptionsWithFiles, type OptionsWithIgnores, type OptionsWithReact, type OptionsWithStorybook, type Rules, type TypedFlatConfigItem, antfu, boolean, comments, css, twoDigits as default, drizzle, graphql, ignores, javascript, jsdoc, jsonc, next, node, prettier, react, regexp, sonar, storybook, tailwind, tanstack, turbo, twoDigits, typescript, unicorn };
|
|
13376
|
+
export { type ConfigNames, type OptionsOverrides, type OptionsTypeScriptWithTypes, type OptionsWithDrizzle, type OptionsWithFiles, type OptionsWithIgnores, type OptionsWithReact, type OptionsWithStorybook, type Rules, type TypedFlatConfigItem, antfu, boolean, comments, css, twoDigits as default, drizzle, graphql, ignores, javascript, jsdoc, jsonc, next, node, pnpm, prettier, react, regexp, sonar, storybook, tailwind, tanstack, turbo, twoDigits, typescript, unicorn, yaml };
|