@2digits/eslint-config 4.0.1 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +434 -5
- package/dist/index.d.ts +434 -5
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/package.json +8 -9
package/dist/index.d.cts
CHANGED
|
@@ -270,6 +270,11 @@ interface RuleOptions {
|
|
|
270
270
|
* @see https://github.com/eslint/css/blob/main/docs/rules/no-invalid-properties.md
|
|
271
271
|
*/
|
|
272
272
|
'css/no-invalid-properties'?: Linter.RuleEntry<[]>
|
|
273
|
+
/**
|
|
274
|
+
* Enforce the use of logical properties
|
|
275
|
+
* @see https://github.com/eslint/css/blob/main/docs/rules/prefer-logical-properties.md
|
|
276
|
+
*/
|
|
277
|
+
'css/prefer-logical-properties'?: Linter.RuleEntry<CssPreferLogicalProperties>
|
|
273
278
|
/**
|
|
274
279
|
* Enforce the use of baseline features
|
|
275
280
|
*/
|
|
@@ -2645,6 +2650,31 @@ Backward pagination arguments
|
|
|
2645
2650
|
* @deprecated
|
|
2646
2651
|
*/
|
|
2647
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<[]>
|
|
2648
2678
|
/**
|
|
2649
2679
|
* Require using arrow functions for callbacks
|
|
2650
2680
|
* @see https://eslint.org/docs/latest/rules/prefer-arrow-callback
|
|
@@ -2973,8 +3003,13 @@ Backward pagination arguments
|
|
|
2973
3003
|
*/
|
|
2974
3004
|
'react-extra/no-missing-key'?: Linter.RuleEntry<[]>
|
|
2975
3005
|
/**
|
|
2976
|
-
*
|
|
2977
|
-
* @see https://eslint-react.xyz/docs/rules/no-nested-
|
|
3006
|
+
* prevents nesting component definitions inside other components
|
|
3007
|
+
* @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
|
|
3008
|
+
*/
|
|
3009
|
+
'react-extra/no-nested-component-definitions'?: Linter.RuleEntry<[]>
|
|
3010
|
+
/**
|
|
3011
|
+
* prevents nesting component definitions inside other components
|
|
3012
|
+
* @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
|
|
2978
3013
|
*/
|
|
2979
3014
|
'react-extra/no-nested-components'?: Linter.RuleEntry<[]>
|
|
2980
3015
|
/**
|
|
@@ -7037,6 +7072,146 @@ Backward pagination arguments
|
|
|
7037
7072
|
* @deprecated
|
|
7038
7073
|
*/
|
|
7039
7074
|
'yield-star-spacing'?: Linter.RuleEntry<YieldStarSpacing>
|
|
7075
|
+
/**
|
|
7076
|
+
* require or disallow block style mappings.
|
|
7077
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping.html
|
|
7078
|
+
*/
|
|
7079
|
+
'yml/block-mapping'?: Linter.RuleEntry<YmlBlockMapping>
|
|
7080
|
+
/**
|
|
7081
|
+
* enforce consistent line breaks after `:` indicator
|
|
7082
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-colon-indicator-newline.html
|
|
7083
|
+
*/
|
|
7084
|
+
'yml/block-mapping-colon-indicator-newline'?: Linter.RuleEntry<YmlBlockMappingColonIndicatorNewline>
|
|
7085
|
+
/**
|
|
7086
|
+
* enforce consistent line breaks after `?` indicator
|
|
7087
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-question-indicator-newline.html
|
|
7088
|
+
*/
|
|
7089
|
+
'yml/block-mapping-question-indicator-newline'?: Linter.RuleEntry<YmlBlockMappingQuestionIndicatorNewline>
|
|
7090
|
+
/**
|
|
7091
|
+
* require or disallow block style sequences.
|
|
7092
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence.html
|
|
7093
|
+
*/
|
|
7094
|
+
'yml/block-sequence'?: Linter.RuleEntry<YmlBlockSequence>
|
|
7095
|
+
/**
|
|
7096
|
+
* enforce consistent line breaks after `-` indicator
|
|
7097
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence-hyphen-indicator-newline.html
|
|
7098
|
+
*/
|
|
7099
|
+
'yml/block-sequence-hyphen-indicator-newline'?: Linter.RuleEntry<YmlBlockSequenceHyphenIndicatorNewline>
|
|
7100
|
+
/**
|
|
7101
|
+
* enforce YAML file extension
|
|
7102
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/file-extension.html
|
|
7103
|
+
*/
|
|
7104
|
+
'yml/file-extension'?: Linter.RuleEntry<YmlFileExtension>
|
|
7105
|
+
/**
|
|
7106
|
+
* enforce consistent line breaks inside braces
|
|
7107
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-newline.html
|
|
7108
|
+
*/
|
|
7109
|
+
'yml/flow-mapping-curly-newline'?: Linter.RuleEntry<YmlFlowMappingCurlyNewline>
|
|
7110
|
+
/**
|
|
7111
|
+
* enforce consistent spacing inside braces
|
|
7112
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-spacing.html
|
|
7113
|
+
*/
|
|
7114
|
+
'yml/flow-mapping-curly-spacing'?: Linter.RuleEntry<YmlFlowMappingCurlySpacing>
|
|
7115
|
+
/**
|
|
7116
|
+
* enforce linebreaks after opening and before closing flow sequence brackets
|
|
7117
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-sequence-bracket-newline.html
|
|
7118
|
+
*/
|
|
7119
|
+
'yml/flow-sequence-bracket-newline'?: Linter.RuleEntry<YmlFlowSequenceBracketNewline>
|
|
7120
|
+
/**
|
|
7121
|
+
* enforce consistent spacing inside flow sequence brackets
|
|
7122
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-sequence-bracket-spacing.html
|
|
7123
|
+
*/
|
|
7124
|
+
'yml/flow-sequence-bracket-spacing'?: Linter.RuleEntry<YmlFlowSequenceBracketSpacing>
|
|
7125
|
+
/**
|
|
7126
|
+
* enforce consistent indentation
|
|
7127
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/indent.html
|
|
7128
|
+
*/
|
|
7129
|
+
'yml/indent'?: Linter.RuleEntry<YmlIndent>
|
|
7130
|
+
/**
|
|
7131
|
+
* enforce naming convention to key names
|
|
7132
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/key-name-casing.html
|
|
7133
|
+
*/
|
|
7134
|
+
'yml/key-name-casing'?: Linter.RuleEntry<YmlKeyNameCasing>
|
|
7135
|
+
/**
|
|
7136
|
+
* enforce consistent spacing between keys and values in mapping pairs
|
|
7137
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/key-spacing.html
|
|
7138
|
+
*/
|
|
7139
|
+
'yml/key-spacing'?: Linter.RuleEntry<YmlKeySpacing>
|
|
7140
|
+
/**
|
|
7141
|
+
* disallow empty document
|
|
7142
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-document.html
|
|
7143
|
+
*/
|
|
7144
|
+
'yml/no-empty-document'?: Linter.RuleEntry<[]>
|
|
7145
|
+
/**
|
|
7146
|
+
* disallow empty mapping keys
|
|
7147
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-key.html
|
|
7148
|
+
*/
|
|
7149
|
+
'yml/no-empty-key'?: Linter.RuleEntry<[]>
|
|
7150
|
+
/**
|
|
7151
|
+
* disallow empty mapping values
|
|
7152
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-mapping-value.html
|
|
7153
|
+
*/
|
|
7154
|
+
'yml/no-empty-mapping-value'?: Linter.RuleEntry<[]>
|
|
7155
|
+
/**
|
|
7156
|
+
* disallow empty sequence entries
|
|
7157
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-sequence-entry.html
|
|
7158
|
+
*/
|
|
7159
|
+
'yml/no-empty-sequence-entry'?: Linter.RuleEntry<[]>
|
|
7160
|
+
/**
|
|
7161
|
+
* disallow irregular whitespace
|
|
7162
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-irregular-whitespace.html
|
|
7163
|
+
*/
|
|
7164
|
+
'yml/no-irregular-whitespace'?: Linter.RuleEntry<YmlNoIrregularWhitespace>
|
|
7165
|
+
/**
|
|
7166
|
+
* disallow multiple empty lines
|
|
7167
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-multiple-empty-lines.html
|
|
7168
|
+
*/
|
|
7169
|
+
'yml/no-multiple-empty-lines'?: Linter.RuleEntry<YmlNoMultipleEmptyLines>
|
|
7170
|
+
/**
|
|
7171
|
+
* disallow tabs for indentation.
|
|
7172
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-tab-indent.html
|
|
7173
|
+
*/
|
|
7174
|
+
'yml/no-tab-indent'?: Linter.RuleEntry<[]>
|
|
7175
|
+
/**
|
|
7176
|
+
* disallow trailing zeros for floats
|
|
7177
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-trailing-zeros.html
|
|
7178
|
+
*/
|
|
7179
|
+
'yml/no-trailing-zeros'?: Linter.RuleEntry<[]>
|
|
7180
|
+
/**
|
|
7181
|
+
* require or disallow plain style scalar.
|
|
7182
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/plain-scalar.html
|
|
7183
|
+
*/
|
|
7184
|
+
'yml/plain-scalar'?: Linter.RuleEntry<YmlPlainScalar>
|
|
7185
|
+
/**
|
|
7186
|
+
* enforce the consistent use of either double, or single quotes
|
|
7187
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/quotes.html
|
|
7188
|
+
*/
|
|
7189
|
+
'yml/quotes'?: Linter.RuleEntry<YmlQuotes>
|
|
7190
|
+
/**
|
|
7191
|
+
* disallow mapping keys other than strings
|
|
7192
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/require-string-key.html
|
|
7193
|
+
*/
|
|
7194
|
+
'yml/require-string-key'?: Linter.RuleEntry<[]>
|
|
7195
|
+
/**
|
|
7196
|
+
* require mapping keys to be sorted
|
|
7197
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/sort-keys.html
|
|
7198
|
+
*/
|
|
7199
|
+
'yml/sort-keys'?: Linter.RuleEntry<YmlSortKeys>
|
|
7200
|
+
/**
|
|
7201
|
+
* require sequence values to be sorted
|
|
7202
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/sort-sequence-values.html
|
|
7203
|
+
*/
|
|
7204
|
+
'yml/sort-sequence-values'?: Linter.RuleEntry<YmlSortSequenceValues>
|
|
7205
|
+
/**
|
|
7206
|
+
* enforce consistent spacing after the `#` in a comment
|
|
7207
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/spaced-comment.html
|
|
7208
|
+
*/
|
|
7209
|
+
'yml/spaced-comment'?: Linter.RuleEntry<YmlSpacedComment>
|
|
7210
|
+
/**
|
|
7211
|
+
* disallow parsing errors in Vue custom blocks
|
|
7212
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/vue-custom-block/no-parsing-error.html
|
|
7213
|
+
*/
|
|
7214
|
+
'yml/vue-custom-block/no-parsing-error'?: Linter.RuleEntry<[]>
|
|
7040
7215
|
/**
|
|
7041
7216
|
* Require or disallow "Yoda" conditions
|
|
7042
7217
|
* @see https://eslint.org/docs/latest/rules/yoda
|
|
@@ -7213,9 +7388,14 @@ type ConsistentReturn = []|[{
|
|
|
7213
7388
|
}]
|
|
7214
7389
|
// ----- consistent-this -----
|
|
7215
7390
|
type ConsistentThis = string[]
|
|
7391
|
+
// ----- css/prefer-logical-properties -----
|
|
7392
|
+
type CssPreferLogicalProperties = []|[{
|
|
7393
|
+
allowProperties?: string[]
|
|
7394
|
+
allowUnits?: string[]
|
|
7395
|
+
}]
|
|
7216
7396
|
// ----- css/require-baseline -----
|
|
7217
7397
|
type CssRequireBaseline = []|[{
|
|
7218
|
-
available?: ("widely" | "newly")
|
|
7398
|
+
available?: (("widely" | "newly") | number)
|
|
7219
7399
|
}]
|
|
7220
7400
|
// ----- css/use-layers -----
|
|
7221
7401
|
type CssUseLayers = []|[{
|
|
@@ -9578,6 +9758,43 @@ type PaddingLineBetweenStatements = {
|
|
|
9578
9758
|
prev: _PaddingLineBetweenStatementsStatementType
|
|
9579
9759
|
next: _PaddingLineBetweenStatementsStatementType
|
|
9580
9760
|
}[]
|
|
9761
|
+
// ----- pnpm/json-enforce-catalog -----
|
|
9762
|
+
type PnpmJsonEnforceCatalog = []|[{
|
|
9763
|
+
|
|
9764
|
+
allowedProtocols?: string[]
|
|
9765
|
+
|
|
9766
|
+
autofix?: boolean
|
|
9767
|
+
|
|
9768
|
+
defaultCatalog?: string
|
|
9769
|
+
|
|
9770
|
+
reuseExistingCatalog?: boolean
|
|
9771
|
+
|
|
9772
|
+
conflicts?: ("new-catalog" | "overrides" | "error")
|
|
9773
|
+
|
|
9774
|
+
fields?: string[]
|
|
9775
|
+
}]
|
|
9776
|
+
// ----- pnpm/json-prefer-workspace-settings -----
|
|
9777
|
+
type PnpmJsonPreferWorkspaceSettings = []|[{
|
|
9778
|
+
|
|
9779
|
+
autofix?: boolean
|
|
9780
|
+
}]
|
|
9781
|
+
// ----- pnpm/json-valid-catalog -----
|
|
9782
|
+
type PnpmJsonValidCatalog = []|[{
|
|
9783
|
+
|
|
9784
|
+
autoInsert?: boolean
|
|
9785
|
+
|
|
9786
|
+
autoInsertDefaultSpecifier?: string
|
|
9787
|
+
|
|
9788
|
+
autofix?: boolean
|
|
9789
|
+
|
|
9790
|
+
enforceNoConflict?: boolean
|
|
9791
|
+
|
|
9792
|
+
fields?: unknown[]
|
|
9793
|
+
}]
|
|
9794
|
+
// ----- pnpm/yaml-no-duplicate-catalog-item -----
|
|
9795
|
+
type PnpmYamlNoDuplicateCatalogItem = []|[{
|
|
9796
|
+
allow?: string[]
|
|
9797
|
+
}]
|
|
9581
9798
|
// ----- prefer-arrow-callback -----
|
|
9582
9799
|
type PreferArrowCallback = []|[{
|
|
9583
9800
|
allowNamedFunctions?: boolean
|
|
@@ -12795,13 +13012,220 @@ type YieldStarSpacing = []|[(("before" | "after" | "both" | "neither") | {
|
|
|
12795
13012
|
before?: boolean
|
|
12796
13013
|
after?: boolean
|
|
12797
13014
|
})]
|
|
13015
|
+
// ----- yml/block-mapping -----
|
|
13016
|
+
type YmlBlockMapping = []|[(("always" | "never") | {
|
|
13017
|
+
singleline?: ("always" | "never" | "ignore")
|
|
13018
|
+
multiline?: ("always" | "never" | "ignore")
|
|
13019
|
+
})]
|
|
13020
|
+
// ----- yml/block-mapping-colon-indicator-newline -----
|
|
13021
|
+
type YmlBlockMappingColonIndicatorNewline = []|[("always" | "never")]
|
|
13022
|
+
// ----- yml/block-mapping-question-indicator-newline -----
|
|
13023
|
+
type YmlBlockMappingQuestionIndicatorNewline = []|[("always" | "never")]
|
|
13024
|
+
// ----- yml/block-sequence -----
|
|
13025
|
+
type YmlBlockSequence = []|[(("always" | "never") | {
|
|
13026
|
+
singleline?: ("always" | "never" | "ignore")
|
|
13027
|
+
multiline?: ("always" | "never" | "ignore")
|
|
13028
|
+
})]
|
|
13029
|
+
// ----- yml/block-sequence-hyphen-indicator-newline -----
|
|
13030
|
+
type YmlBlockSequenceHyphenIndicatorNewline = []|[("always" | "never")]|[("always" | "never"), {
|
|
13031
|
+
nestedHyphen?: ("always" | "never")
|
|
13032
|
+
blockMapping?: ("always" | "never")
|
|
13033
|
+
}]
|
|
13034
|
+
// ----- yml/file-extension -----
|
|
13035
|
+
type YmlFileExtension = []|[{
|
|
13036
|
+
extension?: ("yaml" | "yml")
|
|
13037
|
+
caseSensitive?: boolean
|
|
13038
|
+
}]
|
|
13039
|
+
// ----- yml/flow-mapping-curly-newline -----
|
|
13040
|
+
type YmlFlowMappingCurlyNewline = []|[(("always" | "never") | {
|
|
13041
|
+
multiline?: boolean
|
|
13042
|
+
minProperties?: number
|
|
13043
|
+
consistent?: boolean
|
|
13044
|
+
})]
|
|
13045
|
+
// ----- yml/flow-mapping-curly-spacing -----
|
|
13046
|
+
type YmlFlowMappingCurlySpacing = []|[("always" | "never")]|[("always" | "never"), {
|
|
13047
|
+
arraysInObjects?: boolean
|
|
13048
|
+
objectsInObjects?: boolean
|
|
13049
|
+
}]
|
|
13050
|
+
// ----- yml/flow-sequence-bracket-newline -----
|
|
13051
|
+
type YmlFlowSequenceBracketNewline = []|[(("always" | "never" | "consistent") | {
|
|
13052
|
+
multiline?: boolean
|
|
13053
|
+
minItems?: (number | null)
|
|
13054
|
+
})]
|
|
13055
|
+
// ----- yml/flow-sequence-bracket-spacing -----
|
|
13056
|
+
type YmlFlowSequenceBracketSpacing = []|[("always" | "never")]|[("always" | "never"), {
|
|
13057
|
+
singleValue?: boolean
|
|
13058
|
+
objectsInArrays?: boolean
|
|
13059
|
+
arraysInArrays?: boolean
|
|
13060
|
+
}]
|
|
13061
|
+
// ----- yml/indent -----
|
|
13062
|
+
type YmlIndent = []|[number]|[number, {
|
|
13063
|
+
indentBlockSequences?: boolean
|
|
13064
|
+
indicatorValueIndent?: number
|
|
13065
|
+
}]
|
|
13066
|
+
// ----- yml/key-name-casing -----
|
|
13067
|
+
type YmlKeyNameCasing = []|[{
|
|
13068
|
+
camelCase?: boolean
|
|
13069
|
+
PascalCase?: boolean
|
|
13070
|
+
SCREAMING_SNAKE_CASE?: boolean
|
|
13071
|
+
"kebab-case"?: boolean
|
|
13072
|
+
snake_case?: boolean
|
|
13073
|
+
ignores?: string[]
|
|
13074
|
+
}]
|
|
13075
|
+
// ----- yml/key-spacing -----
|
|
13076
|
+
type YmlKeySpacing = []|[({
|
|
13077
|
+
align?: (("colon" | "value") | {
|
|
13078
|
+
on?: ("colon" | "value")
|
|
13079
|
+
mode?: ("strict" | "minimum")
|
|
13080
|
+
beforeColon?: boolean
|
|
13081
|
+
afterColon?: boolean
|
|
13082
|
+
})
|
|
13083
|
+
mode?: ("strict" | "minimum")
|
|
13084
|
+
beforeColon?: boolean
|
|
13085
|
+
afterColon?: boolean
|
|
13086
|
+
} | {
|
|
13087
|
+
singleLine?: {
|
|
13088
|
+
mode?: ("strict" | "minimum")
|
|
13089
|
+
beforeColon?: boolean
|
|
13090
|
+
afterColon?: boolean
|
|
13091
|
+
}
|
|
13092
|
+
multiLine?: {
|
|
13093
|
+
align?: (("colon" | "value") | {
|
|
13094
|
+
on?: ("colon" | "value")
|
|
13095
|
+
mode?: ("strict" | "minimum")
|
|
13096
|
+
beforeColon?: boolean
|
|
13097
|
+
afterColon?: boolean
|
|
13098
|
+
})
|
|
13099
|
+
mode?: ("strict" | "minimum")
|
|
13100
|
+
beforeColon?: boolean
|
|
13101
|
+
afterColon?: boolean
|
|
13102
|
+
}
|
|
13103
|
+
} | {
|
|
13104
|
+
singleLine?: {
|
|
13105
|
+
mode?: ("strict" | "minimum")
|
|
13106
|
+
beforeColon?: boolean
|
|
13107
|
+
afterColon?: boolean
|
|
13108
|
+
}
|
|
13109
|
+
multiLine?: {
|
|
13110
|
+
mode?: ("strict" | "minimum")
|
|
13111
|
+
beforeColon?: boolean
|
|
13112
|
+
afterColon?: boolean
|
|
13113
|
+
}
|
|
13114
|
+
align?: {
|
|
13115
|
+
on?: ("colon" | "value")
|
|
13116
|
+
mode?: ("strict" | "minimum")
|
|
13117
|
+
beforeColon?: boolean
|
|
13118
|
+
afterColon?: boolean
|
|
13119
|
+
}
|
|
13120
|
+
})]
|
|
13121
|
+
// ----- yml/no-irregular-whitespace -----
|
|
13122
|
+
type YmlNoIrregularWhitespace = []|[{
|
|
13123
|
+
skipComments?: boolean
|
|
13124
|
+
skipQuotedScalars?: boolean
|
|
13125
|
+
}]
|
|
13126
|
+
// ----- yml/no-multiple-empty-lines -----
|
|
13127
|
+
type YmlNoMultipleEmptyLines = []|[{
|
|
13128
|
+
max: number
|
|
13129
|
+
maxEOF?: number
|
|
13130
|
+
maxBOF?: number
|
|
13131
|
+
}]
|
|
13132
|
+
// ----- yml/plain-scalar -----
|
|
13133
|
+
type YmlPlainScalar = []|[("always" | "never")]|[("always" | "never"), {
|
|
13134
|
+
ignorePatterns?: string[]
|
|
13135
|
+
overrides?: {
|
|
13136
|
+
mappingKey?: ("always" | "never" | null)
|
|
13137
|
+
}
|
|
13138
|
+
}]
|
|
13139
|
+
// ----- yml/quotes -----
|
|
13140
|
+
type YmlQuotes = []|[{
|
|
13141
|
+
prefer?: ("double" | "single")
|
|
13142
|
+
avoidEscape?: boolean
|
|
13143
|
+
}]
|
|
13144
|
+
// ----- yml/sort-keys -----
|
|
13145
|
+
type YmlSortKeys = ([{
|
|
13146
|
+
pathPattern: string
|
|
13147
|
+
hasProperties?: string[]
|
|
13148
|
+
order: ((string | {
|
|
13149
|
+
keyPattern?: string
|
|
13150
|
+
order?: {
|
|
13151
|
+
type?: ("asc" | "desc")
|
|
13152
|
+
caseSensitive?: boolean
|
|
13153
|
+
natural?: boolean
|
|
13154
|
+
}
|
|
13155
|
+
})[] | {
|
|
13156
|
+
type?: ("asc" | "desc")
|
|
13157
|
+
caseSensitive?: boolean
|
|
13158
|
+
natural?: boolean
|
|
13159
|
+
})
|
|
13160
|
+
minKeys?: number
|
|
13161
|
+
allowLineSeparatedGroups?: boolean
|
|
13162
|
+
}, ...({
|
|
13163
|
+
pathPattern: string
|
|
13164
|
+
hasProperties?: string[]
|
|
13165
|
+
order: ((string | {
|
|
13166
|
+
keyPattern?: string
|
|
13167
|
+
order?: {
|
|
13168
|
+
type?: ("asc" | "desc")
|
|
13169
|
+
caseSensitive?: boolean
|
|
13170
|
+
natural?: boolean
|
|
13171
|
+
}
|
|
13172
|
+
})[] | {
|
|
13173
|
+
type?: ("asc" | "desc")
|
|
13174
|
+
caseSensitive?: boolean
|
|
13175
|
+
natural?: boolean
|
|
13176
|
+
})
|
|
13177
|
+
minKeys?: number
|
|
13178
|
+
allowLineSeparatedGroups?: boolean
|
|
13179
|
+
})[]] | []|[("asc" | "desc")]|[("asc" | "desc"), {
|
|
13180
|
+
caseSensitive?: boolean
|
|
13181
|
+
natural?: boolean
|
|
13182
|
+
minKeys?: number
|
|
13183
|
+
allowLineSeparatedGroups?: boolean
|
|
13184
|
+
}])
|
|
13185
|
+
// ----- yml/sort-sequence-values -----
|
|
13186
|
+
type YmlSortSequenceValues = [{
|
|
13187
|
+
pathPattern: string
|
|
13188
|
+
order: ((string | {
|
|
13189
|
+
valuePattern?: string
|
|
13190
|
+
order?: {
|
|
13191
|
+
type?: ("asc" | "desc")
|
|
13192
|
+
caseSensitive?: boolean
|
|
13193
|
+
natural?: boolean
|
|
13194
|
+
}
|
|
13195
|
+
})[] | {
|
|
13196
|
+
type?: ("asc" | "desc")
|
|
13197
|
+
caseSensitive?: boolean
|
|
13198
|
+
natural?: boolean
|
|
13199
|
+
})
|
|
13200
|
+
minValues?: number
|
|
13201
|
+
}, ...({
|
|
13202
|
+
pathPattern: string
|
|
13203
|
+
order: ((string | {
|
|
13204
|
+
valuePattern?: string
|
|
13205
|
+
order?: {
|
|
13206
|
+
type?: ("asc" | "desc")
|
|
13207
|
+
caseSensitive?: boolean
|
|
13208
|
+
natural?: boolean
|
|
13209
|
+
}
|
|
13210
|
+
})[] | {
|
|
13211
|
+
type?: ("asc" | "desc")
|
|
13212
|
+
caseSensitive?: boolean
|
|
13213
|
+
natural?: boolean
|
|
13214
|
+
})
|
|
13215
|
+
minValues?: number
|
|
13216
|
+
})[]]
|
|
13217
|
+
// ----- yml/spaced-comment -----
|
|
13218
|
+
type YmlSpacedComment = []|[("always" | "never")]|[("always" | "never"), {
|
|
13219
|
+
exceptions?: string[]
|
|
13220
|
+
markers?: string[]
|
|
13221
|
+
}]
|
|
12798
13222
|
// ----- yoda -----
|
|
12799
13223
|
type Yoda = []|[("always" | "never")]|[("always" | "never"), {
|
|
12800
13224
|
exceptRange?: boolean
|
|
12801
13225
|
onlyEquality?: boolean
|
|
12802
13226
|
}]
|
|
12803
13227
|
// Names of all the configs
|
|
12804
|
-
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'
|
|
13228
|
+
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'
|
|
12805
13229
|
|
|
12806
13230
|
type Rules = RuleOptions;
|
|
12807
13231
|
interface TypedFlatConfigItem extends Omit<Linter.Config<Linter.RulesRecord & Rules>, 'plugins' | 'languageOptions'> {
|
|
@@ -12886,6 +13310,8 @@ declare function next(options?: OptionsWithFiles & OptionsTypeScriptWithTypes):
|
|
|
12886
13310
|
|
|
12887
13311
|
declare function node(): TypedFlatConfigItem[];
|
|
12888
13312
|
|
|
13313
|
+
declare function pnpm(): Promise<TypedFlatConfigItem[]>;
|
|
13314
|
+
|
|
12889
13315
|
declare function prettier(): Promise<TypedFlatConfigItem[]>;
|
|
12890
13316
|
|
|
12891
13317
|
declare function react(options?: OptionsWithReact & OptionsTypeScriptWithTypes): Promise<TypedFlatConfigItem[]>;
|
|
@@ -12906,6 +13332,8 @@ declare function typescript(options?: OptionsTypeScriptWithTypes): Promise<Typed
|
|
|
12906
13332
|
|
|
12907
13333
|
declare function unicorn(): TypedFlatConfigItem[];
|
|
12908
13334
|
|
|
13335
|
+
declare function yaml(): TypedFlatConfigItem[];
|
|
13336
|
+
|
|
12909
13337
|
type SharedOptions<T = unknown> = T & {
|
|
12910
13338
|
enable?: boolean;
|
|
12911
13339
|
};
|
|
@@ -12914,6 +13342,7 @@ interface ESLint2DigitsOptions {
|
|
|
12914
13342
|
turbo?: SharedOptions<OptionsOverrides> | boolean;
|
|
12915
13343
|
js?: OptionsOverrides;
|
|
12916
13344
|
ts?: SharedOptions<OptionsTypeScriptWithTypes> | boolean;
|
|
13345
|
+
pnpm?: SharedOptions | boolean;
|
|
12917
13346
|
graphql?: SharedOptions<OptionsWithFiles> | boolean;
|
|
12918
13347
|
react?: SharedOptions<OptionsWithReact> | boolean;
|
|
12919
13348
|
next?: SharedOptions<OptionsWithFiles> | boolean;
|
|
@@ -12924,4 +13353,4 @@ interface ESLint2DigitsOptions {
|
|
|
12924
13353
|
}
|
|
12925
13354
|
declare function twoDigits(options?: ESLint2DigitsOptions, ...userConfig: TypedFlatConfigItem[]): Promise<TypedFlatConfigItem[]>;
|
|
12926
13355
|
|
|
12927
|
-
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 };
|
|
13356
|
+
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 };
|