linted 16.12.2-rc.2 → 16.12.3-rc.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. package/.github/workflows/RELEASE.yml +35 -35
  2. package/.github/workflows/rc.yml +35 -35
  3. package/.markdownlint.jsonc +124 -0
  4. package/LICENSE +21 -21
  5. package/README.md +390 -390
  6. package/SECURITY.md +9 -9
  7. package/dist/imports/plugins.d.ts.map +1 -1
  8. package/dist/imports.d.ts.map +1 -1
  9. package/eslint.config.js +3 -3
  10. package/package.json +97 -99
  11. package/src/files/html.ts +1 -1
  12. package/src/files/js.ts +1 -1
  13. package/src/files/json.ts +1 -1
  14. package/src/files/jsonc.ts +4 -4
  15. package/src/files/md.ts +1 -1
  16. package/src/files/mocha.ts +1 -1
  17. package/src/files/svelte.ts +1 -1
  18. package/src/files/ts.ts +5 -5
  19. package/src/files/yml.ts +5 -5
  20. package/src/files.ts +22 -22
  21. package/src/imports/parsers.ts +15 -15
  22. package/src/imports/plugins.ts +19 -19
  23. package/src/imports.ts +8 -8
  24. package/src/index.ts +36 -36
  25. package/src/rules/_strings/id.ts +18 -18
  26. package/src/rules/_strings/level.ts +6 -6
  27. package/src/rules/_strings/state.ts +56 -56
  28. package/src/rules/_strings.ts +6 -6
  29. package/src/rules/html/enable.ts +16 -16
  30. package/src/rules/html/enable_recommended.ts +9 -9
  31. package/src/rules/html.ts +4 -4
  32. package/src/rules/js/enable.ts +524 -524
  33. package/src/rules/js/enable_stylistic.ts +608 -608
  34. package/src/rules/js.ts +4 -4
  35. package/src/rules/json/enable.ts +33 -33
  36. package/src/rules/json/enable_x.ts +89 -89
  37. package/src/rules/json.ts +4 -4
  38. package/src/rules/jsonc/override.ts +16 -16
  39. package/src/rules/jsonc.ts +4 -4
  40. package/src/rules/md/enable.ts +15 -15
  41. package/src/rules/md.ts +3 -3
  42. package/src/rules/mocha/enable.ts +3 -3
  43. package/src/rules/mocha/enable_recommended.ts +9 -9
  44. package/src/rules/mocha.ts +4 -4
  45. package/src/rules/svelte/disable.ts +9 -9
  46. package/src/rules/svelte/disable_js.ts +11 -11
  47. package/src/rules/svelte/disable_ts.ts +9 -9
  48. package/src/rules/svelte/enable.ts +228 -228
  49. package/src/rules/svelte/enable_x.ts +20 -20
  50. package/src/rules/svelte.ts +15 -15
  51. package/src/rules/ts/disable.ts +22 -22
  52. package/src/rules/ts/disable_x.ts +32 -32
  53. package/src/rules/ts/enable.ts +549 -549
  54. package/src/rules/ts/enable_x.ts +115 -115
  55. package/src/rules/ts.ts +13 -13
  56. package/src/rules/yml/enable.ts +64 -64
  57. package/src/rules/yml/enable_x.ts +68 -68
  58. package/src/rules/yml.ts +4 -4
  59. package/src/rules.ts +22 -22
  60. package/tsconfig.json +161 -161
  61. package/types/markdownlint/index.d.ts +3 -3
  62. package/types/markdownlint/parser.d.ts +9 -9
  63. package/types/mocha/index.d.ts +8 -8
  64. package/dist/rules/_html.d.ts +0 -8
  65. package/dist/rules/_html.d.ts.map +0 -1
  66. package/dist/rules/_html.js +0 -4
  67. package/dist/rules/_html.js.map +0 -1
  68. package/dist/rules/_js.d.ts +0 -765
  69. package/dist/rules/_js.d.ts.map +0 -1
  70. package/dist/rules/_js.js +0 -4
  71. package/dist/rules/_js.js.map +0 -1
  72. package/dist/rules/_json.d.ts +0 -74
  73. package/dist/rules/_json.d.ts.map +0 -1
  74. package/dist/rules/_json.js +0 -4
  75. package/dist/rules/_json.js.map +0 -1
  76. package/dist/rules/_jsonc.d.ts +0 -77
  77. package/dist/rules/_jsonc.d.ts.map +0 -1
  78. package/dist/rules/_jsonc.js +0 -4
  79. package/dist/rules/_jsonc.js.map +0 -1
  80. package/dist/rules/_md.d.ts +0 -7
  81. package/dist/rules/_md.d.ts.map +0 -1
  82. package/dist/rules/_md.js +0 -3
  83. package/dist/rules/_md.js.map +0 -1
  84. package/dist/rules/_mocha.d.ts +0 -8
  85. package/dist/rules/_mocha.d.ts.map +0 -1
  86. package/dist/rules/_mocha.js +0 -4
  87. package/dist/rules/_mocha.js.map +0 -1
  88. package/dist/rules/_svelte.d.ts +0 -1269
  89. package/dist/rules/_svelte.d.ts.map +0 -1
  90. package/dist/rules/_svelte.js +0 -15
  91. package/dist/rules/_svelte.js.map +0 -1
  92. package/dist/rules/_ts.d.ts +0 -1133
  93. package/dist/rules/_ts.d.ts.map +0 -1
  94. package/dist/rules/_ts.js +0 -13
  95. package/dist/rules/_ts.js.map +0 -1
  96. package/dist/rules/_yml.d.ts +0 -73
  97. package/dist/rules/_yml.d.ts.map +0 -1
  98. package/dist/rules/_yml.js +0 -4
  99. package/dist/rules/_yml.js.map +0 -1
  100. package/dist/rules/html/_enable.d.ts +0 -8
  101. package/dist/rules/html/_enable.d.ts.map +0 -1
  102. package/dist/rules/html/_enable.js +0 -10
  103. package/dist/rules/html/_enable.js.map +0 -1
  104. package/dist/rules/html/_recommended.d.ts +0 -3
  105. package/dist/rules/html/_recommended.d.ts.map +0 -1
  106. package/dist/rules/html/_recommended.js +0 -5
  107. package/dist/rules/html/_recommended.js.map +0 -1
  108. package/dist/rules/js/_enable.d.ts +0 -348
  109. package/dist/rules/js/_enable.d.ts.map +0 -1
  110. package/dist/rules/js/_enable.js +0 -260
  111. package/dist/rules/js/_enable.js.map +0 -1
  112. package/dist/rules/js/stylistic.d.ts +0 -420
  113. package/dist/rules/js/stylistic.d.ts.map +0 -1
  114. package/dist/rules/js/stylistic.js +0 -270
  115. package/dist/rules/js/stylistic.js.map +0 -1
  116. package/dist/rules/json/_enable.d.ts +0 -27
  117. package/dist/rules/json/_enable.d.ts.map +0 -1
  118. package/dist/rules/json/_enable.js +0 -31
  119. package/dist/rules/json/_enable.js.map +0 -1
  120. package/dist/rules/md/_enable.d.ts +0 -7
  121. package/dist/rules/md/_enable.d.ts.map +0 -1
  122. package/dist/rules/md/_enable.js +0 -9
  123. package/dist/rules/md/_enable.js.map +0 -1
  124. package/dist/rules/mocha/_enable.d.ts +0 -3
  125. package/dist/rules/mocha/_enable.d.ts.map +0 -1
  126. package/dist/rules/mocha/_enable.js +0 -4
  127. package/dist/rules/mocha/_enable.js.map +0 -1
  128. package/dist/rules/mocha/_recommended.d.ts +0 -3
  129. package/dist/rules/mocha/_recommended.d.ts.map +0 -1
  130. package/dist/rules/mocha/_recommended.js +0 -5
  131. package/dist/rules/mocha/_recommended.js.map +0 -1
  132. package/dist/rules/svelte/_enable.d.ts +0 -126
  133. package/dist/rules/svelte/_enable.d.ts.map +0 -1
  134. package/dist/rules/svelte/_enable.js +0 -90
  135. package/dist/rules/svelte/_enable.js.map +0 -1
  136. package/dist/rules/svelte/disable_x.d.ts +0 -5
  137. package/dist/rules/svelte/disable_x.d.ts.map +0 -1
  138. package/dist/rules/svelte/disable_x.js +0 -4
  139. package/dist/rules/svelte/disable_x.js.map +0 -1
  140. package/dist/rules/ts/_enable.d.ts +0 -262
  141. package/dist/rules/ts/_enable.d.ts.map +0 -1
  142. package/dist/rules/ts/_enable.js +0 -359
  143. package/dist/rules/ts/_enable.js.map +0 -1
  144. package/dist/rules/ts/disable_compiler.d.ts +0 -18
  145. package/dist/rules/ts/disable_compiler.d.ts.map +0 -1
  146. package/dist/rules/ts/disable_compiler.js +0 -22
  147. package/dist/rules/ts/disable_compiler.js.map +0 -1
  148. package/dist/rules/yml/_enable.d.ts +0 -39
  149. package/dist/rules/yml/_enable.d.ts.map +0 -1
  150. package/dist/rules/yml/_enable.js +0 -28
  151. package/dist/rules/yml/_enable.js.map +0 -1
@@ -1,115 +1,115 @@
1
- import { enable_x, level, state } from "../_strings.js";
2
-
3
- const
4
- { ERROR, OFF } = level,
5
- { Always, All } = state;
6
-
7
- export default [
8
- enable_x,
9
- {
10
- // https://typescript-eslint.io/rules/?=extension-xdeprecated#rules
11
- "@typescript-eslint/class-methods-use-this": OFF /* preference -- eslint:off */,
12
- "@typescript-eslint/consistent-return": OFF /* tsconfig: noImplicitReturns */,
13
- "@typescript-eslint/default-param-last": ERROR,
14
- "@typescript-eslint/dot-notation": [
15
- ERROR,
16
- {
17
- allowKeywords: true,
18
-
19
- // TS-only
20
- allowPrivateClassPropertyAccess: true,
21
- allowProtectedClassPropertyAccess: true,
22
- allowIndexSignaturePropertyAccess: true,
23
- },
24
- ],
25
- "@typescript-eslint/init-declarations": [
26
- ERROR,
27
- Always,
28
- ],
29
- "@typescript-eslint/max-params": OFF /* preference */,
30
- "@typescript-eslint/no-array-constructor": ERROR,
31
- "@typescript-eslint/no-dupe-class-members": OFF /* tsc */,
32
- "@typescript-eslint/no-empty-function": [
33
- ERROR,
34
- {
35
- allow: [
36
- "constructors",
37
- "private-constructors",
38
- "protected-constructors",
39
- "decoratedFunctions",
40
- ],
41
- }, /* functions, arrowFunctions, generatorFunctions, methods, generatorMethods, getters, setters, constructors, asyncFunctions, asyncMethods; TS-ONLY: private-constructors, protected-constructors, decoratedFunctions, overrideMethods */
42
- ],
43
- "@typescript-eslint/no-implied-eval": ERROR,
44
- "@typescript-eslint/no-invalid-this": OFF /* tsconfig: { strict, noImplicitThis } */,
45
- "@typescript-eslint/no-loop-func": ERROR,
46
- "@typescript-eslint/no-magic-numbers": OFF,
47
- "@typescript-eslint/no-redeclare": OFF /* tsc (let, const, -var) */,
48
- "@typescript-eslint/no-restricted-imports": OFF /* preference */,
49
- "@typescript-eslint/no-shadow": OFF /* investigate */,
50
- "@typescript-eslint/no-unused-expressions": [
51
- ERROR,
52
- {
53
- allowShortCircuit: true,
54
- allowTernary: true,
55
- allowTaggedTemplates: true,
56
- enforceForJSX: false,
57
- },
58
- ],
59
- "@typescript-eslint/no-unused-vars": [
60
- ERROR,
61
- {
62
- vars: All,
63
- args: All,
64
- caughtErrors: All,
65
- ignoreRestSiblings: false,
66
- ignoreClassWithStaticInitBlock: false,
67
- reportUsedIgnorePattern: true,
68
- },
69
- ],
70
- "@typescript-eslint/no-use-before-define": [
71
- ERROR,
72
- {
73
- functions: true,
74
- classes: true,
75
- variables: true,
76
- allowNamedExports: false,
77
- enums: true,
78
- typedefs: false /* changed 14.2.2 (still questionable) */,
79
- ignoreTypeReferences: true,
80
- },
81
- ],
82
- "@typescript-eslint/no-useless-constructor": ERROR,
83
- "@typescript-eslint/only-throw-error": [
84
- ERROR,
85
- {
86
- allowThrowingAny: false,
87
- allowThrowingUnknown: false,
88
- },
89
- ],
90
- "@typescript-eslint/prefer-destructuring": [
91
- ERROR,
92
- {
93
- VariableDeclarator: {
94
- array: true,
95
- object: true,
96
- },
97
- AssignmentExpression: {
98
- array: false,
99
- object: false,
100
- },
101
- },
102
- {
103
- enforceForRenamedProperties: false,
104
- enforceForDeclarationWithTypeAnnotation: false,
105
- },
106
- ],
107
- "@typescript-eslint/prefer-promise-reject-errors": [
108
- ERROR,
109
- {
110
- allowEmptyReject: false,
111
- },
112
- ],
113
- "@typescript-eslint/require-await": ERROR,
114
- },
115
- ] as const;
1
+ import { enable_x, level, state } from "../_strings.js";
2
+
3
+ const
4
+ { ERROR, OFF } = level,
5
+ { Always, All } = state;
6
+
7
+ export default [
8
+ enable_x,
9
+ {
10
+ // https://typescript-eslint.io/rules/?=extension-xdeprecated#rules
11
+ "@typescript-eslint/class-methods-use-this": OFF /* preference -- eslint:off */,
12
+ "@typescript-eslint/consistent-return": OFF /* tsconfig: noImplicitReturns */,
13
+ "@typescript-eslint/default-param-last": ERROR,
14
+ "@typescript-eslint/dot-notation": [
15
+ ERROR,
16
+ {
17
+ allowKeywords: true,
18
+
19
+ // TS-only
20
+ allowPrivateClassPropertyAccess: true,
21
+ allowProtectedClassPropertyAccess: true,
22
+ allowIndexSignaturePropertyAccess: true,
23
+ },
24
+ ],
25
+ "@typescript-eslint/init-declarations": [
26
+ ERROR,
27
+ Always,
28
+ ],
29
+ "@typescript-eslint/max-params": OFF /* preference */,
30
+ "@typescript-eslint/no-array-constructor": ERROR,
31
+ "@typescript-eslint/no-dupe-class-members": OFF /* tsc */,
32
+ "@typescript-eslint/no-empty-function": [
33
+ ERROR,
34
+ {
35
+ allow: [
36
+ "constructors",
37
+ "private-constructors",
38
+ "protected-constructors",
39
+ "decoratedFunctions",
40
+ ],
41
+ }, /* functions, arrowFunctions, generatorFunctions, methods, generatorMethods, getters, setters, constructors, asyncFunctions, asyncMethods; TS-ONLY: private-constructors, protected-constructors, decoratedFunctions, overrideMethods */
42
+ ],
43
+ "@typescript-eslint/no-implied-eval": ERROR,
44
+ "@typescript-eslint/no-invalid-this": OFF /* tsconfig: { strict, noImplicitThis } */,
45
+ "@typescript-eslint/no-loop-func": ERROR,
46
+ "@typescript-eslint/no-magic-numbers": OFF,
47
+ "@typescript-eslint/no-redeclare": OFF /* tsc (let, const, -var) */,
48
+ "@typescript-eslint/no-restricted-imports": OFF /* preference */,
49
+ "@typescript-eslint/no-shadow": OFF /* investigate */,
50
+ "@typescript-eslint/no-unused-expressions": [
51
+ ERROR,
52
+ {
53
+ allowShortCircuit: true,
54
+ allowTernary: true,
55
+ allowTaggedTemplates: true,
56
+ enforceForJSX: false,
57
+ },
58
+ ],
59
+ "@typescript-eslint/no-unused-vars": [
60
+ ERROR,
61
+ {
62
+ vars: All,
63
+ args: All,
64
+ caughtErrors: All,
65
+ ignoreRestSiblings: false,
66
+ ignoreClassWithStaticInitBlock: false,
67
+ reportUsedIgnorePattern: true,
68
+ },
69
+ ],
70
+ "@typescript-eslint/no-use-before-define": [
71
+ ERROR,
72
+ {
73
+ functions: true,
74
+ classes: true,
75
+ variables: true,
76
+ allowNamedExports: false,
77
+ enums: true,
78
+ typedefs: false /* changed 14.2.2 (still questionable) */,
79
+ ignoreTypeReferences: true,
80
+ },
81
+ ],
82
+ "@typescript-eslint/no-useless-constructor": ERROR,
83
+ "@typescript-eslint/only-throw-error": [
84
+ ERROR,
85
+ {
86
+ allowThrowingAny: false,
87
+ allowThrowingUnknown: false,
88
+ },
89
+ ],
90
+ "@typescript-eslint/prefer-destructuring": [
91
+ ERROR,
92
+ {
93
+ VariableDeclarator: {
94
+ array: true,
95
+ object: true,
96
+ },
97
+ AssignmentExpression: {
98
+ array: false,
99
+ object: false,
100
+ },
101
+ },
102
+ {
103
+ enforceForRenamedProperties: false,
104
+ enforceForDeclarationWithTypeAnnotation: false,
105
+ },
106
+ ],
107
+ "@typescript-eslint/prefer-promise-reject-errors": [
108
+ ERROR,
109
+ {
110
+ allowEmptyReject: false,
111
+ },
112
+ ],
113
+ "@typescript-eslint/require-await": ERROR,
114
+ },
115
+ ] as const;
package/src/rules/ts.ts CHANGED
@@ -1,13 +1,13 @@
1
- import Js from "./js.js";
2
- import DisableCompiler from "./ts/disable.js";
3
- import DisableX from "./ts/disable_x.js";
4
- import EnableX from "./ts/enable_x.js";
5
- import Enable from "./ts/enable.js";
6
-
7
- export default [
8
- ...Js,
9
- DisableCompiler,
10
- DisableX,
11
- EnableX,
12
- Enable,
13
- ] as const;
1
+ import Js from "./js.js";
2
+ import DisableCompiler from "./ts/disable.js";
3
+ import DisableX from "./ts/disable_x.js";
4
+ import EnableX from "./ts/enable_x.js";
5
+ import Enable from "./ts/enable.js";
6
+
7
+ export default [
8
+ ...Js,
9
+ DisableCompiler,
10
+ DisableX,
11
+ EnableX,
12
+ Enable,
13
+ ] as const;
@@ -1,64 +1,64 @@
1
- import { enable, level, state } from "../_strings.js";
2
-
3
- const
4
- { ERROR, OFF } = level,
5
- { Never, Always, Double } = state;
6
-
7
- export default [
8
- enable,
9
- {
10
- // https://ota-meshi.github.io/eslint-plugin-yml/rules/#yaml-rules
11
- "yml/block-mapping-colon-indicator-newline": [ERROR, Never],
12
- "yml/block-mapping-question-indicator-newline": [ERROR, Never],
13
- "yml/block-mapping": [
14
- ERROR,
15
- {
16
- singleline: Never,
17
- multiline: Always,
18
- },
19
- ],
20
- "yml/block-sequence-hyphen-indicator-newline": [
21
- ERROR,
22
- Never,
23
- {
24
- nestedHyphen: Always,
25
- blockMapping: Never,
26
- },
27
- ],
28
- "yml/block-sequence": [
29
- ERROR,
30
- {
31
- singleline: Always,
32
- multiline: Always,
33
- },
34
- ],
35
- "yml/file-extension": OFF,
36
- "yml/indent": [
37
- ERROR,
38
- 2,
39
- {
40
- indentBlockSequences: true,
41
- indicatorValueIndent: 2,
42
- },
43
- ],
44
- "yml/key-name-casing": OFF,
45
- "yml/no-empty-document": ERROR,
46
- "yml/no-empty-key": ERROR,
47
- "yml/no-empty-mapping-value": ERROR,
48
- "yml/no-empty-sequence-entry": ERROR,
49
- "yml/no-tab-indent": ERROR,
50
- "yml/no-trailing-zeros": ERROR,
51
- "yml/plain-scalar": [ERROR, Always],
52
- "yml/quotes": [
53
- ERROR,
54
- {
55
- prefer: Double,
56
- avoidEscape: true,
57
- },
58
- ],
59
- "yml/require-string-key": ERROR,
60
- "yml/sort-keys": OFF,
61
- "yml/sort-sequence-values": OFF,
62
- "yml/vue-custom-block/no-parsing-error": ERROR,
63
- },
64
- ] as const;
1
+ import { enable, level, state } from "../_strings.js";
2
+
3
+ const
4
+ { ERROR, OFF } = level,
5
+ { Never, Always, Double } = state;
6
+
7
+ export default [
8
+ enable,
9
+ {
10
+ // https://ota-meshi.github.io/eslint-plugin-yml/rules/#yaml-rules
11
+ "yml/block-mapping-colon-indicator-newline": [ERROR, Never],
12
+ "yml/block-mapping-question-indicator-newline": [ERROR, Never],
13
+ "yml/block-mapping": [
14
+ ERROR,
15
+ {
16
+ singleline: Never,
17
+ multiline: Always,
18
+ },
19
+ ],
20
+ "yml/block-sequence-hyphen-indicator-newline": [
21
+ ERROR,
22
+ Never,
23
+ {
24
+ nestedHyphen: Always,
25
+ blockMapping: Never,
26
+ },
27
+ ],
28
+ "yml/block-sequence": [
29
+ ERROR,
30
+ {
31
+ singleline: Always,
32
+ multiline: Always,
33
+ },
34
+ ],
35
+ "yml/file-extension": OFF,
36
+ "yml/indent": [
37
+ ERROR,
38
+ 2,
39
+ {
40
+ indentBlockSequences: true,
41
+ indicatorValueIndent: 2,
42
+ },
43
+ ],
44
+ "yml/key-name-casing": OFF,
45
+ "yml/no-empty-document": ERROR,
46
+ "yml/no-empty-key": ERROR,
47
+ "yml/no-empty-mapping-value": ERROR,
48
+ "yml/no-empty-sequence-entry": ERROR,
49
+ "yml/no-tab-indent": ERROR,
50
+ "yml/no-trailing-zeros": ERROR,
51
+ "yml/plain-scalar": [ERROR, Always],
52
+ "yml/quotes": [
53
+ ERROR,
54
+ {
55
+ prefer: Double,
56
+ avoidEscape: true,
57
+ },
58
+ ],
59
+ "yml/require-string-key": ERROR,
60
+ "yml/sort-keys": OFF,
61
+ "yml/sort-sequence-values": OFF,
62
+ "yml/vue-custom-block/no-parsing-error": ERROR,
63
+ },
64
+ ] as const;
@@ -1,68 +1,68 @@
1
- import { enable_x, level, state } from "../_strings.js";
2
-
3
- const
4
- { ERROR } = level,
5
- { Never, Always, Strict } = state;
6
-
7
- export default [
8
- enable_x,
9
- {
10
- // https://ota-meshi.github.io/eslint-plugin-yml/rules/#extension-rules
11
- "yml/flow-mapping-curly-newline": [
12
- ERROR,
13
- {
14
- consistent: false,
15
- multiline: true,
16
- minProperties: 2,
17
- },
18
- ],
19
- "yml/flow-mapping-curly-spacing": [
20
- ERROR,
21
- Always,
22
- {
23
- arraysInObjects: true,
24
- objectsInObjects: true,
25
- },
26
- ],
27
- "yml/flow-sequence-bracket-newline": [
28
- ERROR,
29
- {
30
- multiline: true,
31
- minItems: null,
32
- },
33
- ],
34
- "yml/flow-sequence-bracket-spacing": [
35
- ERROR,
36
- Never,
37
- {
38
- singleValue: false,
39
- objectsInArrays: false,
40
- arraysInArrays: false,
41
- },
42
- ],
43
- "yml/key-spacing": [
44
- ERROR,
45
- {
46
- beforeColon: false,
47
- afterColon: true,
48
- mode: Strict,
49
- },
50
- ],
51
- "yml/no-irregular-whitespace": [
52
- ERROR,
53
- {
54
- skipQuotedScalars: true,
55
- skipComments: false,
56
- },
57
- ],
58
- "yml/no-multiple-empty-lines": [
59
- ERROR,
60
- {
61
- max: 1,
62
- maxEOF: 1,
63
- maxBOF: 0,
64
- },
65
- ],
66
- "yml/spaced-comment": [ERROR, Always],
67
- },
68
- ] as const;
1
+ import { enable_x, level, state } from "../_strings.js";
2
+
3
+ const
4
+ { ERROR } = level,
5
+ { Never, Always, Strict } = state;
6
+
7
+ export default [
8
+ enable_x,
9
+ {
10
+ // https://ota-meshi.github.io/eslint-plugin-yml/rules/#extension-rules
11
+ "yml/flow-mapping-curly-newline": [
12
+ ERROR,
13
+ {
14
+ consistent: false,
15
+ multiline: true,
16
+ minProperties: 2,
17
+ },
18
+ ],
19
+ "yml/flow-mapping-curly-spacing": [
20
+ ERROR,
21
+ Always,
22
+ {
23
+ arraysInObjects: true,
24
+ objectsInObjects: true,
25
+ },
26
+ ],
27
+ "yml/flow-sequence-bracket-newline": [
28
+ ERROR,
29
+ {
30
+ multiline: true,
31
+ minItems: null,
32
+ },
33
+ ],
34
+ "yml/flow-sequence-bracket-spacing": [
35
+ ERROR,
36
+ Never,
37
+ {
38
+ singleValue: false,
39
+ objectsInArrays: false,
40
+ arraysInArrays: false,
41
+ },
42
+ ],
43
+ "yml/key-spacing": [
44
+ ERROR,
45
+ {
46
+ beforeColon: false,
47
+ afterColon: true,
48
+ mode: Strict,
49
+ },
50
+ ],
51
+ "yml/no-irregular-whitespace": [
52
+ ERROR,
53
+ {
54
+ skipQuotedScalars: true,
55
+ skipComments: false,
56
+ },
57
+ ],
58
+ "yml/no-multiple-empty-lines": [
59
+ ERROR,
60
+ {
61
+ max: 1,
62
+ maxEOF: 1,
63
+ maxBOF: 0,
64
+ },
65
+ ],
66
+ "yml/spaced-comment": [ERROR, Always],
67
+ },
68
+ ] as const;
package/src/rules/yml.ts CHANGED
@@ -1,4 +1,4 @@
1
- import EnableX from "./yml/enable_x.js";
2
- import Enable from "./yml/enable.js";
3
-
4
- export default [EnableX, Enable] as const;
1
+ import EnableX from "./yml/enable_x.js";
2
+ import Enable from "./yml/enable.js";
3
+
4
+ export default [EnableX, Enable] as const;
package/src/rules.ts CHANGED
@@ -1,22 +1,22 @@
1
- import type { Core } from "@eslinted/core";
2
- import js from "./rules/js.js";
3
- import ts from "./rules/ts.js";
4
- import svelte from "./rules/svelte.js";
5
- import mocha from "./rules/mocha.js";
6
- import html from "./rules/html.js";
7
- import json from "./rules/json.js";
8
- import jsonc from "./rules/jsonc.js";
9
- import yml from "./rules/yml.js";
10
- import md from "./rules/md.js";
11
-
12
- export default {
13
- js,
14
- ts,
15
- svelte,
16
- mocha,
17
- html,
18
- json,
19
- jsonc,
20
- yml,
21
- md,
22
- } as const satisfies Core.Input.Rules.Base;
1
+ import type { Core } from "@eslinted/core";
2
+ import js from "./rules/js.js";
3
+ import ts from "./rules/ts.js";
4
+ import svelte from "./rules/svelte.js";
5
+ import mocha from "./rules/mocha.js";
6
+ import html from "./rules/html.js";
7
+ import json from "./rules/json.js";
8
+ import jsonc from "./rules/jsonc.js";
9
+ import yml from "./rules/yml.js";
10
+ import md from "./rules/md.js";
11
+
12
+ export default {
13
+ js,
14
+ ts,
15
+ svelte,
16
+ mocha,
17
+ html,
18
+ json,
19
+ jsonc,
20
+ yml,
21
+ md,
22
+ } as const satisfies Core.Input.Rules.Base;