@isentinel/eslint-config 0.5.3 → 0.5.5

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 CHANGED
@@ -1,11 +1,8 @@
1
1
  # @isentinel/eslint-config
2
2
 
3
3
  <!-- - Single quotes, no semi
4
- - Auto fix for formatting (aimed to be used standalone **without** Prettier)
5
- - Designed to work with TypeScript, JSX, Vue out-of-box
6
- - Lints also for json, yaml, markdown
7
- - Sorted imports, dangling commas
8
- - Reasonable defaults, best practices, only one-line of config
4
+ - Auto fix for formatting
5
+ - Designed to work with TypeScript, JSX, JSON, Yaml, Toml, Markdown, etc. out of the box
9
6
  - Opinionated, but [very customizable](#customization)
10
7
  - [ESLint Flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new), compose easily!
11
8
  - Using [ESLint Stylistic](https://github.com/eslint-stylistic/eslint-stylistic)
@@ -152,7 +149,8 @@ Add the following settings to your `.vscode/settings.json`:
152
149
  "markdown",
153
150
  "json",
154
151
  "jsonc",
155
- "yaml"
152
+ "yaml",
153
+ "toml"
156
154
  ]
157
155
  }
158
156
  ```
package/dist/index.cjs CHANGED
@@ -843,6 +843,7 @@ __export(src_exports, {
843
843
  GLOB_TOML: () => GLOB_TOML,
844
844
  GLOB_TS: () => GLOB_TS,
845
845
  GLOB_TSX: () => GLOB_TSX,
846
+ GLOB_YAML: () => GLOB_YAML,
846
847
  StylisticConfigDefaults: () => StylisticConfigDefaults,
847
848
  combine: () => combine,
848
849
  comments: () => comments,
@@ -873,7 +874,8 @@ __export(src_exports, {
873
874
  toArray: () => toArray,
874
875
  toml: () => toml,
875
876
  typescript: () => typescript,
876
- unicorn: () => unicorn
877
+ unicorn: () => unicorn,
878
+ yaml: () => yaml
877
879
  });
878
880
  module.exports = __toCommonJS(src_exports);
879
881
  init_cjs_shims();
@@ -961,6 +963,7 @@ var GLOB_JSON5 = "**/*.json5";
961
963
  var GLOB_JSONC = "**/*.jsonc";
962
964
  var GLOB_MARKDOWN = "**/*.md";
963
965
  var GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
966
+ var GLOB_YAML = "**/*.y?(a)ml";
964
967
  var GLOB_TOML = "**/*.toml";
965
968
  var GLOB_HTML = "**/*.htm?(l)";
966
969
  var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
@@ -992,7 +995,8 @@ var GLOB_EXCLUDE = [
992
995
  "**/LICENSE*",
993
996
  "**/__snapshots__",
994
997
  "**/auto-import?(s).d.ts",
995
- "**/components.d.ts"
998
+ "**/components.d.ts",
999
+ "**/roblox.yml"
996
1000
  ];
997
1001
 
998
1002
  // src/configs/stylistic.ts
@@ -2729,6 +2733,59 @@ async function unicorn() {
2729
2733
  ];
2730
2734
  }
2731
2735
 
2736
+ // src/configs/yaml.ts
2737
+ init_cjs_shims();
2738
+ async function yaml(options = {}) {
2739
+ const {
2740
+ files = [GLOB_YAML, "**/github-actions-workflow"],
2741
+ overrides = {},
2742
+ stylistic: stylistic2 = true
2743
+ } = options;
2744
+ const { indent = 2, quotes = "single" } = typeof stylistic2 === "boolean" ? {} : stylistic2;
2745
+ const [pluginYaml, parserYaml] = await Promise.all([
2746
+ interopDefault(import("eslint-plugin-yml")),
2747
+ interopDefault(import("yaml-eslint-parser"))
2748
+ ]);
2749
+ return [
2750
+ {
2751
+ name: "style:yaml:setup",
2752
+ plugins: {
2753
+ yaml: pluginYaml
2754
+ }
2755
+ },
2756
+ {
2757
+ files,
2758
+ languageOptions: {
2759
+ parser: parserYaml
2760
+ },
2761
+ name: "style:yaml:rules",
2762
+ rules: {
2763
+ "style/spaced-comment": "off",
2764
+ "yaml/block-mapping": "error",
2765
+ "yaml/block-sequence": "error",
2766
+ "yaml/no-empty-key": "error",
2767
+ "yaml/no-empty-sequence-entry": "error",
2768
+ "yaml/no-irregular-whitespace": "error",
2769
+ "yaml/plain-scalar": "error",
2770
+ ...stylistic2 ? {
2771
+ "yaml/block-mapping-question-indicator-newline": "error",
2772
+ "yaml/block-sequence-hyphen-indicator-newline": "error",
2773
+ "yaml/flow-mapping-curly-newline": "error",
2774
+ "yaml/flow-mapping-curly-spacing": "error",
2775
+ "yaml/flow-sequence-bracket-newline": "error",
2776
+ "yaml/flow-sequence-bracket-spacing": "error",
2777
+ "yaml/indent": ["error", indent === "tab" ? 2 : indent],
2778
+ "yaml/key-spacing": "error",
2779
+ "yaml/no-tab-indent": "error",
2780
+ "yaml/quotes": ["error", { avoidEscape: false, prefer: quotes }],
2781
+ "yaml/spaced-comment": "error"
2782
+ } : {},
2783
+ ...overrides
2784
+ }
2785
+ }
2786
+ ];
2787
+ }
2788
+
2732
2789
  // src/factory.ts
2733
2790
  init_cjs_shims();
2734
2791
  var import_eslint_flat_config_utils = require("eslint-flat-config-utils");
@@ -2749,7 +2806,8 @@ var defaultPluginRenaming = {
2749
2806
  "@eslint-react/hooks-extra": "react-hooks-extra",
2750
2807
  "@eslint-react/naming-convention": "react-naming-convention",
2751
2808
  "@stylistic": "style",
2752
- "@typescript-eslint": "ts"
2809
+ "@typescript-eslint": "ts",
2810
+ yml: "yaml"
2753
2811
  };
2754
2812
  function style(options = {}, ...userConfigs) {
2755
2813
  const {
@@ -2833,6 +2891,14 @@ function style(options = {}, ...userConfigs) {
2833
2891
  sortTsconfig()
2834
2892
  );
2835
2893
  }
2894
+ if (options.yaml ?? true) {
2895
+ configs.push(
2896
+ yaml({
2897
+ overrides: getOverrides(options, "yaml"),
2898
+ stylistic: stylisticOptions
2899
+ })
2900
+ );
2901
+ }
2836
2902
  if (options.toml ?? true) {
2837
2903
  configs.push(
2838
2904
  toml({
@@ -2911,6 +2977,7 @@ init_cjs_shims();
2911
2977
  GLOB_TOML,
2912
2978
  GLOB_TS,
2913
2979
  GLOB_TSX,
2980
+ GLOB_YAML,
2914
2981
  StylisticConfigDefaults,
2915
2982
  combine,
2916
2983
  comments,
@@ -2940,5 +3007,6 @@ init_cjs_shims();
2940
3007
  toArray,
2941
3008
  toml,
2942
3009
  typescript,
2943
- unicorn
3010
+ unicorn,
3011
+ yaml
2944
3012
  });
package/dist/index.d.cts CHANGED
@@ -13206,6 +13206,146 @@ interface RuleOptions {
13206
13206
  * @deprecated
13207
13207
  */
13208
13208
  'wrap-regex'?: Linter.RuleEntry<[]>
13209
+ /**
13210
+ * require or disallow block style mappings.
13211
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping.html
13212
+ */
13213
+ 'yaml/block-mapping'?: Linter.RuleEntry<YamlBlockMapping>
13214
+ /**
13215
+ * enforce consistent line breaks after `:` indicator
13216
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-colon-indicator-newline.html
13217
+ */
13218
+ 'yaml/block-mapping-colon-indicator-newline'?: Linter.RuleEntry<YamlBlockMappingColonIndicatorNewline>
13219
+ /**
13220
+ * enforce consistent line breaks after `?` indicator
13221
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-question-indicator-newline.html
13222
+ */
13223
+ 'yaml/block-mapping-question-indicator-newline'?: Linter.RuleEntry<YamlBlockMappingQuestionIndicatorNewline>
13224
+ /**
13225
+ * require or disallow block style sequences.
13226
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence.html
13227
+ */
13228
+ 'yaml/block-sequence'?: Linter.RuleEntry<YamlBlockSequence>
13229
+ /**
13230
+ * enforce consistent line breaks after `-` indicator
13231
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence-hyphen-indicator-newline.html
13232
+ */
13233
+ 'yaml/block-sequence-hyphen-indicator-newline'?: Linter.RuleEntry<YamlBlockSequenceHyphenIndicatorNewline>
13234
+ /**
13235
+ * enforce YAML file extension
13236
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/file-extension.html
13237
+ */
13238
+ 'yaml/file-extension'?: Linter.RuleEntry<YamlFileExtension>
13239
+ /**
13240
+ * enforce consistent line breaks inside braces
13241
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-newline.html
13242
+ */
13243
+ 'yaml/flow-mapping-curly-newline'?: Linter.RuleEntry<YamlFlowMappingCurlyNewline>
13244
+ /**
13245
+ * enforce consistent spacing inside braces
13246
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-spacing.html
13247
+ */
13248
+ 'yaml/flow-mapping-curly-spacing'?: Linter.RuleEntry<YamlFlowMappingCurlySpacing>
13249
+ /**
13250
+ * enforce linebreaks after opening and before closing flow sequence brackets
13251
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-sequence-bracket-newline.html
13252
+ */
13253
+ 'yaml/flow-sequence-bracket-newline'?: Linter.RuleEntry<YamlFlowSequenceBracketNewline>
13254
+ /**
13255
+ * enforce consistent spacing inside flow sequence brackets
13256
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-sequence-bracket-spacing.html
13257
+ */
13258
+ 'yaml/flow-sequence-bracket-spacing'?: Linter.RuleEntry<YamlFlowSequenceBracketSpacing>
13259
+ /**
13260
+ * enforce consistent indentation
13261
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/indent.html
13262
+ */
13263
+ 'yaml/indent'?: Linter.RuleEntry<YamlIndent>
13264
+ /**
13265
+ * enforce naming convention to key names
13266
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/key-name-casing.html
13267
+ */
13268
+ 'yaml/key-name-casing'?: Linter.RuleEntry<YamlKeyNameCasing>
13269
+ /**
13270
+ * enforce consistent spacing between keys and values in mapping pairs
13271
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/key-spacing.html
13272
+ */
13273
+ 'yaml/key-spacing'?: Linter.RuleEntry<YamlKeySpacing>
13274
+ /**
13275
+ * disallow empty document
13276
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-document.html
13277
+ */
13278
+ 'yaml/no-empty-document'?: Linter.RuleEntry<[]>
13279
+ /**
13280
+ * disallow empty mapping keys
13281
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-key.html
13282
+ */
13283
+ 'yaml/no-empty-key'?: Linter.RuleEntry<[]>
13284
+ /**
13285
+ * disallow empty mapping values
13286
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-mapping-value.html
13287
+ */
13288
+ 'yaml/no-empty-mapping-value'?: Linter.RuleEntry<[]>
13289
+ /**
13290
+ * disallow empty sequence entries
13291
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-sequence-entry.html
13292
+ */
13293
+ 'yaml/no-empty-sequence-entry'?: Linter.RuleEntry<[]>
13294
+ /**
13295
+ * disallow irregular whitespace
13296
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-irregular-whitespace.html
13297
+ */
13298
+ 'yaml/no-irregular-whitespace'?: Linter.RuleEntry<YamlNoIrregularWhitespace>
13299
+ /**
13300
+ * disallow multiple empty lines
13301
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-multiple-empty-lines.html
13302
+ */
13303
+ 'yaml/no-multiple-empty-lines'?: Linter.RuleEntry<YamlNoMultipleEmptyLines>
13304
+ /**
13305
+ * disallow tabs for indentation.
13306
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-tab-indent.html
13307
+ */
13308
+ 'yaml/no-tab-indent'?: Linter.RuleEntry<[]>
13309
+ /**
13310
+ * disallow trailing zeros for floats
13311
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-trailing-zeros.html
13312
+ */
13313
+ 'yaml/no-trailing-zeros'?: Linter.RuleEntry<[]>
13314
+ /**
13315
+ * require or disallow plain style scalar.
13316
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/plain-scalar.html
13317
+ */
13318
+ 'yaml/plain-scalar'?: Linter.RuleEntry<YamlPlainScalar>
13319
+ /**
13320
+ * enforce the consistent use of either double, or single quotes
13321
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/quotes.html
13322
+ */
13323
+ 'yaml/quotes'?: Linter.RuleEntry<YamlQuotes>
13324
+ /**
13325
+ * disallow mapping keys other than strings
13326
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/require-string-key.html
13327
+ */
13328
+ 'yaml/require-string-key'?: Linter.RuleEntry<[]>
13329
+ /**
13330
+ * require mapping keys to be sorted
13331
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/sort-keys.html
13332
+ */
13333
+ 'yaml/sort-keys'?: Linter.RuleEntry<YamlSortKeys>
13334
+ /**
13335
+ * require sequence values to be sorted
13336
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/sort-sequence-values.html
13337
+ */
13338
+ 'yaml/sort-sequence-values'?: Linter.RuleEntry<YamlSortSequenceValues>
13339
+ /**
13340
+ * enforce consistent spacing after the `#` in a comment
13341
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/spaced-comment.html
13342
+ */
13343
+ 'yaml/spaced-comment'?: Linter.RuleEntry<YamlSpacedComment>
13344
+ /**
13345
+ * disallow parsing errors in Vue custom blocks
13346
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/vue-custom-block/no-parsing-error.html
13347
+ */
13348
+ 'yaml/vue-custom-block/no-parsing-error'?: Linter.RuleEntry<[]>
13209
13349
  /**
13210
13350
  * Require or disallow spacing around the `*` in `yield*` expressions
13211
13351
  * @see https://eslint.org/docs/latest/rules/yield-star-spacing
@@ -26970,6 +27110,210 @@ type ValidTypeof = []|[{
26970
27110
  type WrapIife = []|[("outside" | "inside" | "any")]|[("outside" | "inside" | "any"), {
26971
27111
  functionPrototypeMethods?: boolean
26972
27112
  }]
27113
+ // ----- yaml/block-mapping -----
27114
+ type YamlBlockMapping = []|[(("always" | "never") | {
27115
+ singleline?: ("always" | "never" | "ignore")
27116
+ multiline?: ("always" | "never" | "ignore")
27117
+ })]
27118
+ // ----- yaml/block-mapping-colon-indicator-newline -----
27119
+ type YamlBlockMappingColonIndicatorNewline = []|[("always" | "never")]
27120
+ // ----- yaml/block-mapping-question-indicator-newline -----
27121
+ type YamlBlockMappingQuestionIndicatorNewline = []|[("always" | "never")]
27122
+ // ----- yaml/block-sequence -----
27123
+ type YamlBlockSequence = []|[(("always" | "never") | {
27124
+ singleline?: ("always" | "never" | "ignore")
27125
+ multiline?: ("always" | "never" | "ignore")
27126
+ })]
27127
+ // ----- yaml/block-sequence-hyphen-indicator-newline -----
27128
+ type YamlBlockSequenceHyphenIndicatorNewline = []|[("always" | "never")]|[("always" | "never"), {
27129
+ nestedHyphen?: ("always" | "never")
27130
+ blockMapping?: ("always" | "never")
27131
+ }]
27132
+ // ----- yaml/file-extension -----
27133
+ type YamlFileExtension = []|[{
27134
+ extension?: ("yaml" | "yml")
27135
+ caseSensitive?: boolean
27136
+ }]
27137
+ // ----- yaml/flow-mapping-curly-newline -----
27138
+ type YamlFlowMappingCurlyNewline = []|[(("always" | "never") | {
27139
+ multiline?: boolean
27140
+ minProperties?: number
27141
+ consistent?: boolean
27142
+ })]
27143
+ // ----- yaml/flow-mapping-curly-spacing -----
27144
+ type YamlFlowMappingCurlySpacing = []|[("always" | "never")]|[("always" | "never"), {
27145
+ arraysInObjects?: boolean
27146
+ objectsInObjects?: boolean
27147
+ }]
27148
+ // ----- yaml/flow-sequence-bracket-newline -----
27149
+ type YamlFlowSequenceBracketNewline = []|[(("always" | "never" | "consistent") | {
27150
+ multiline?: boolean
27151
+ minItems?: (number | null)
27152
+ })]
27153
+ // ----- yaml/flow-sequence-bracket-spacing -----
27154
+ type YamlFlowSequenceBracketSpacing = []|[("always" | "never")]|[("always" | "never"), {
27155
+ singleValue?: boolean
27156
+ objectsInArrays?: boolean
27157
+ arraysInArrays?: boolean
27158
+ }]
27159
+ // ----- yaml/indent -----
27160
+ type YamlIndent = []|[number]|[number, {
27161
+ indentBlockSequences?: boolean
27162
+ indicatorValueIndent?: number
27163
+ }]
27164
+ // ----- yaml/key-name-casing -----
27165
+ type YamlKeyNameCasing = []|[{
27166
+ camelCase?: boolean
27167
+ PascalCase?: boolean
27168
+ SCREAMING_SNAKE_CASE?: boolean
27169
+ "kebab-case"?: boolean
27170
+ snake_case?: boolean
27171
+ ignores?: string[]
27172
+ }]
27173
+ // ----- yaml/key-spacing -----
27174
+ type YamlKeySpacing = []|[({
27175
+ align?: (("colon" | "value") | {
27176
+ on?: ("colon" | "value")
27177
+ mode?: ("strict" | "minimum")
27178
+ beforeColon?: boolean
27179
+ afterColon?: boolean
27180
+ })
27181
+ mode?: ("strict" | "minimum")
27182
+ beforeColon?: boolean
27183
+ afterColon?: boolean
27184
+ } | {
27185
+ singleLine?: {
27186
+ mode?: ("strict" | "minimum")
27187
+ beforeColon?: boolean
27188
+ afterColon?: boolean
27189
+ }
27190
+ multiLine?: {
27191
+ align?: (("colon" | "value") | {
27192
+ on?: ("colon" | "value")
27193
+ mode?: ("strict" | "minimum")
27194
+ beforeColon?: boolean
27195
+ afterColon?: boolean
27196
+ })
27197
+ mode?: ("strict" | "minimum")
27198
+ beforeColon?: boolean
27199
+ afterColon?: boolean
27200
+ }
27201
+ } | {
27202
+ singleLine?: {
27203
+ mode?: ("strict" | "minimum")
27204
+ beforeColon?: boolean
27205
+ afterColon?: boolean
27206
+ }
27207
+ multiLine?: {
27208
+ mode?: ("strict" | "minimum")
27209
+ beforeColon?: boolean
27210
+ afterColon?: boolean
27211
+ }
27212
+ align?: {
27213
+ on?: ("colon" | "value")
27214
+ mode?: ("strict" | "minimum")
27215
+ beforeColon?: boolean
27216
+ afterColon?: boolean
27217
+ }
27218
+ })]
27219
+ // ----- yaml/no-irregular-whitespace -----
27220
+ type YamlNoIrregularWhitespace = []|[{
27221
+ skipComments?: boolean
27222
+ skipQuotedScalars?: boolean
27223
+ }]
27224
+ // ----- yaml/no-multiple-empty-lines -----
27225
+ type YamlNoMultipleEmptyLines = []|[{
27226
+ max: number
27227
+ maxEOF?: number
27228
+ maxBOF?: number
27229
+ }]
27230
+ // ----- yaml/plain-scalar -----
27231
+ type YamlPlainScalar = []|[("always" | "never")]|[("always" | "never"), {
27232
+ ignorePatterns?: string[]
27233
+ }]
27234
+ // ----- yaml/quotes -----
27235
+ type YamlQuotes = []|[{
27236
+ prefer?: ("double" | "single")
27237
+ avoidEscape?: boolean
27238
+ }]
27239
+ // ----- yaml/sort-keys -----
27240
+ type YamlSortKeys = ([{
27241
+ pathPattern: string
27242
+ hasProperties?: string[]
27243
+ order: ((string | {
27244
+ keyPattern?: string
27245
+ order?: {
27246
+ type?: ("asc" | "desc")
27247
+ caseSensitive?: boolean
27248
+ natural?: boolean
27249
+ }
27250
+ })[] | {
27251
+ type?: ("asc" | "desc")
27252
+ caseSensitive?: boolean
27253
+ natural?: boolean
27254
+ })
27255
+ minKeys?: number
27256
+ allowLineSeparatedGroups?: boolean
27257
+ }, ...({
27258
+ pathPattern: string
27259
+ hasProperties?: string[]
27260
+ order: ((string | {
27261
+ keyPattern?: string
27262
+ order?: {
27263
+ type?: ("asc" | "desc")
27264
+ caseSensitive?: boolean
27265
+ natural?: boolean
27266
+ }
27267
+ })[] | {
27268
+ type?: ("asc" | "desc")
27269
+ caseSensitive?: boolean
27270
+ natural?: boolean
27271
+ })
27272
+ minKeys?: number
27273
+ allowLineSeparatedGroups?: boolean
27274
+ })[]] | []|[("asc" | "desc")]|[("asc" | "desc"), {
27275
+ caseSensitive?: boolean
27276
+ natural?: boolean
27277
+ minKeys?: number
27278
+ allowLineSeparatedGroups?: boolean
27279
+ }])
27280
+ // ----- yaml/sort-sequence-values -----
27281
+ type YamlSortSequenceValues = [{
27282
+ pathPattern: string
27283
+ order: ((string | {
27284
+ valuePattern?: string
27285
+ order?: {
27286
+ type?: ("asc" | "desc")
27287
+ caseSensitive?: boolean
27288
+ natural?: boolean
27289
+ }
27290
+ })[] | {
27291
+ type?: ("asc" | "desc")
27292
+ caseSensitive?: boolean
27293
+ natural?: boolean
27294
+ })
27295
+ minValues?: number
27296
+ }, ...({
27297
+ pathPattern: string
27298
+ order: ((string | {
27299
+ valuePattern?: string
27300
+ order?: {
27301
+ type?: ("asc" | "desc")
27302
+ caseSensitive?: boolean
27303
+ natural?: boolean
27304
+ }
27305
+ })[] | {
27306
+ type?: ("asc" | "desc")
27307
+ caseSensitive?: boolean
27308
+ natural?: boolean
27309
+ })
27310
+ minValues?: number
27311
+ })[]]
27312
+ // ----- yaml/spaced-comment -----
27313
+ type YamlSpacedComment = []|[("always" | "never")]|[("always" | "never"), {
27314
+ exceptions?: string[]
27315
+ markers?: string[]
27316
+ }]
26973
27317
  // ----- yield-star-spacing -----
26974
27318
  type YieldStarSpacing = []|[(("before" | "after" | "both" | "neither") | {
26975
27319
  before?: boolean
@@ -26981,7 +27325,7 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
26981
27325
  onlyEquality?: boolean
26982
27326
  }]
26983
27327
  // Names of all the configs
26984
- type ConfigNames = 'style:eslint-comments' | 'style:formatters:setup' | 'style:imports' | 'style:import-sort' | 'style:jsdoc' | 'style:jsonc:setup' | 'style:jsonc:rules' | 'style:markdown:setup' | 'style:markdown:processor' | 'style:markdown:disables' | 'style:perfectionist' | 'style:promise' | 'style:react:setup' | 'style:react:rules' | 'style:roblox' | 'style:shopify' | 'style:sonarjs' | 'style:sort-package-json' | 'style:sort-tsconfig' | 'style:stylistic' | 'style:typescript:setup' | 'style:typescript:rules' | 'style:typescript:dts-overrides' | 'style:unicorn'
27328
+ type ConfigNames = 'style:eslint-comments' | 'style:formatters:setup' | 'style:imports' | 'style:import-sort' | 'style:jsdoc' | 'style:jsonc:setup' | 'style:jsonc:rules' | 'style:markdown:setup' | 'style:markdown:processor' | 'style:markdown:disables' | 'style:perfectionist' | 'style:promise' | 'style:react:setup' | 'style:react:rules' | 'style:roblox' | 'style:shopify' | 'style:sonarjs' | 'style:sort-package-json' | 'style:sort-tsconfig' | 'style:stylistic' | 'style:typescript:setup' | 'style:typescript:rules' | 'style:typescript:dts-overrides' | 'style:unicorn' | 'style:yaml:setup' | 'style:yaml:rules'
26985
27329
 
26986
27330
  type Awaitable<T> = Promise<T> | T;
26987
27331
  type Rules = RuleOptions;
@@ -27192,6 +27536,12 @@ interface OptionsConfig extends OptionsComponentExtensions {
27192
27536
  * @default auto-detect based on the dependencies
27193
27537
  */
27194
27538
  typescript?: OptionsTypescript;
27539
+ /**
27540
+ * Enable YAML support.
27541
+ *
27542
+ * @default true
27543
+ */
27544
+ yaml?: OptionsOverrides | boolean;
27195
27545
  }
27196
27546
 
27197
27547
  declare function comments(): Promise<Array<TypedFlatConfigItem>>;
@@ -27256,12 +27606,15 @@ declare function typescript(options?: OptionsComponentExtensions & OptionsFiles
27256
27606
 
27257
27607
  declare function unicorn(): Promise<Array<TypedFlatConfigItem>>;
27258
27608
 
27609
+ declare function yaml(options?: OptionsFiles & OptionsOverrides & OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
27610
+
27259
27611
  declare const defaultPluginRenaming: {
27260
27612
  "@eslint-react": string;
27261
27613
  "@eslint-react/hooks-extra": string;
27262
27614
  "@eslint-react/naming-convention": string;
27263
27615
  "@stylistic": string;
27264
27616
  "@typescript-eslint": string;
27617
+ yml: string;
27265
27618
  };
27266
27619
  /**
27267
27620
  * Generates an array of user configuration items based on the provided options
@@ -27289,6 +27642,7 @@ declare const GLOB_JSON5 = "**/*.json5";
27289
27642
  declare const GLOB_JSONC = "**/*.jsonc";
27290
27643
  declare const GLOB_MARKDOWN = "**/*.md";
27291
27644
  declare const GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
27645
+ declare const GLOB_YAML = "**/*.y?(a)ml";
27292
27646
  declare const GLOB_TOML = "**/*.toml";
27293
27647
  declare const GLOB_HTML = "**/*.htm?(l)";
27294
27648
  declare const GLOB_MARKDOWN_CODE = "**/*.md/**/*.?([cm])[jt]s?(x)";
@@ -27312,4 +27666,4 @@ type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
27312
27666
  declare function resolveSubOptions<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): ResolvedOptions<OptionsConfig[K]>;
27313
27667
  declare function getOverrides<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): any;
27314
27668
 
27315
- export { type Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TOML, GLOB_TS, GLOB_TSX, type OptionsComponentExtensions, type OptionsConfig, type OptionsFiles, type OptionsFormatters, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type ReactConfig, type ResolvedOptions, type Rules, type StylisticConfig, StylisticConfigDefaults, type TypedFlatConfigItem, combine, comments, style as default, defaultPluginRenaming, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, jsdoc, jsonc, markdown, perfectionist, prettier, promise, react, renameRules, resolveSubOptions, roblox, shopify, sonarjs, sortPackageJson, sortTsconfig, style, stylistic, toArray, toml, typescript, unicorn };
27669
+ export { type Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_YAML, type OptionsComponentExtensions, type OptionsConfig, type OptionsFiles, type OptionsFormatters, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type ReactConfig, type ResolvedOptions, type Rules, type StylisticConfig, StylisticConfigDefaults, type TypedFlatConfigItem, combine, comments, style as default, defaultPluginRenaming, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, jsdoc, jsonc, markdown, perfectionist, prettier, promise, react, renameRules, resolveSubOptions, roblox, shopify, sonarjs, sortPackageJson, sortTsconfig, style, stylistic, toArray, toml, typescript, unicorn, yaml };
package/dist/index.d.ts CHANGED
@@ -13206,6 +13206,146 @@ interface RuleOptions {
13206
13206
  * @deprecated
13207
13207
  */
13208
13208
  'wrap-regex'?: Linter.RuleEntry<[]>
13209
+ /**
13210
+ * require or disallow block style mappings.
13211
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping.html
13212
+ */
13213
+ 'yaml/block-mapping'?: Linter.RuleEntry<YamlBlockMapping>
13214
+ /**
13215
+ * enforce consistent line breaks after `:` indicator
13216
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-colon-indicator-newline.html
13217
+ */
13218
+ 'yaml/block-mapping-colon-indicator-newline'?: Linter.RuleEntry<YamlBlockMappingColonIndicatorNewline>
13219
+ /**
13220
+ * enforce consistent line breaks after `?` indicator
13221
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-question-indicator-newline.html
13222
+ */
13223
+ 'yaml/block-mapping-question-indicator-newline'?: Linter.RuleEntry<YamlBlockMappingQuestionIndicatorNewline>
13224
+ /**
13225
+ * require or disallow block style sequences.
13226
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence.html
13227
+ */
13228
+ 'yaml/block-sequence'?: Linter.RuleEntry<YamlBlockSequence>
13229
+ /**
13230
+ * enforce consistent line breaks after `-` indicator
13231
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence-hyphen-indicator-newline.html
13232
+ */
13233
+ 'yaml/block-sequence-hyphen-indicator-newline'?: Linter.RuleEntry<YamlBlockSequenceHyphenIndicatorNewline>
13234
+ /**
13235
+ * enforce YAML file extension
13236
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/file-extension.html
13237
+ */
13238
+ 'yaml/file-extension'?: Linter.RuleEntry<YamlFileExtension>
13239
+ /**
13240
+ * enforce consistent line breaks inside braces
13241
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-newline.html
13242
+ */
13243
+ 'yaml/flow-mapping-curly-newline'?: Linter.RuleEntry<YamlFlowMappingCurlyNewline>
13244
+ /**
13245
+ * enforce consistent spacing inside braces
13246
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-spacing.html
13247
+ */
13248
+ 'yaml/flow-mapping-curly-spacing'?: Linter.RuleEntry<YamlFlowMappingCurlySpacing>
13249
+ /**
13250
+ * enforce linebreaks after opening and before closing flow sequence brackets
13251
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-sequence-bracket-newline.html
13252
+ */
13253
+ 'yaml/flow-sequence-bracket-newline'?: Linter.RuleEntry<YamlFlowSequenceBracketNewline>
13254
+ /**
13255
+ * enforce consistent spacing inside flow sequence brackets
13256
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-sequence-bracket-spacing.html
13257
+ */
13258
+ 'yaml/flow-sequence-bracket-spacing'?: Linter.RuleEntry<YamlFlowSequenceBracketSpacing>
13259
+ /**
13260
+ * enforce consistent indentation
13261
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/indent.html
13262
+ */
13263
+ 'yaml/indent'?: Linter.RuleEntry<YamlIndent>
13264
+ /**
13265
+ * enforce naming convention to key names
13266
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/key-name-casing.html
13267
+ */
13268
+ 'yaml/key-name-casing'?: Linter.RuleEntry<YamlKeyNameCasing>
13269
+ /**
13270
+ * enforce consistent spacing between keys and values in mapping pairs
13271
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/key-spacing.html
13272
+ */
13273
+ 'yaml/key-spacing'?: Linter.RuleEntry<YamlKeySpacing>
13274
+ /**
13275
+ * disallow empty document
13276
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-document.html
13277
+ */
13278
+ 'yaml/no-empty-document'?: Linter.RuleEntry<[]>
13279
+ /**
13280
+ * disallow empty mapping keys
13281
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-key.html
13282
+ */
13283
+ 'yaml/no-empty-key'?: Linter.RuleEntry<[]>
13284
+ /**
13285
+ * disallow empty mapping values
13286
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-mapping-value.html
13287
+ */
13288
+ 'yaml/no-empty-mapping-value'?: Linter.RuleEntry<[]>
13289
+ /**
13290
+ * disallow empty sequence entries
13291
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-sequence-entry.html
13292
+ */
13293
+ 'yaml/no-empty-sequence-entry'?: Linter.RuleEntry<[]>
13294
+ /**
13295
+ * disallow irregular whitespace
13296
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-irregular-whitespace.html
13297
+ */
13298
+ 'yaml/no-irregular-whitespace'?: Linter.RuleEntry<YamlNoIrregularWhitespace>
13299
+ /**
13300
+ * disallow multiple empty lines
13301
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-multiple-empty-lines.html
13302
+ */
13303
+ 'yaml/no-multiple-empty-lines'?: Linter.RuleEntry<YamlNoMultipleEmptyLines>
13304
+ /**
13305
+ * disallow tabs for indentation.
13306
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-tab-indent.html
13307
+ */
13308
+ 'yaml/no-tab-indent'?: Linter.RuleEntry<[]>
13309
+ /**
13310
+ * disallow trailing zeros for floats
13311
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-trailing-zeros.html
13312
+ */
13313
+ 'yaml/no-trailing-zeros'?: Linter.RuleEntry<[]>
13314
+ /**
13315
+ * require or disallow plain style scalar.
13316
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/plain-scalar.html
13317
+ */
13318
+ 'yaml/plain-scalar'?: Linter.RuleEntry<YamlPlainScalar>
13319
+ /**
13320
+ * enforce the consistent use of either double, or single quotes
13321
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/quotes.html
13322
+ */
13323
+ 'yaml/quotes'?: Linter.RuleEntry<YamlQuotes>
13324
+ /**
13325
+ * disallow mapping keys other than strings
13326
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/require-string-key.html
13327
+ */
13328
+ 'yaml/require-string-key'?: Linter.RuleEntry<[]>
13329
+ /**
13330
+ * require mapping keys to be sorted
13331
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/sort-keys.html
13332
+ */
13333
+ 'yaml/sort-keys'?: Linter.RuleEntry<YamlSortKeys>
13334
+ /**
13335
+ * require sequence values to be sorted
13336
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/sort-sequence-values.html
13337
+ */
13338
+ 'yaml/sort-sequence-values'?: Linter.RuleEntry<YamlSortSequenceValues>
13339
+ /**
13340
+ * enforce consistent spacing after the `#` in a comment
13341
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/spaced-comment.html
13342
+ */
13343
+ 'yaml/spaced-comment'?: Linter.RuleEntry<YamlSpacedComment>
13344
+ /**
13345
+ * disallow parsing errors in Vue custom blocks
13346
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/vue-custom-block/no-parsing-error.html
13347
+ */
13348
+ 'yaml/vue-custom-block/no-parsing-error'?: Linter.RuleEntry<[]>
13209
13349
  /**
13210
13350
  * Require or disallow spacing around the `*` in `yield*` expressions
13211
13351
  * @see https://eslint.org/docs/latest/rules/yield-star-spacing
@@ -26970,6 +27110,210 @@ type ValidTypeof = []|[{
26970
27110
  type WrapIife = []|[("outside" | "inside" | "any")]|[("outside" | "inside" | "any"), {
26971
27111
  functionPrototypeMethods?: boolean
26972
27112
  }]
27113
+ // ----- yaml/block-mapping -----
27114
+ type YamlBlockMapping = []|[(("always" | "never") | {
27115
+ singleline?: ("always" | "never" | "ignore")
27116
+ multiline?: ("always" | "never" | "ignore")
27117
+ })]
27118
+ // ----- yaml/block-mapping-colon-indicator-newline -----
27119
+ type YamlBlockMappingColonIndicatorNewline = []|[("always" | "never")]
27120
+ // ----- yaml/block-mapping-question-indicator-newline -----
27121
+ type YamlBlockMappingQuestionIndicatorNewline = []|[("always" | "never")]
27122
+ // ----- yaml/block-sequence -----
27123
+ type YamlBlockSequence = []|[(("always" | "never") | {
27124
+ singleline?: ("always" | "never" | "ignore")
27125
+ multiline?: ("always" | "never" | "ignore")
27126
+ })]
27127
+ // ----- yaml/block-sequence-hyphen-indicator-newline -----
27128
+ type YamlBlockSequenceHyphenIndicatorNewline = []|[("always" | "never")]|[("always" | "never"), {
27129
+ nestedHyphen?: ("always" | "never")
27130
+ blockMapping?: ("always" | "never")
27131
+ }]
27132
+ // ----- yaml/file-extension -----
27133
+ type YamlFileExtension = []|[{
27134
+ extension?: ("yaml" | "yml")
27135
+ caseSensitive?: boolean
27136
+ }]
27137
+ // ----- yaml/flow-mapping-curly-newline -----
27138
+ type YamlFlowMappingCurlyNewline = []|[(("always" | "never") | {
27139
+ multiline?: boolean
27140
+ minProperties?: number
27141
+ consistent?: boolean
27142
+ })]
27143
+ // ----- yaml/flow-mapping-curly-spacing -----
27144
+ type YamlFlowMappingCurlySpacing = []|[("always" | "never")]|[("always" | "never"), {
27145
+ arraysInObjects?: boolean
27146
+ objectsInObjects?: boolean
27147
+ }]
27148
+ // ----- yaml/flow-sequence-bracket-newline -----
27149
+ type YamlFlowSequenceBracketNewline = []|[(("always" | "never" | "consistent") | {
27150
+ multiline?: boolean
27151
+ minItems?: (number | null)
27152
+ })]
27153
+ // ----- yaml/flow-sequence-bracket-spacing -----
27154
+ type YamlFlowSequenceBracketSpacing = []|[("always" | "never")]|[("always" | "never"), {
27155
+ singleValue?: boolean
27156
+ objectsInArrays?: boolean
27157
+ arraysInArrays?: boolean
27158
+ }]
27159
+ // ----- yaml/indent -----
27160
+ type YamlIndent = []|[number]|[number, {
27161
+ indentBlockSequences?: boolean
27162
+ indicatorValueIndent?: number
27163
+ }]
27164
+ // ----- yaml/key-name-casing -----
27165
+ type YamlKeyNameCasing = []|[{
27166
+ camelCase?: boolean
27167
+ PascalCase?: boolean
27168
+ SCREAMING_SNAKE_CASE?: boolean
27169
+ "kebab-case"?: boolean
27170
+ snake_case?: boolean
27171
+ ignores?: string[]
27172
+ }]
27173
+ // ----- yaml/key-spacing -----
27174
+ type YamlKeySpacing = []|[({
27175
+ align?: (("colon" | "value") | {
27176
+ on?: ("colon" | "value")
27177
+ mode?: ("strict" | "minimum")
27178
+ beforeColon?: boolean
27179
+ afterColon?: boolean
27180
+ })
27181
+ mode?: ("strict" | "minimum")
27182
+ beforeColon?: boolean
27183
+ afterColon?: boolean
27184
+ } | {
27185
+ singleLine?: {
27186
+ mode?: ("strict" | "minimum")
27187
+ beforeColon?: boolean
27188
+ afterColon?: boolean
27189
+ }
27190
+ multiLine?: {
27191
+ align?: (("colon" | "value") | {
27192
+ on?: ("colon" | "value")
27193
+ mode?: ("strict" | "minimum")
27194
+ beforeColon?: boolean
27195
+ afterColon?: boolean
27196
+ })
27197
+ mode?: ("strict" | "minimum")
27198
+ beforeColon?: boolean
27199
+ afterColon?: boolean
27200
+ }
27201
+ } | {
27202
+ singleLine?: {
27203
+ mode?: ("strict" | "minimum")
27204
+ beforeColon?: boolean
27205
+ afterColon?: boolean
27206
+ }
27207
+ multiLine?: {
27208
+ mode?: ("strict" | "minimum")
27209
+ beforeColon?: boolean
27210
+ afterColon?: boolean
27211
+ }
27212
+ align?: {
27213
+ on?: ("colon" | "value")
27214
+ mode?: ("strict" | "minimum")
27215
+ beforeColon?: boolean
27216
+ afterColon?: boolean
27217
+ }
27218
+ })]
27219
+ // ----- yaml/no-irregular-whitespace -----
27220
+ type YamlNoIrregularWhitespace = []|[{
27221
+ skipComments?: boolean
27222
+ skipQuotedScalars?: boolean
27223
+ }]
27224
+ // ----- yaml/no-multiple-empty-lines -----
27225
+ type YamlNoMultipleEmptyLines = []|[{
27226
+ max: number
27227
+ maxEOF?: number
27228
+ maxBOF?: number
27229
+ }]
27230
+ // ----- yaml/plain-scalar -----
27231
+ type YamlPlainScalar = []|[("always" | "never")]|[("always" | "never"), {
27232
+ ignorePatterns?: string[]
27233
+ }]
27234
+ // ----- yaml/quotes -----
27235
+ type YamlQuotes = []|[{
27236
+ prefer?: ("double" | "single")
27237
+ avoidEscape?: boolean
27238
+ }]
27239
+ // ----- yaml/sort-keys -----
27240
+ type YamlSortKeys = ([{
27241
+ pathPattern: string
27242
+ hasProperties?: string[]
27243
+ order: ((string | {
27244
+ keyPattern?: string
27245
+ order?: {
27246
+ type?: ("asc" | "desc")
27247
+ caseSensitive?: boolean
27248
+ natural?: boolean
27249
+ }
27250
+ })[] | {
27251
+ type?: ("asc" | "desc")
27252
+ caseSensitive?: boolean
27253
+ natural?: boolean
27254
+ })
27255
+ minKeys?: number
27256
+ allowLineSeparatedGroups?: boolean
27257
+ }, ...({
27258
+ pathPattern: string
27259
+ hasProperties?: string[]
27260
+ order: ((string | {
27261
+ keyPattern?: string
27262
+ order?: {
27263
+ type?: ("asc" | "desc")
27264
+ caseSensitive?: boolean
27265
+ natural?: boolean
27266
+ }
27267
+ })[] | {
27268
+ type?: ("asc" | "desc")
27269
+ caseSensitive?: boolean
27270
+ natural?: boolean
27271
+ })
27272
+ minKeys?: number
27273
+ allowLineSeparatedGroups?: boolean
27274
+ })[]] | []|[("asc" | "desc")]|[("asc" | "desc"), {
27275
+ caseSensitive?: boolean
27276
+ natural?: boolean
27277
+ minKeys?: number
27278
+ allowLineSeparatedGroups?: boolean
27279
+ }])
27280
+ // ----- yaml/sort-sequence-values -----
27281
+ type YamlSortSequenceValues = [{
27282
+ pathPattern: string
27283
+ order: ((string | {
27284
+ valuePattern?: string
27285
+ order?: {
27286
+ type?: ("asc" | "desc")
27287
+ caseSensitive?: boolean
27288
+ natural?: boolean
27289
+ }
27290
+ })[] | {
27291
+ type?: ("asc" | "desc")
27292
+ caseSensitive?: boolean
27293
+ natural?: boolean
27294
+ })
27295
+ minValues?: number
27296
+ }, ...({
27297
+ pathPattern: string
27298
+ order: ((string | {
27299
+ valuePattern?: string
27300
+ order?: {
27301
+ type?: ("asc" | "desc")
27302
+ caseSensitive?: boolean
27303
+ natural?: boolean
27304
+ }
27305
+ })[] | {
27306
+ type?: ("asc" | "desc")
27307
+ caseSensitive?: boolean
27308
+ natural?: boolean
27309
+ })
27310
+ minValues?: number
27311
+ })[]]
27312
+ // ----- yaml/spaced-comment -----
27313
+ type YamlSpacedComment = []|[("always" | "never")]|[("always" | "never"), {
27314
+ exceptions?: string[]
27315
+ markers?: string[]
27316
+ }]
26973
27317
  // ----- yield-star-spacing -----
26974
27318
  type YieldStarSpacing = []|[(("before" | "after" | "both" | "neither") | {
26975
27319
  before?: boolean
@@ -26981,7 +27325,7 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
26981
27325
  onlyEquality?: boolean
26982
27326
  }]
26983
27327
  // Names of all the configs
26984
- type ConfigNames = 'style:eslint-comments' | 'style:formatters:setup' | 'style:imports' | 'style:import-sort' | 'style:jsdoc' | 'style:jsonc:setup' | 'style:jsonc:rules' | 'style:markdown:setup' | 'style:markdown:processor' | 'style:markdown:disables' | 'style:perfectionist' | 'style:promise' | 'style:react:setup' | 'style:react:rules' | 'style:roblox' | 'style:shopify' | 'style:sonarjs' | 'style:sort-package-json' | 'style:sort-tsconfig' | 'style:stylistic' | 'style:typescript:setup' | 'style:typescript:rules' | 'style:typescript:dts-overrides' | 'style:unicorn'
27328
+ type ConfigNames = 'style:eslint-comments' | 'style:formatters:setup' | 'style:imports' | 'style:import-sort' | 'style:jsdoc' | 'style:jsonc:setup' | 'style:jsonc:rules' | 'style:markdown:setup' | 'style:markdown:processor' | 'style:markdown:disables' | 'style:perfectionist' | 'style:promise' | 'style:react:setup' | 'style:react:rules' | 'style:roblox' | 'style:shopify' | 'style:sonarjs' | 'style:sort-package-json' | 'style:sort-tsconfig' | 'style:stylistic' | 'style:typescript:setup' | 'style:typescript:rules' | 'style:typescript:dts-overrides' | 'style:unicorn' | 'style:yaml:setup' | 'style:yaml:rules'
26985
27329
 
26986
27330
  type Awaitable<T> = Promise<T> | T;
26987
27331
  type Rules = RuleOptions;
@@ -27192,6 +27536,12 @@ interface OptionsConfig extends OptionsComponentExtensions {
27192
27536
  * @default auto-detect based on the dependencies
27193
27537
  */
27194
27538
  typescript?: OptionsTypescript;
27539
+ /**
27540
+ * Enable YAML support.
27541
+ *
27542
+ * @default true
27543
+ */
27544
+ yaml?: OptionsOverrides | boolean;
27195
27545
  }
27196
27546
 
27197
27547
  declare function comments(): Promise<Array<TypedFlatConfigItem>>;
@@ -27256,12 +27606,15 @@ declare function typescript(options?: OptionsComponentExtensions & OptionsFiles
27256
27606
 
27257
27607
  declare function unicorn(): Promise<Array<TypedFlatConfigItem>>;
27258
27608
 
27609
+ declare function yaml(options?: OptionsFiles & OptionsOverrides & OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
27610
+
27259
27611
  declare const defaultPluginRenaming: {
27260
27612
  "@eslint-react": string;
27261
27613
  "@eslint-react/hooks-extra": string;
27262
27614
  "@eslint-react/naming-convention": string;
27263
27615
  "@stylistic": string;
27264
27616
  "@typescript-eslint": string;
27617
+ yml: string;
27265
27618
  };
27266
27619
  /**
27267
27620
  * Generates an array of user configuration items based on the provided options
@@ -27289,6 +27642,7 @@ declare const GLOB_JSON5 = "**/*.json5";
27289
27642
  declare const GLOB_JSONC = "**/*.jsonc";
27290
27643
  declare const GLOB_MARKDOWN = "**/*.md";
27291
27644
  declare const GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
27645
+ declare const GLOB_YAML = "**/*.y?(a)ml";
27292
27646
  declare const GLOB_TOML = "**/*.toml";
27293
27647
  declare const GLOB_HTML = "**/*.htm?(l)";
27294
27648
  declare const GLOB_MARKDOWN_CODE = "**/*.md/**/*.?([cm])[jt]s?(x)";
@@ -27312,4 +27666,4 @@ type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
27312
27666
  declare function resolveSubOptions<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): ResolvedOptions<OptionsConfig[K]>;
27313
27667
  declare function getOverrides<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): any;
27314
27668
 
27315
- export { type Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TOML, GLOB_TS, GLOB_TSX, type OptionsComponentExtensions, type OptionsConfig, type OptionsFiles, type OptionsFormatters, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type ReactConfig, type ResolvedOptions, type Rules, type StylisticConfig, StylisticConfigDefaults, type TypedFlatConfigItem, combine, comments, style as default, defaultPluginRenaming, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, jsdoc, jsonc, markdown, perfectionist, prettier, promise, react, renameRules, resolveSubOptions, roblox, shopify, sonarjs, sortPackageJson, sortTsconfig, style, stylistic, toArray, toml, typescript, unicorn };
27669
+ export { type Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_YAML, type OptionsComponentExtensions, type OptionsConfig, type OptionsFiles, type OptionsFormatters, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type ReactConfig, type ResolvedOptions, type Rules, type StylisticConfig, StylisticConfigDefaults, type TypedFlatConfigItem, combine, comments, style as default, defaultPluginRenaming, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, jsdoc, jsonc, markdown, perfectionist, prettier, promise, react, renameRules, resolveSubOptions, roblox, shopify, sonarjs, sortPackageJson, sortTsconfig, style, stylistic, toArray, toml, typescript, unicorn, yaml };
package/dist/index.js CHANGED
@@ -899,6 +899,7 @@ var GLOB_JSON5 = "**/*.json5";
899
899
  var GLOB_JSONC = "**/*.jsonc";
900
900
  var GLOB_MARKDOWN = "**/*.md";
901
901
  var GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
902
+ var GLOB_YAML = "**/*.y?(a)ml";
902
903
  var GLOB_TOML = "**/*.toml";
903
904
  var GLOB_HTML = "**/*.htm?(l)";
904
905
  var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
@@ -930,7 +931,8 @@ var GLOB_EXCLUDE = [
930
931
  "**/LICENSE*",
931
932
  "**/__snapshots__",
932
933
  "**/auto-import?(s).d.ts",
933
- "**/components.d.ts"
934
+ "**/components.d.ts",
935
+ "**/roblox.yml"
934
936
  ];
935
937
 
936
938
  // src/configs/stylistic.ts
@@ -2667,6 +2669,59 @@ async function unicorn() {
2667
2669
  ];
2668
2670
  }
2669
2671
 
2672
+ // src/configs/yaml.ts
2673
+ init_esm_shims();
2674
+ async function yaml(options = {}) {
2675
+ const {
2676
+ files = [GLOB_YAML, "**/github-actions-workflow"],
2677
+ overrides = {},
2678
+ stylistic: stylistic2 = true
2679
+ } = options;
2680
+ const { indent = 2, quotes = "single" } = typeof stylistic2 === "boolean" ? {} : stylistic2;
2681
+ const [pluginYaml, parserYaml] = await Promise.all([
2682
+ interopDefault(import("eslint-plugin-yml")),
2683
+ interopDefault(import("yaml-eslint-parser"))
2684
+ ]);
2685
+ return [
2686
+ {
2687
+ name: "style:yaml:setup",
2688
+ plugins: {
2689
+ yaml: pluginYaml
2690
+ }
2691
+ },
2692
+ {
2693
+ files,
2694
+ languageOptions: {
2695
+ parser: parserYaml
2696
+ },
2697
+ name: "style:yaml:rules",
2698
+ rules: {
2699
+ "style/spaced-comment": "off",
2700
+ "yaml/block-mapping": "error",
2701
+ "yaml/block-sequence": "error",
2702
+ "yaml/no-empty-key": "error",
2703
+ "yaml/no-empty-sequence-entry": "error",
2704
+ "yaml/no-irregular-whitespace": "error",
2705
+ "yaml/plain-scalar": "error",
2706
+ ...stylistic2 ? {
2707
+ "yaml/block-mapping-question-indicator-newline": "error",
2708
+ "yaml/block-sequence-hyphen-indicator-newline": "error",
2709
+ "yaml/flow-mapping-curly-newline": "error",
2710
+ "yaml/flow-mapping-curly-spacing": "error",
2711
+ "yaml/flow-sequence-bracket-newline": "error",
2712
+ "yaml/flow-sequence-bracket-spacing": "error",
2713
+ "yaml/indent": ["error", indent === "tab" ? 2 : indent],
2714
+ "yaml/key-spacing": "error",
2715
+ "yaml/no-tab-indent": "error",
2716
+ "yaml/quotes": ["error", { avoidEscape: false, prefer: quotes }],
2717
+ "yaml/spaced-comment": "error"
2718
+ } : {},
2719
+ ...overrides
2720
+ }
2721
+ }
2722
+ ];
2723
+ }
2724
+
2670
2725
  // src/factory.ts
2671
2726
  init_esm_shims();
2672
2727
  import { FlatConfigComposer } from "eslint-flat-config-utils";
@@ -2687,7 +2742,8 @@ var defaultPluginRenaming = {
2687
2742
  "@eslint-react/hooks-extra": "react-hooks-extra",
2688
2743
  "@eslint-react/naming-convention": "react-naming-convention",
2689
2744
  "@stylistic": "style",
2690
- "@typescript-eslint": "ts"
2745
+ "@typescript-eslint": "ts",
2746
+ yml: "yaml"
2691
2747
  };
2692
2748
  function style(options = {}, ...userConfigs) {
2693
2749
  const {
@@ -2771,6 +2827,14 @@ function style(options = {}, ...userConfigs) {
2771
2827
  sortTsconfig()
2772
2828
  );
2773
2829
  }
2830
+ if (options.yaml ?? true) {
2831
+ configs.push(
2832
+ yaml({
2833
+ overrides: getOverrides(options, "yaml"),
2834
+ stylistic: stylisticOptions
2835
+ })
2836
+ );
2837
+ }
2774
2838
  if (options.toml ?? true) {
2775
2839
  configs.push(
2776
2840
  toml({
@@ -2848,6 +2912,7 @@ export {
2848
2912
  GLOB_TOML,
2849
2913
  GLOB_TS,
2850
2914
  GLOB_TSX,
2915
+ GLOB_YAML,
2851
2916
  StylisticConfigDefaults,
2852
2917
  combine,
2853
2918
  comments,
@@ -2878,5 +2943,6 @@ export {
2878
2943
  toArray,
2879
2944
  toml,
2880
2945
  typescript,
2881
- unicorn
2946
+ unicorn,
2947
+ yaml
2882
2948
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@isentinel/eslint-config",
3
3
  "type": "module",
4
- "version": "0.5.3",
4
+ "version": "0.5.5",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -111,7 +111,7 @@
111
111
  "simple-git-hooks": "^2.11.1",
112
112
  "tsup": "^8.0.2",
113
113
  "typescript": "^5.4.5",
114
- "@isentinel/eslint-config": "0.5.3"
114
+ "@isentinel/eslint-config": "0.5.5"
115
115
  },
116
116
  "simple-git-hooks": {
117
117
  "pre-commit": "pnpm lint-staged"