@storm-software/eslint 0.25.0 → 0.26.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/README.md +1 -1
- package/dist/preset.d.mts +365 -0
- package/dist/preset.d.ts +365 -0
- package/dist/preset.mjs +29 -17
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
package/dist/preset.d.mts
CHANGED
|
@@ -780,6 +780,27 @@ interface RuleOptions {
|
|
|
780
780
|
* @see https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable
|
|
781
781
|
*/
|
|
782
782
|
'@typescript-eslint/use-unknown-in-catch-callback-variable'?: Linter.RuleEntry<[]>
|
|
783
|
+
'json/*'?: Linter.RuleEntry<Json/*>
|
|
784
|
+
'json/colon-expected'?: Linter.RuleEntry<JsonColonExpected>
|
|
785
|
+
'json/comma-expected'?: Linter.RuleEntry<JsonCommaExpected>
|
|
786
|
+
'json/comma-or-close-backet-expected'?: Linter.RuleEntry<JsonCommaOrCloseBacketExpected>
|
|
787
|
+
'json/comma-or-close-brace-expected'?: Linter.RuleEntry<JsonCommaOrCloseBraceExpected>
|
|
788
|
+
'json/comment-not-permitted'?: Linter.RuleEntry<JsonCommentNotPermitted>
|
|
789
|
+
'json/duplicate-key'?: Linter.RuleEntry<JsonDuplicateKey>
|
|
790
|
+
'json/enum-value-mismatch'?: Linter.RuleEntry<JsonEnumValueMismatch>
|
|
791
|
+
'json/invalid-character'?: Linter.RuleEntry<JsonInvalidCharacter>
|
|
792
|
+
'json/invalid-escape-character'?: Linter.RuleEntry<JsonInvalidEscapeCharacter>
|
|
793
|
+
'json/invalid-unicode'?: Linter.RuleEntry<JsonInvalidUnicode>
|
|
794
|
+
'json/json'?: Linter.RuleEntry<JsonJson>
|
|
795
|
+
'json/property-expected'?: Linter.RuleEntry<JsonPropertyExpected>
|
|
796
|
+
'json/schema-resolve-error'?: Linter.RuleEntry<JsonSchemaResolveError>
|
|
797
|
+
'json/trailing-comma'?: Linter.RuleEntry<JsonTrailingComma>
|
|
798
|
+
'json/undefined'?: Linter.RuleEntry<JsonUndefined>
|
|
799
|
+
'json/unexpected-end-of-comment'?: Linter.RuleEntry<JsonUnexpectedEndOfComment>
|
|
800
|
+
'json/unexpected-end-of-number'?: Linter.RuleEntry<JsonUnexpectedEndOfNumber>
|
|
801
|
+
'json/unexpected-end-of-string'?: Linter.RuleEntry<JsonUnexpectedEndOfString>
|
|
802
|
+
'json/unknown'?: Linter.RuleEntry<JsonUnknown>
|
|
803
|
+
'json/value-expected'?: Linter.RuleEntry<JsonValueExpected>
|
|
783
804
|
/**
|
|
784
805
|
* Enforce emojis are wrapped in `<span>` and provide screenreader access.
|
|
785
806
|
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/accessible-emoji.md
|
|
@@ -2184,6 +2205,146 @@ interface RuleOptions {
|
|
|
2184
2205
|
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/throw-new-error.md
|
|
2185
2206
|
*/
|
|
2186
2207
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
|
|
2208
|
+
/**
|
|
2209
|
+
* require or disallow block style mappings.
|
|
2210
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping.html
|
|
2211
|
+
*/
|
|
2212
|
+
'yml/block-mapping'?: Linter.RuleEntry<YmlBlockMapping>
|
|
2213
|
+
/**
|
|
2214
|
+
* enforce consistent line breaks after `:` indicator
|
|
2215
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-colon-indicator-newline.html
|
|
2216
|
+
*/
|
|
2217
|
+
'yml/block-mapping-colon-indicator-newline'?: Linter.RuleEntry<YmlBlockMappingColonIndicatorNewline>
|
|
2218
|
+
/**
|
|
2219
|
+
* enforce consistent line breaks after `?` indicator
|
|
2220
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-question-indicator-newline.html
|
|
2221
|
+
*/
|
|
2222
|
+
'yml/block-mapping-question-indicator-newline'?: Linter.RuleEntry<YmlBlockMappingQuestionIndicatorNewline>
|
|
2223
|
+
/**
|
|
2224
|
+
* require or disallow block style sequences.
|
|
2225
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence.html
|
|
2226
|
+
*/
|
|
2227
|
+
'yml/block-sequence'?: Linter.RuleEntry<YmlBlockSequence>
|
|
2228
|
+
/**
|
|
2229
|
+
* enforce consistent line breaks after `-` indicator
|
|
2230
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence-hyphen-indicator-newline.html
|
|
2231
|
+
*/
|
|
2232
|
+
'yml/block-sequence-hyphen-indicator-newline'?: Linter.RuleEntry<YmlBlockSequenceHyphenIndicatorNewline>
|
|
2233
|
+
/**
|
|
2234
|
+
* enforce YAML file extension
|
|
2235
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/file-extension.html
|
|
2236
|
+
*/
|
|
2237
|
+
'yml/file-extension'?: Linter.RuleEntry<YmlFileExtension>
|
|
2238
|
+
/**
|
|
2239
|
+
* enforce consistent line breaks inside braces
|
|
2240
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-newline.html
|
|
2241
|
+
*/
|
|
2242
|
+
'yml/flow-mapping-curly-newline'?: Linter.RuleEntry<YmlFlowMappingCurlyNewline>
|
|
2243
|
+
/**
|
|
2244
|
+
* enforce consistent spacing inside braces
|
|
2245
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-spacing.html
|
|
2246
|
+
*/
|
|
2247
|
+
'yml/flow-mapping-curly-spacing'?: Linter.RuleEntry<YmlFlowMappingCurlySpacing>
|
|
2248
|
+
/**
|
|
2249
|
+
* enforce linebreaks after opening and before closing flow sequence brackets
|
|
2250
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-sequence-bracket-newline.html
|
|
2251
|
+
*/
|
|
2252
|
+
'yml/flow-sequence-bracket-newline'?: Linter.RuleEntry<YmlFlowSequenceBracketNewline>
|
|
2253
|
+
/**
|
|
2254
|
+
* enforce consistent spacing inside flow sequence brackets
|
|
2255
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-sequence-bracket-spacing.html
|
|
2256
|
+
*/
|
|
2257
|
+
'yml/flow-sequence-bracket-spacing'?: Linter.RuleEntry<YmlFlowSequenceBracketSpacing>
|
|
2258
|
+
/**
|
|
2259
|
+
* enforce consistent indentation
|
|
2260
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/indent.html
|
|
2261
|
+
*/
|
|
2262
|
+
'yml/indent'?: Linter.RuleEntry<YmlIndent>
|
|
2263
|
+
/**
|
|
2264
|
+
* enforce naming convention to key names
|
|
2265
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/key-name-casing.html
|
|
2266
|
+
*/
|
|
2267
|
+
'yml/key-name-casing'?: Linter.RuleEntry<YmlKeyNameCasing>
|
|
2268
|
+
/**
|
|
2269
|
+
* enforce consistent spacing between keys and values in mapping pairs
|
|
2270
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/key-spacing.html
|
|
2271
|
+
*/
|
|
2272
|
+
'yml/key-spacing'?: Linter.RuleEntry<YmlKeySpacing>
|
|
2273
|
+
/**
|
|
2274
|
+
* disallow empty document
|
|
2275
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-document.html
|
|
2276
|
+
*/
|
|
2277
|
+
'yml/no-empty-document'?: Linter.RuleEntry<[]>
|
|
2278
|
+
/**
|
|
2279
|
+
* disallow empty mapping keys
|
|
2280
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-key.html
|
|
2281
|
+
*/
|
|
2282
|
+
'yml/no-empty-key'?: Linter.RuleEntry<[]>
|
|
2283
|
+
/**
|
|
2284
|
+
* disallow empty mapping values
|
|
2285
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-mapping-value.html
|
|
2286
|
+
*/
|
|
2287
|
+
'yml/no-empty-mapping-value'?: Linter.RuleEntry<[]>
|
|
2288
|
+
/**
|
|
2289
|
+
* disallow empty sequence entries
|
|
2290
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-sequence-entry.html
|
|
2291
|
+
*/
|
|
2292
|
+
'yml/no-empty-sequence-entry'?: Linter.RuleEntry<[]>
|
|
2293
|
+
/**
|
|
2294
|
+
* disallow irregular whitespace
|
|
2295
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-irregular-whitespace.html
|
|
2296
|
+
*/
|
|
2297
|
+
'yml/no-irregular-whitespace'?: Linter.RuleEntry<YmlNoIrregularWhitespace>
|
|
2298
|
+
/**
|
|
2299
|
+
* disallow multiple empty lines
|
|
2300
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-multiple-empty-lines.html
|
|
2301
|
+
*/
|
|
2302
|
+
'yml/no-multiple-empty-lines'?: Linter.RuleEntry<YmlNoMultipleEmptyLines>
|
|
2303
|
+
/**
|
|
2304
|
+
* disallow tabs for indentation.
|
|
2305
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-tab-indent.html
|
|
2306
|
+
*/
|
|
2307
|
+
'yml/no-tab-indent'?: Linter.RuleEntry<[]>
|
|
2308
|
+
/**
|
|
2309
|
+
* disallow trailing zeros for floats
|
|
2310
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-trailing-zeros.html
|
|
2311
|
+
*/
|
|
2312
|
+
'yml/no-trailing-zeros'?: Linter.RuleEntry<[]>
|
|
2313
|
+
/**
|
|
2314
|
+
* require or disallow plain style scalar.
|
|
2315
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/plain-scalar.html
|
|
2316
|
+
*/
|
|
2317
|
+
'yml/plain-scalar'?: Linter.RuleEntry<YmlPlainScalar>
|
|
2318
|
+
/**
|
|
2319
|
+
* enforce the consistent use of either double, or single quotes
|
|
2320
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/quotes.html
|
|
2321
|
+
*/
|
|
2322
|
+
'yml/quotes'?: Linter.RuleEntry<YmlQuotes>
|
|
2323
|
+
/**
|
|
2324
|
+
* disallow mapping keys other than strings
|
|
2325
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/require-string-key.html
|
|
2326
|
+
*/
|
|
2327
|
+
'yml/require-string-key'?: Linter.RuleEntry<[]>
|
|
2328
|
+
/**
|
|
2329
|
+
* require mapping keys to be sorted
|
|
2330
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/sort-keys.html
|
|
2331
|
+
*/
|
|
2332
|
+
'yml/sort-keys'?: Linter.RuleEntry<YmlSortKeys>
|
|
2333
|
+
/**
|
|
2334
|
+
* require sequence values to be sorted
|
|
2335
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/sort-sequence-values.html
|
|
2336
|
+
*/
|
|
2337
|
+
'yml/sort-sequence-values'?: Linter.RuleEntry<YmlSortSequenceValues>
|
|
2338
|
+
/**
|
|
2339
|
+
* enforce consistent spacing after the `#` in a comment
|
|
2340
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/spaced-comment.html
|
|
2341
|
+
*/
|
|
2342
|
+
'yml/spaced-comment'?: Linter.RuleEntry<YmlSpacedComment>
|
|
2343
|
+
/**
|
|
2344
|
+
* disallow parsing errors in Vue custom blocks
|
|
2345
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/vue-custom-block/no-parsing-error.html
|
|
2346
|
+
*/
|
|
2347
|
+
'yml/vue-custom-block/no-parsing-error'?: Linter.RuleEntry<[]>
|
|
2187
2348
|
}
|
|
2188
2349
|
|
|
2189
2350
|
/* ======= Declarations ======= */
|
|
@@ -4369,5 +4530,209 @@ type UnicornTemplateIndent = []|[{
|
|
|
4369
4530
|
selectors?: string[]
|
|
4370
4531
|
comments?: string[]
|
|
4371
4532
|
}]
|
|
4533
|
+
// ----- yml/block-mapping -----
|
|
4534
|
+
type YmlBlockMapping = []|[(("always" | "never") | {
|
|
4535
|
+
singleline?: ("always" | "never" | "ignore")
|
|
4536
|
+
multiline?: ("always" | "never" | "ignore")
|
|
4537
|
+
})]
|
|
4538
|
+
// ----- yml/block-mapping-colon-indicator-newline -----
|
|
4539
|
+
type YmlBlockMappingColonIndicatorNewline = []|[("always" | "never")]
|
|
4540
|
+
// ----- yml/block-mapping-question-indicator-newline -----
|
|
4541
|
+
type YmlBlockMappingQuestionIndicatorNewline = []|[("always" | "never")]
|
|
4542
|
+
// ----- yml/block-sequence -----
|
|
4543
|
+
type YmlBlockSequence = []|[(("always" | "never") | {
|
|
4544
|
+
singleline?: ("always" | "never" | "ignore")
|
|
4545
|
+
multiline?: ("always" | "never" | "ignore")
|
|
4546
|
+
})]
|
|
4547
|
+
// ----- yml/block-sequence-hyphen-indicator-newline -----
|
|
4548
|
+
type YmlBlockSequenceHyphenIndicatorNewline = []|[("always" | "never")]|[("always" | "never"), {
|
|
4549
|
+
nestedHyphen?: ("always" | "never")
|
|
4550
|
+
blockMapping?: ("always" | "never")
|
|
4551
|
+
}]
|
|
4552
|
+
// ----- yml/file-extension -----
|
|
4553
|
+
type YmlFileExtension = []|[{
|
|
4554
|
+
extension?: ("yaml" | "yml")
|
|
4555
|
+
caseSensitive?: boolean
|
|
4556
|
+
}]
|
|
4557
|
+
// ----- yml/flow-mapping-curly-newline -----
|
|
4558
|
+
type YmlFlowMappingCurlyNewline = []|[(("always" | "never") | {
|
|
4559
|
+
multiline?: boolean
|
|
4560
|
+
minProperties?: number
|
|
4561
|
+
consistent?: boolean
|
|
4562
|
+
})]
|
|
4563
|
+
// ----- yml/flow-mapping-curly-spacing -----
|
|
4564
|
+
type YmlFlowMappingCurlySpacing = []|[("always" | "never")]|[("always" | "never"), {
|
|
4565
|
+
arraysInObjects?: boolean
|
|
4566
|
+
objectsInObjects?: boolean
|
|
4567
|
+
}]
|
|
4568
|
+
// ----- yml/flow-sequence-bracket-newline -----
|
|
4569
|
+
type YmlFlowSequenceBracketNewline = []|[(("always" | "never" | "consistent") | {
|
|
4570
|
+
multiline?: boolean
|
|
4571
|
+
minItems?: (number | null)
|
|
4572
|
+
})]
|
|
4573
|
+
// ----- yml/flow-sequence-bracket-spacing -----
|
|
4574
|
+
type YmlFlowSequenceBracketSpacing = []|[("always" | "never")]|[("always" | "never"), {
|
|
4575
|
+
singleValue?: boolean
|
|
4576
|
+
objectsInArrays?: boolean
|
|
4577
|
+
arraysInArrays?: boolean
|
|
4578
|
+
}]
|
|
4579
|
+
// ----- yml/indent -----
|
|
4580
|
+
type YmlIndent = []|[number]|[number, {
|
|
4581
|
+
indentBlockSequences?: boolean
|
|
4582
|
+
indicatorValueIndent?: number
|
|
4583
|
+
}]
|
|
4584
|
+
// ----- yml/key-name-casing -----
|
|
4585
|
+
type YmlKeyNameCasing = []|[{
|
|
4586
|
+
camelCase?: boolean
|
|
4587
|
+
PascalCase?: boolean
|
|
4588
|
+
SCREAMING_SNAKE_CASE?: boolean
|
|
4589
|
+
"kebab-case"?: boolean
|
|
4590
|
+
snake_case?: boolean
|
|
4591
|
+
ignores?: string[]
|
|
4592
|
+
}]
|
|
4593
|
+
// ----- yml/key-spacing -----
|
|
4594
|
+
type YmlKeySpacing = []|[({
|
|
4595
|
+
align?: (("colon" | "value") | {
|
|
4596
|
+
on?: ("colon" | "value")
|
|
4597
|
+
mode?: ("strict" | "minimum")
|
|
4598
|
+
beforeColon?: boolean
|
|
4599
|
+
afterColon?: boolean
|
|
4600
|
+
})
|
|
4601
|
+
mode?: ("strict" | "minimum")
|
|
4602
|
+
beforeColon?: boolean
|
|
4603
|
+
afterColon?: boolean
|
|
4604
|
+
} | {
|
|
4605
|
+
singleLine?: {
|
|
4606
|
+
mode?: ("strict" | "minimum")
|
|
4607
|
+
beforeColon?: boolean
|
|
4608
|
+
afterColon?: boolean
|
|
4609
|
+
}
|
|
4610
|
+
multiLine?: {
|
|
4611
|
+
align?: (("colon" | "value") | {
|
|
4612
|
+
on?: ("colon" | "value")
|
|
4613
|
+
mode?: ("strict" | "minimum")
|
|
4614
|
+
beforeColon?: boolean
|
|
4615
|
+
afterColon?: boolean
|
|
4616
|
+
})
|
|
4617
|
+
mode?: ("strict" | "minimum")
|
|
4618
|
+
beforeColon?: boolean
|
|
4619
|
+
afterColon?: boolean
|
|
4620
|
+
}
|
|
4621
|
+
} | {
|
|
4622
|
+
singleLine?: {
|
|
4623
|
+
mode?: ("strict" | "minimum")
|
|
4624
|
+
beforeColon?: boolean
|
|
4625
|
+
afterColon?: boolean
|
|
4626
|
+
}
|
|
4627
|
+
multiLine?: {
|
|
4628
|
+
mode?: ("strict" | "minimum")
|
|
4629
|
+
beforeColon?: boolean
|
|
4630
|
+
afterColon?: boolean
|
|
4631
|
+
}
|
|
4632
|
+
align?: {
|
|
4633
|
+
on?: ("colon" | "value")
|
|
4634
|
+
mode?: ("strict" | "minimum")
|
|
4635
|
+
beforeColon?: boolean
|
|
4636
|
+
afterColon?: boolean
|
|
4637
|
+
}
|
|
4638
|
+
})]
|
|
4639
|
+
// ----- yml/no-irregular-whitespace -----
|
|
4640
|
+
type YmlNoIrregularWhitespace = []|[{
|
|
4641
|
+
skipComments?: boolean
|
|
4642
|
+
skipQuotedScalars?: boolean
|
|
4643
|
+
}]
|
|
4644
|
+
// ----- yml/no-multiple-empty-lines -----
|
|
4645
|
+
type YmlNoMultipleEmptyLines = []|[{
|
|
4646
|
+
max: number
|
|
4647
|
+
maxEOF?: number
|
|
4648
|
+
maxBOF?: number
|
|
4649
|
+
}]
|
|
4650
|
+
// ----- yml/plain-scalar -----
|
|
4651
|
+
type YmlPlainScalar = []|[("always" | "never")]|[("always" | "never"), {
|
|
4652
|
+
ignorePatterns?: string[]
|
|
4653
|
+
}]
|
|
4654
|
+
// ----- yml/quotes -----
|
|
4655
|
+
type YmlQuotes = []|[{
|
|
4656
|
+
prefer?: ("double" | "single")
|
|
4657
|
+
avoidEscape?: boolean
|
|
4658
|
+
}]
|
|
4659
|
+
// ----- yml/sort-keys -----
|
|
4660
|
+
type YmlSortKeys = ([{
|
|
4661
|
+
pathPattern: string
|
|
4662
|
+
hasProperties?: string[]
|
|
4663
|
+
order: ((string | {
|
|
4664
|
+
keyPattern?: string
|
|
4665
|
+
order?: {
|
|
4666
|
+
type?: ("asc" | "desc")
|
|
4667
|
+
caseSensitive?: boolean
|
|
4668
|
+
natural?: boolean
|
|
4669
|
+
}
|
|
4670
|
+
})[] | {
|
|
4671
|
+
type?: ("asc" | "desc")
|
|
4672
|
+
caseSensitive?: boolean
|
|
4673
|
+
natural?: boolean
|
|
4674
|
+
})
|
|
4675
|
+
minKeys?: number
|
|
4676
|
+
allowLineSeparatedGroups?: boolean
|
|
4677
|
+
}, ...({
|
|
4678
|
+
pathPattern: string
|
|
4679
|
+
hasProperties?: string[]
|
|
4680
|
+
order: ((string | {
|
|
4681
|
+
keyPattern?: string
|
|
4682
|
+
order?: {
|
|
4683
|
+
type?: ("asc" | "desc")
|
|
4684
|
+
caseSensitive?: boolean
|
|
4685
|
+
natural?: boolean
|
|
4686
|
+
}
|
|
4687
|
+
})[] | {
|
|
4688
|
+
type?: ("asc" | "desc")
|
|
4689
|
+
caseSensitive?: boolean
|
|
4690
|
+
natural?: boolean
|
|
4691
|
+
})
|
|
4692
|
+
minKeys?: number
|
|
4693
|
+
allowLineSeparatedGroups?: boolean
|
|
4694
|
+
})[]] | []|[("asc" | "desc")]|[("asc" | "desc"), {
|
|
4695
|
+
caseSensitive?: boolean
|
|
4696
|
+
natural?: boolean
|
|
4697
|
+
minKeys?: number
|
|
4698
|
+
allowLineSeparatedGroups?: boolean
|
|
4699
|
+
}])
|
|
4700
|
+
// ----- yml/sort-sequence-values -----
|
|
4701
|
+
type YmlSortSequenceValues = [{
|
|
4702
|
+
pathPattern: string
|
|
4703
|
+
order: ((string | {
|
|
4704
|
+
valuePattern?: string
|
|
4705
|
+
order?: {
|
|
4706
|
+
type?: ("asc" | "desc")
|
|
4707
|
+
caseSensitive?: boolean
|
|
4708
|
+
natural?: boolean
|
|
4709
|
+
}
|
|
4710
|
+
})[] | {
|
|
4711
|
+
type?: ("asc" | "desc")
|
|
4712
|
+
caseSensitive?: boolean
|
|
4713
|
+
natural?: boolean
|
|
4714
|
+
})
|
|
4715
|
+
minValues?: number
|
|
4716
|
+
}, ...({
|
|
4717
|
+
pathPattern: string
|
|
4718
|
+
order: ((string | {
|
|
4719
|
+
valuePattern?: string
|
|
4720
|
+
order?: {
|
|
4721
|
+
type?: ("asc" | "desc")
|
|
4722
|
+
caseSensitive?: boolean
|
|
4723
|
+
natural?: boolean
|
|
4724
|
+
}
|
|
4725
|
+
})[] | {
|
|
4726
|
+
type?: ("asc" | "desc")
|
|
4727
|
+
caseSensitive?: boolean
|
|
4728
|
+
natural?: boolean
|
|
4729
|
+
})
|
|
4730
|
+
minValues?: number
|
|
4731
|
+
})[]]
|
|
4732
|
+
// ----- yml/spaced-comment -----
|
|
4733
|
+
type YmlSpacedComment = []|[("always" | "never")]|[("always" | "never"), {
|
|
4734
|
+
exceptions?: string[]
|
|
4735
|
+
markers?: string[]
|
|
4736
|
+
}]
|
|
4372
4737
|
|
|
4373
4738
|
export type { RuleOptions };
|
package/dist/preset.d.ts
CHANGED
|
@@ -780,6 +780,27 @@ interface RuleOptions {
|
|
|
780
780
|
* @see https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable
|
|
781
781
|
*/
|
|
782
782
|
'@typescript-eslint/use-unknown-in-catch-callback-variable'?: Linter.RuleEntry<[]>
|
|
783
|
+
'json/*'?: Linter.RuleEntry<Json/*>
|
|
784
|
+
'json/colon-expected'?: Linter.RuleEntry<JsonColonExpected>
|
|
785
|
+
'json/comma-expected'?: Linter.RuleEntry<JsonCommaExpected>
|
|
786
|
+
'json/comma-or-close-backet-expected'?: Linter.RuleEntry<JsonCommaOrCloseBacketExpected>
|
|
787
|
+
'json/comma-or-close-brace-expected'?: Linter.RuleEntry<JsonCommaOrCloseBraceExpected>
|
|
788
|
+
'json/comment-not-permitted'?: Linter.RuleEntry<JsonCommentNotPermitted>
|
|
789
|
+
'json/duplicate-key'?: Linter.RuleEntry<JsonDuplicateKey>
|
|
790
|
+
'json/enum-value-mismatch'?: Linter.RuleEntry<JsonEnumValueMismatch>
|
|
791
|
+
'json/invalid-character'?: Linter.RuleEntry<JsonInvalidCharacter>
|
|
792
|
+
'json/invalid-escape-character'?: Linter.RuleEntry<JsonInvalidEscapeCharacter>
|
|
793
|
+
'json/invalid-unicode'?: Linter.RuleEntry<JsonInvalidUnicode>
|
|
794
|
+
'json/json'?: Linter.RuleEntry<JsonJson>
|
|
795
|
+
'json/property-expected'?: Linter.RuleEntry<JsonPropertyExpected>
|
|
796
|
+
'json/schema-resolve-error'?: Linter.RuleEntry<JsonSchemaResolveError>
|
|
797
|
+
'json/trailing-comma'?: Linter.RuleEntry<JsonTrailingComma>
|
|
798
|
+
'json/undefined'?: Linter.RuleEntry<JsonUndefined>
|
|
799
|
+
'json/unexpected-end-of-comment'?: Linter.RuleEntry<JsonUnexpectedEndOfComment>
|
|
800
|
+
'json/unexpected-end-of-number'?: Linter.RuleEntry<JsonUnexpectedEndOfNumber>
|
|
801
|
+
'json/unexpected-end-of-string'?: Linter.RuleEntry<JsonUnexpectedEndOfString>
|
|
802
|
+
'json/unknown'?: Linter.RuleEntry<JsonUnknown>
|
|
803
|
+
'json/value-expected'?: Linter.RuleEntry<JsonValueExpected>
|
|
783
804
|
/**
|
|
784
805
|
* Enforce emojis are wrapped in `<span>` and provide screenreader access.
|
|
785
806
|
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/accessible-emoji.md
|
|
@@ -2184,6 +2205,146 @@ interface RuleOptions {
|
|
|
2184
2205
|
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/throw-new-error.md
|
|
2185
2206
|
*/
|
|
2186
2207
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
|
|
2208
|
+
/**
|
|
2209
|
+
* require or disallow block style mappings.
|
|
2210
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping.html
|
|
2211
|
+
*/
|
|
2212
|
+
'yml/block-mapping'?: Linter.RuleEntry<YmlBlockMapping>
|
|
2213
|
+
/**
|
|
2214
|
+
* enforce consistent line breaks after `:` indicator
|
|
2215
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-colon-indicator-newline.html
|
|
2216
|
+
*/
|
|
2217
|
+
'yml/block-mapping-colon-indicator-newline'?: Linter.RuleEntry<YmlBlockMappingColonIndicatorNewline>
|
|
2218
|
+
/**
|
|
2219
|
+
* enforce consistent line breaks after `?` indicator
|
|
2220
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-question-indicator-newline.html
|
|
2221
|
+
*/
|
|
2222
|
+
'yml/block-mapping-question-indicator-newline'?: Linter.RuleEntry<YmlBlockMappingQuestionIndicatorNewline>
|
|
2223
|
+
/**
|
|
2224
|
+
* require or disallow block style sequences.
|
|
2225
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence.html
|
|
2226
|
+
*/
|
|
2227
|
+
'yml/block-sequence'?: Linter.RuleEntry<YmlBlockSequence>
|
|
2228
|
+
/**
|
|
2229
|
+
* enforce consistent line breaks after `-` indicator
|
|
2230
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence-hyphen-indicator-newline.html
|
|
2231
|
+
*/
|
|
2232
|
+
'yml/block-sequence-hyphen-indicator-newline'?: Linter.RuleEntry<YmlBlockSequenceHyphenIndicatorNewline>
|
|
2233
|
+
/**
|
|
2234
|
+
* enforce YAML file extension
|
|
2235
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/file-extension.html
|
|
2236
|
+
*/
|
|
2237
|
+
'yml/file-extension'?: Linter.RuleEntry<YmlFileExtension>
|
|
2238
|
+
/**
|
|
2239
|
+
* enforce consistent line breaks inside braces
|
|
2240
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-newline.html
|
|
2241
|
+
*/
|
|
2242
|
+
'yml/flow-mapping-curly-newline'?: Linter.RuleEntry<YmlFlowMappingCurlyNewline>
|
|
2243
|
+
/**
|
|
2244
|
+
* enforce consistent spacing inside braces
|
|
2245
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-spacing.html
|
|
2246
|
+
*/
|
|
2247
|
+
'yml/flow-mapping-curly-spacing'?: Linter.RuleEntry<YmlFlowMappingCurlySpacing>
|
|
2248
|
+
/**
|
|
2249
|
+
* enforce linebreaks after opening and before closing flow sequence brackets
|
|
2250
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-sequence-bracket-newline.html
|
|
2251
|
+
*/
|
|
2252
|
+
'yml/flow-sequence-bracket-newline'?: Linter.RuleEntry<YmlFlowSequenceBracketNewline>
|
|
2253
|
+
/**
|
|
2254
|
+
* enforce consistent spacing inside flow sequence brackets
|
|
2255
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-sequence-bracket-spacing.html
|
|
2256
|
+
*/
|
|
2257
|
+
'yml/flow-sequence-bracket-spacing'?: Linter.RuleEntry<YmlFlowSequenceBracketSpacing>
|
|
2258
|
+
/**
|
|
2259
|
+
* enforce consistent indentation
|
|
2260
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/indent.html
|
|
2261
|
+
*/
|
|
2262
|
+
'yml/indent'?: Linter.RuleEntry<YmlIndent>
|
|
2263
|
+
/**
|
|
2264
|
+
* enforce naming convention to key names
|
|
2265
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/key-name-casing.html
|
|
2266
|
+
*/
|
|
2267
|
+
'yml/key-name-casing'?: Linter.RuleEntry<YmlKeyNameCasing>
|
|
2268
|
+
/**
|
|
2269
|
+
* enforce consistent spacing between keys and values in mapping pairs
|
|
2270
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/key-spacing.html
|
|
2271
|
+
*/
|
|
2272
|
+
'yml/key-spacing'?: Linter.RuleEntry<YmlKeySpacing>
|
|
2273
|
+
/**
|
|
2274
|
+
* disallow empty document
|
|
2275
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-document.html
|
|
2276
|
+
*/
|
|
2277
|
+
'yml/no-empty-document'?: Linter.RuleEntry<[]>
|
|
2278
|
+
/**
|
|
2279
|
+
* disallow empty mapping keys
|
|
2280
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-key.html
|
|
2281
|
+
*/
|
|
2282
|
+
'yml/no-empty-key'?: Linter.RuleEntry<[]>
|
|
2283
|
+
/**
|
|
2284
|
+
* disallow empty mapping values
|
|
2285
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-mapping-value.html
|
|
2286
|
+
*/
|
|
2287
|
+
'yml/no-empty-mapping-value'?: Linter.RuleEntry<[]>
|
|
2288
|
+
/**
|
|
2289
|
+
* disallow empty sequence entries
|
|
2290
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-sequence-entry.html
|
|
2291
|
+
*/
|
|
2292
|
+
'yml/no-empty-sequence-entry'?: Linter.RuleEntry<[]>
|
|
2293
|
+
/**
|
|
2294
|
+
* disallow irregular whitespace
|
|
2295
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-irregular-whitespace.html
|
|
2296
|
+
*/
|
|
2297
|
+
'yml/no-irregular-whitespace'?: Linter.RuleEntry<YmlNoIrregularWhitespace>
|
|
2298
|
+
/**
|
|
2299
|
+
* disallow multiple empty lines
|
|
2300
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-multiple-empty-lines.html
|
|
2301
|
+
*/
|
|
2302
|
+
'yml/no-multiple-empty-lines'?: Linter.RuleEntry<YmlNoMultipleEmptyLines>
|
|
2303
|
+
/**
|
|
2304
|
+
* disallow tabs for indentation.
|
|
2305
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-tab-indent.html
|
|
2306
|
+
*/
|
|
2307
|
+
'yml/no-tab-indent'?: Linter.RuleEntry<[]>
|
|
2308
|
+
/**
|
|
2309
|
+
* disallow trailing zeros for floats
|
|
2310
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-trailing-zeros.html
|
|
2311
|
+
*/
|
|
2312
|
+
'yml/no-trailing-zeros'?: Linter.RuleEntry<[]>
|
|
2313
|
+
/**
|
|
2314
|
+
* require or disallow plain style scalar.
|
|
2315
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/plain-scalar.html
|
|
2316
|
+
*/
|
|
2317
|
+
'yml/plain-scalar'?: Linter.RuleEntry<YmlPlainScalar>
|
|
2318
|
+
/**
|
|
2319
|
+
* enforce the consistent use of either double, or single quotes
|
|
2320
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/quotes.html
|
|
2321
|
+
*/
|
|
2322
|
+
'yml/quotes'?: Linter.RuleEntry<YmlQuotes>
|
|
2323
|
+
/**
|
|
2324
|
+
* disallow mapping keys other than strings
|
|
2325
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/require-string-key.html
|
|
2326
|
+
*/
|
|
2327
|
+
'yml/require-string-key'?: Linter.RuleEntry<[]>
|
|
2328
|
+
/**
|
|
2329
|
+
* require mapping keys to be sorted
|
|
2330
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/sort-keys.html
|
|
2331
|
+
*/
|
|
2332
|
+
'yml/sort-keys'?: Linter.RuleEntry<YmlSortKeys>
|
|
2333
|
+
/**
|
|
2334
|
+
* require sequence values to be sorted
|
|
2335
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/sort-sequence-values.html
|
|
2336
|
+
*/
|
|
2337
|
+
'yml/sort-sequence-values'?: Linter.RuleEntry<YmlSortSequenceValues>
|
|
2338
|
+
/**
|
|
2339
|
+
* enforce consistent spacing after the `#` in a comment
|
|
2340
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/spaced-comment.html
|
|
2341
|
+
*/
|
|
2342
|
+
'yml/spaced-comment'?: Linter.RuleEntry<YmlSpacedComment>
|
|
2343
|
+
/**
|
|
2344
|
+
* disallow parsing errors in Vue custom blocks
|
|
2345
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/vue-custom-block/no-parsing-error.html
|
|
2346
|
+
*/
|
|
2347
|
+
'yml/vue-custom-block/no-parsing-error'?: Linter.RuleEntry<[]>
|
|
2187
2348
|
}
|
|
2188
2349
|
|
|
2189
2350
|
/* ======= Declarations ======= */
|
|
@@ -4369,5 +4530,209 @@ type UnicornTemplateIndent = []|[{
|
|
|
4369
4530
|
selectors?: string[]
|
|
4370
4531
|
comments?: string[]
|
|
4371
4532
|
}]
|
|
4533
|
+
// ----- yml/block-mapping -----
|
|
4534
|
+
type YmlBlockMapping = []|[(("always" | "never") | {
|
|
4535
|
+
singleline?: ("always" | "never" | "ignore")
|
|
4536
|
+
multiline?: ("always" | "never" | "ignore")
|
|
4537
|
+
})]
|
|
4538
|
+
// ----- yml/block-mapping-colon-indicator-newline -----
|
|
4539
|
+
type YmlBlockMappingColonIndicatorNewline = []|[("always" | "never")]
|
|
4540
|
+
// ----- yml/block-mapping-question-indicator-newline -----
|
|
4541
|
+
type YmlBlockMappingQuestionIndicatorNewline = []|[("always" | "never")]
|
|
4542
|
+
// ----- yml/block-sequence -----
|
|
4543
|
+
type YmlBlockSequence = []|[(("always" | "never") | {
|
|
4544
|
+
singleline?: ("always" | "never" | "ignore")
|
|
4545
|
+
multiline?: ("always" | "never" | "ignore")
|
|
4546
|
+
})]
|
|
4547
|
+
// ----- yml/block-sequence-hyphen-indicator-newline -----
|
|
4548
|
+
type YmlBlockSequenceHyphenIndicatorNewline = []|[("always" | "never")]|[("always" | "never"), {
|
|
4549
|
+
nestedHyphen?: ("always" | "never")
|
|
4550
|
+
blockMapping?: ("always" | "never")
|
|
4551
|
+
}]
|
|
4552
|
+
// ----- yml/file-extension -----
|
|
4553
|
+
type YmlFileExtension = []|[{
|
|
4554
|
+
extension?: ("yaml" | "yml")
|
|
4555
|
+
caseSensitive?: boolean
|
|
4556
|
+
}]
|
|
4557
|
+
// ----- yml/flow-mapping-curly-newline -----
|
|
4558
|
+
type YmlFlowMappingCurlyNewline = []|[(("always" | "never") | {
|
|
4559
|
+
multiline?: boolean
|
|
4560
|
+
minProperties?: number
|
|
4561
|
+
consistent?: boolean
|
|
4562
|
+
})]
|
|
4563
|
+
// ----- yml/flow-mapping-curly-spacing -----
|
|
4564
|
+
type YmlFlowMappingCurlySpacing = []|[("always" | "never")]|[("always" | "never"), {
|
|
4565
|
+
arraysInObjects?: boolean
|
|
4566
|
+
objectsInObjects?: boolean
|
|
4567
|
+
}]
|
|
4568
|
+
// ----- yml/flow-sequence-bracket-newline -----
|
|
4569
|
+
type YmlFlowSequenceBracketNewline = []|[(("always" | "never" | "consistent") | {
|
|
4570
|
+
multiline?: boolean
|
|
4571
|
+
minItems?: (number | null)
|
|
4572
|
+
})]
|
|
4573
|
+
// ----- yml/flow-sequence-bracket-spacing -----
|
|
4574
|
+
type YmlFlowSequenceBracketSpacing = []|[("always" | "never")]|[("always" | "never"), {
|
|
4575
|
+
singleValue?: boolean
|
|
4576
|
+
objectsInArrays?: boolean
|
|
4577
|
+
arraysInArrays?: boolean
|
|
4578
|
+
}]
|
|
4579
|
+
// ----- yml/indent -----
|
|
4580
|
+
type YmlIndent = []|[number]|[number, {
|
|
4581
|
+
indentBlockSequences?: boolean
|
|
4582
|
+
indicatorValueIndent?: number
|
|
4583
|
+
}]
|
|
4584
|
+
// ----- yml/key-name-casing -----
|
|
4585
|
+
type YmlKeyNameCasing = []|[{
|
|
4586
|
+
camelCase?: boolean
|
|
4587
|
+
PascalCase?: boolean
|
|
4588
|
+
SCREAMING_SNAKE_CASE?: boolean
|
|
4589
|
+
"kebab-case"?: boolean
|
|
4590
|
+
snake_case?: boolean
|
|
4591
|
+
ignores?: string[]
|
|
4592
|
+
}]
|
|
4593
|
+
// ----- yml/key-spacing -----
|
|
4594
|
+
type YmlKeySpacing = []|[({
|
|
4595
|
+
align?: (("colon" | "value") | {
|
|
4596
|
+
on?: ("colon" | "value")
|
|
4597
|
+
mode?: ("strict" | "minimum")
|
|
4598
|
+
beforeColon?: boolean
|
|
4599
|
+
afterColon?: boolean
|
|
4600
|
+
})
|
|
4601
|
+
mode?: ("strict" | "minimum")
|
|
4602
|
+
beforeColon?: boolean
|
|
4603
|
+
afterColon?: boolean
|
|
4604
|
+
} | {
|
|
4605
|
+
singleLine?: {
|
|
4606
|
+
mode?: ("strict" | "minimum")
|
|
4607
|
+
beforeColon?: boolean
|
|
4608
|
+
afterColon?: boolean
|
|
4609
|
+
}
|
|
4610
|
+
multiLine?: {
|
|
4611
|
+
align?: (("colon" | "value") | {
|
|
4612
|
+
on?: ("colon" | "value")
|
|
4613
|
+
mode?: ("strict" | "minimum")
|
|
4614
|
+
beforeColon?: boolean
|
|
4615
|
+
afterColon?: boolean
|
|
4616
|
+
})
|
|
4617
|
+
mode?: ("strict" | "minimum")
|
|
4618
|
+
beforeColon?: boolean
|
|
4619
|
+
afterColon?: boolean
|
|
4620
|
+
}
|
|
4621
|
+
} | {
|
|
4622
|
+
singleLine?: {
|
|
4623
|
+
mode?: ("strict" | "minimum")
|
|
4624
|
+
beforeColon?: boolean
|
|
4625
|
+
afterColon?: boolean
|
|
4626
|
+
}
|
|
4627
|
+
multiLine?: {
|
|
4628
|
+
mode?: ("strict" | "minimum")
|
|
4629
|
+
beforeColon?: boolean
|
|
4630
|
+
afterColon?: boolean
|
|
4631
|
+
}
|
|
4632
|
+
align?: {
|
|
4633
|
+
on?: ("colon" | "value")
|
|
4634
|
+
mode?: ("strict" | "minimum")
|
|
4635
|
+
beforeColon?: boolean
|
|
4636
|
+
afterColon?: boolean
|
|
4637
|
+
}
|
|
4638
|
+
})]
|
|
4639
|
+
// ----- yml/no-irregular-whitespace -----
|
|
4640
|
+
type YmlNoIrregularWhitespace = []|[{
|
|
4641
|
+
skipComments?: boolean
|
|
4642
|
+
skipQuotedScalars?: boolean
|
|
4643
|
+
}]
|
|
4644
|
+
// ----- yml/no-multiple-empty-lines -----
|
|
4645
|
+
type YmlNoMultipleEmptyLines = []|[{
|
|
4646
|
+
max: number
|
|
4647
|
+
maxEOF?: number
|
|
4648
|
+
maxBOF?: number
|
|
4649
|
+
}]
|
|
4650
|
+
// ----- yml/plain-scalar -----
|
|
4651
|
+
type YmlPlainScalar = []|[("always" | "never")]|[("always" | "never"), {
|
|
4652
|
+
ignorePatterns?: string[]
|
|
4653
|
+
}]
|
|
4654
|
+
// ----- yml/quotes -----
|
|
4655
|
+
type YmlQuotes = []|[{
|
|
4656
|
+
prefer?: ("double" | "single")
|
|
4657
|
+
avoidEscape?: boolean
|
|
4658
|
+
}]
|
|
4659
|
+
// ----- yml/sort-keys -----
|
|
4660
|
+
type YmlSortKeys = ([{
|
|
4661
|
+
pathPattern: string
|
|
4662
|
+
hasProperties?: string[]
|
|
4663
|
+
order: ((string | {
|
|
4664
|
+
keyPattern?: string
|
|
4665
|
+
order?: {
|
|
4666
|
+
type?: ("asc" | "desc")
|
|
4667
|
+
caseSensitive?: boolean
|
|
4668
|
+
natural?: boolean
|
|
4669
|
+
}
|
|
4670
|
+
})[] | {
|
|
4671
|
+
type?: ("asc" | "desc")
|
|
4672
|
+
caseSensitive?: boolean
|
|
4673
|
+
natural?: boolean
|
|
4674
|
+
})
|
|
4675
|
+
minKeys?: number
|
|
4676
|
+
allowLineSeparatedGroups?: boolean
|
|
4677
|
+
}, ...({
|
|
4678
|
+
pathPattern: string
|
|
4679
|
+
hasProperties?: string[]
|
|
4680
|
+
order: ((string | {
|
|
4681
|
+
keyPattern?: string
|
|
4682
|
+
order?: {
|
|
4683
|
+
type?: ("asc" | "desc")
|
|
4684
|
+
caseSensitive?: boolean
|
|
4685
|
+
natural?: boolean
|
|
4686
|
+
}
|
|
4687
|
+
})[] | {
|
|
4688
|
+
type?: ("asc" | "desc")
|
|
4689
|
+
caseSensitive?: boolean
|
|
4690
|
+
natural?: boolean
|
|
4691
|
+
})
|
|
4692
|
+
minKeys?: number
|
|
4693
|
+
allowLineSeparatedGroups?: boolean
|
|
4694
|
+
})[]] | []|[("asc" | "desc")]|[("asc" | "desc"), {
|
|
4695
|
+
caseSensitive?: boolean
|
|
4696
|
+
natural?: boolean
|
|
4697
|
+
minKeys?: number
|
|
4698
|
+
allowLineSeparatedGroups?: boolean
|
|
4699
|
+
}])
|
|
4700
|
+
// ----- yml/sort-sequence-values -----
|
|
4701
|
+
type YmlSortSequenceValues = [{
|
|
4702
|
+
pathPattern: string
|
|
4703
|
+
order: ((string | {
|
|
4704
|
+
valuePattern?: string
|
|
4705
|
+
order?: {
|
|
4706
|
+
type?: ("asc" | "desc")
|
|
4707
|
+
caseSensitive?: boolean
|
|
4708
|
+
natural?: boolean
|
|
4709
|
+
}
|
|
4710
|
+
})[] | {
|
|
4711
|
+
type?: ("asc" | "desc")
|
|
4712
|
+
caseSensitive?: boolean
|
|
4713
|
+
natural?: boolean
|
|
4714
|
+
})
|
|
4715
|
+
minValues?: number
|
|
4716
|
+
}, ...({
|
|
4717
|
+
pathPattern: string
|
|
4718
|
+
order: ((string | {
|
|
4719
|
+
valuePattern?: string
|
|
4720
|
+
order?: {
|
|
4721
|
+
type?: ("asc" | "desc")
|
|
4722
|
+
caseSensitive?: boolean
|
|
4723
|
+
natural?: boolean
|
|
4724
|
+
}
|
|
4725
|
+
})[] | {
|
|
4726
|
+
type?: ("asc" | "desc")
|
|
4727
|
+
caseSensitive?: boolean
|
|
4728
|
+
natural?: boolean
|
|
4729
|
+
})
|
|
4730
|
+
minValues?: number
|
|
4731
|
+
})[]]
|
|
4732
|
+
// ----- yml/spaced-comment -----
|
|
4733
|
+
type YmlSpacedComment = []|[("always" | "never")]|[("always" | "never"), {
|
|
4734
|
+
exceptions?: string[]
|
|
4735
|
+
markers?: string[]
|
|
4736
|
+
}]
|
|
4372
4737
|
|
|
4373
4738
|
export type { RuleOptions };
|
package/dist/preset.mjs
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import tsEslint from 'typescript-eslint';
|
|
2
2
|
import eslintPluginUnicorn from 'eslint-plugin-unicorn';
|
|
3
3
|
import nxPlugin from '@nx/eslint-plugin';
|
|
4
|
+
import json from 'eslint-plugin-json';
|
|
4
5
|
import jsxA11y from 'eslint-plugin-jsx-a11y';
|
|
5
6
|
import markdown from 'eslint-plugin-markdown';
|
|
6
7
|
import prettierConfig from 'eslint-plugin-prettier/recommended';
|
|
7
8
|
import react from 'eslint-plugin-react';
|
|
8
9
|
import reactHooks from 'eslint-plugin-react-hooks';
|
|
9
10
|
import tsdoc from 'eslint-plugin-tsdoc';
|
|
11
|
+
import yml from 'eslint-plugin-yml';
|
|
10
12
|
import globals from 'globals';
|
|
11
13
|
import jsoncParser from 'jsonc-eslint-parser';
|
|
12
14
|
|
|
@@ -765,7 +767,7 @@ const config$2 = {
|
|
|
765
767
|
"react/forbid-dom-props": ["off", { forbid: [] }],
|
|
766
768
|
// Validate closing bracket location in JSX
|
|
767
769
|
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-closing-bracket-location.md
|
|
768
|
-
"react/jsx-closing-bracket-location": ["error", "
|
|
770
|
+
"react/jsx-closing-bracket-location": ["error", "after-props"],
|
|
769
771
|
// Validate closing tag location in JSX
|
|
770
772
|
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-closing-tag-location.md
|
|
771
773
|
"react/jsx-closing-tag-location": "error",
|
|
@@ -775,9 +777,9 @@ const config$2 = {
|
|
|
775
777
|
// Enforce event handler naming conventions in JSX
|
|
776
778
|
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md
|
|
777
779
|
"react/jsx-handler-names": [
|
|
778
|
-
"
|
|
780
|
+
"error",
|
|
779
781
|
{
|
|
780
|
-
eventHandlerPrefix: "
|
|
782
|
+
eventHandlerPrefix: "on",
|
|
781
783
|
eventHandlerPropPrefix: "on"
|
|
782
784
|
}
|
|
783
785
|
],
|
|
@@ -1228,11 +1230,15 @@ function stormPreset(options = {
|
|
|
1228
1230
|
"unicorn/no-await-expression-member": 0,
|
|
1229
1231
|
"unicorn/no-useless-undefined": 0,
|
|
1230
1232
|
"unicorn/no-array-push-push": 0,
|
|
1233
|
+
"unicorn/no-array-reduce": 0,
|
|
1234
|
+
"unicorn/no-useless-switch-case": 0,
|
|
1231
1235
|
"@typescript-eslint/no-explicit-any": 0,
|
|
1232
1236
|
"@typescript-eslint/no-empty-function": 0,
|
|
1233
1237
|
"@typescript-eslint/no-var-requires": 0,
|
|
1234
1238
|
"@typescript-eslint/ban-ts-comment": 0,
|
|
1235
1239
|
"@typescript-eslint/no-empty-interface": 0,
|
|
1240
|
+
"@typescript-eslint/explicit-module-boundary-types": 0,
|
|
1241
|
+
"@typescript-eslint/explicit-function-return-type": 0,
|
|
1236
1242
|
"@typescript-eslint/no-unused-vars": [
|
|
1237
1243
|
"warn",
|
|
1238
1244
|
{ varsIgnorePattern: "^_", argsIgnorePattern: "^_" }
|
|
@@ -1318,27 +1324,14 @@ function stormPreset(options = {
|
|
|
1318
1324
|
rules: config
|
|
1319
1325
|
},
|
|
1320
1326
|
// Nx plugin
|
|
1321
|
-
{ plugins: { "@nx": nxPlugin } },
|
|
1322
1327
|
{
|
|
1328
|
+
plugins: { "@nx": nxPlugin },
|
|
1323
1329
|
languageOptions: {
|
|
1324
1330
|
parser: tsEslint.parser,
|
|
1325
1331
|
globals: {
|
|
1326
1332
|
...globals.node
|
|
1327
1333
|
}
|
|
1328
1334
|
},
|
|
1329
|
-
rules: {
|
|
1330
|
-
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
1331
|
-
"@typescript-eslint/explicit-function-return-type": "off"
|
|
1332
|
-
}
|
|
1333
|
-
},
|
|
1334
|
-
{
|
|
1335
|
-
files: ["*.json", "*.jsonc"],
|
|
1336
|
-
languageOptions: {
|
|
1337
|
-
parser: jsoncParser
|
|
1338
|
-
},
|
|
1339
|
-
rules: {}
|
|
1340
|
-
},
|
|
1341
|
-
{
|
|
1342
1335
|
files: [CODE_FILE],
|
|
1343
1336
|
rules: {
|
|
1344
1337
|
"@nx/enforce-module-boundaries": [
|
|
@@ -1373,6 +1366,25 @@ function stormPreset(options = {
|
|
|
1373
1366
|
]
|
|
1374
1367
|
}
|
|
1375
1368
|
},
|
|
1369
|
+
// Json
|
|
1370
|
+
// https://www.npmjs.com/package/eslint-plugin-json
|
|
1371
|
+
json.configs["recommended"],
|
|
1372
|
+
{
|
|
1373
|
+
files: ["*.json", "*.jsonc"],
|
|
1374
|
+
languageOptions: {
|
|
1375
|
+
parser: jsoncParser
|
|
1376
|
+
}
|
|
1377
|
+
},
|
|
1378
|
+
{
|
|
1379
|
+
files: ["**/executors/**/schema.json", "**/generators/**/schema.json"],
|
|
1380
|
+
rules: {
|
|
1381
|
+
"@nx/workspace/valid-schema-description": "error"
|
|
1382
|
+
}
|
|
1383
|
+
},
|
|
1384
|
+
// YML
|
|
1385
|
+
// https://www.npmjs.com/package/eslint-plugin-yml
|
|
1386
|
+
...yml.configs["flat/recommended"],
|
|
1387
|
+
...yml.configs["flat/prettier"],
|
|
1376
1388
|
// User overrides
|
|
1377
1389
|
...userConfigs
|
|
1378
1390
|
].filter(Boolean);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/eslint",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "⚡ A package containing the base ESLint configuration used by Storm Software across many projects.",
|
|
6
6
|
"repository": {
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
"@next/eslint-plugin-next": "14.2.4",
|
|
71
71
|
"eslint-plugin-es-x": "7.6.0",
|
|
72
72
|
"eslint-plugin-import": "^2.29.1",
|
|
73
|
+
"eslint-plugin-json": "4.0.0",
|
|
73
74
|
"eslint-plugin-jsonc": "2.16.0",
|
|
74
75
|
"eslint-plugin-jsx-a11y": "6.8.0",
|
|
75
76
|
"eslint-plugin-markdown": "^5.1.0",
|