@eslinted/defaults 20.4.0 → 21.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/dist/index.d.ts +48 -67
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/rules/css/index.d.ts +1 -1
  4. package/dist/rules/css/index.d.ts.map +1 -1
  5. package/dist/rules/css/index.js +15 -17
  6. package/dist/rules/css/index.js.map +1 -1
  7. package/dist/rules/html/index.d.ts +1 -1
  8. package/dist/rules/html/index.d.ts.map +1 -1
  9. package/dist/rules/html/index.js +39 -41
  10. package/dist/rules/html/index.js.map +1 -1
  11. package/dist/rules/index.d.ts +48 -67
  12. package/dist/rules/index.d.ts.map +1 -1
  13. package/dist/rules/js.d.ts +219 -221
  14. package/dist/rules/js.d.ts.map +1 -1
  15. package/dist/rules/js.js +545 -7
  16. package/dist/rules/js.js.map +1 -1
  17. package/dist/rules/json/index.d.ts +15 -17
  18. package/dist/rules/json/index.d.ts.map +1 -1
  19. package/dist/rules/json/index.js +29 -7
  20. package/dist/rules/json/index.js.map +1 -1
  21. package/dist/rules/jsonc/index.d.ts +1 -1
  22. package/dist/rules/jsonc/index.d.ts.map +1 -1
  23. package/dist/rules/jsonc/index.js +8 -10
  24. package/dist/rules/jsonc/index.js.map +1 -1
  25. package/dist/rules/svelte/index.d.ts +75 -81
  26. package/dist/rules/svelte/index.d.ts.map +1 -1
  27. package/dist/rules/svelte/index.js +103 -9
  28. package/dist/rules/svelte/index.js.map +1 -1
  29. package/dist/rules/ts/index.d.ts +135 -140
  30. package/dist/rules/ts/index.d.ts.map +1 -1
  31. package/dist/rules/ts/index.js +235 -9
  32. package/dist/rules/ts/index.js.map +1 -1
  33. package/dist/rules/yml/index.d.ts +1 -1
  34. package/dist/rules/yml/index.d.ts.map +1 -1
  35. package/dist/rules/yml/index.js +30 -32
  36. package/dist/rules/yml/index.js.map +1 -1
  37. package/package.json +1 -1
  38. package/src/rules/css/index.ts +18 -20
  39. package/src/rules/html/index.ts +72 -74
  40. package/src/rules/js.ts +621 -6
  41. package/src/rules/json/index.ts +68 -6
  42. package/src/rules/jsonc/index.ts +9 -11
  43. package/src/rules/svelte/index.ts +163 -11
  44. package/src/rules/ts/index.ts +275 -9
  45. package/src/rules/yml/index.ts +52 -54
  46. package/dist/rules/js.eslint.d.ts +0 -289
  47. package/dist/rules/js.eslint.d.ts.map +0 -1
  48. package/dist/rules/js.eslint.js +0 -285
  49. package/dist/rules/js.eslint.js.map +0 -1
  50. package/dist/rules/js.stylistic.d.ts +0 -271
  51. package/dist/rules/js.stylistic.d.ts.map +0 -1
  52. package/dist/rules/js.stylistic.js +0 -265
  53. package/dist/rules/js.stylistic.js.map +0 -1
  54. package/dist/rules/json/json.d.ts +0 -9
  55. package/dist/rules/json/json.d.ts.map +0 -1
  56. package/dist/rules/json/json.js +0 -7
  57. package/dist/rules/json/json.js.map +0 -1
  58. package/dist/rules/json/jsonc.d.ts +0 -29
  59. package/dist/rules/json/jsonc.d.ts.map +0 -1
  60. package/dist/rules/json/jsonc.js +0 -27
  61. package/dist/rules/json/jsonc.js.map +0 -1
  62. package/dist/rules/svelte/disable.d.ts +0 -17
  63. package/dist/rules/svelte/disable.d.ts.map +0 -1
  64. package/dist/rules/svelte/disable.js +0 -15
  65. package/dist/rules/svelte/disable.js.map +0 -1
  66. package/dist/rules/svelte/extend.d.ts +0 -13
  67. package/dist/rules/svelte/extend.d.ts.map +0 -1
  68. package/dist/rules/svelte/extend.js +0 -11
  69. package/dist/rules/svelte/extend.js.map +0 -1
  70. package/dist/rules/svelte/html.d.ts +0 -14
  71. package/dist/rules/svelte/html.d.ts.map +0 -1
  72. package/dist/rules/svelte/html.js +0 -12
  73. package/dist/rules/svelte/html.js.map +0 -1
  74. package/dist/rules/svelte/svelte.d.ts +0 -94
  75. package/dist/rules/svelte/svelte.d.ts.map +0 -1
  76. package/dist/rules/svelte/svelte.js +0 -88
  77. package/dist/rules/svelte/svelte.js.map +0 -1
  78. package/dist/rules/ts/disable.d.ts +0 -26
  79. package/dist/rules/ts/disable.d.ts.map +0 -1
  80. package/dist/rules/ts/disable.js +0 -24
  81. package/dist/rules/ts/disable.js.map +0 -1
  82. package/dist/rules/ts/extend.d.ts +0 -38
  83. package/dist/rules/ts/extend.d.ts.map +0 -1
  84. package/dist/rules/ts/extend.js +0 -36
  85. package/dist/rules/ts/extend.js.map +0 -1
  86. package/dist/rules/ts/ts.d.ts +0 -187
  87. package/dist/rules/ts/ts.d.ts.map +0 -1
  88. package/dist/rules/ts/ts.js +0 -185
  89. package/dist/rules/ts/ts.js.map +0 -1
  90. package/src/rules/js.eslint.ts +0 -348
  91. package/src/rules/js.stylistic.ts +0 -279
  92. package/src/rules/json/json.ts +0 -13
  93. package/src/rules/json/jsonc.ts +0 -63
  94. package/src/rules/svelte/disable.ts +0 -21
  95. package/src/rules/svelte/extend.ts +0 -14
  96. package/src/rules/svelte/html.ts +0 -14
  97. package/src/rules/svelte/svelte.ts +0 -126
  98. package/src/rules/ts/disable.ts +0 -26
  99. package/src/rules/ts/extend.ts +0 -42
  100. package/src/rules/ts/ts.ts +0 -210
@@ -1,13 +1,11 @@
1
1
  import { State } from "../state";
2
2
 
3
- export default [
4
- {
5
- rules: {
6
- "jsonc/comma-dangle": [
7
- State.WARN,
8
- "always-multiline",
9
- ],
10
- "jsonc/no-comments": State.OFF,
11
- } as const,
12
- },
13
- ];
3
+ export default {
4
+ rules: {
5
+ "jsonc/comma-dangle": [
6
+ State.WARN,
7
+ "always-multiline",
8
+ ],
9
+ "jsonc/no-comments": State.OFF,
10
+ } as const,
11
+ };
@@ -1,11 +1,163 @@
1
- import disable from "./disable";
2
- import svelte from "./svelte";
3
- import extend from "./extend";
4
- // import html from "./html";
5
-
6
- export default [
7
- disable,
8
- svelte,
9
- extend,
10
- // html,
11
- ];
1
+ import { State } from "../state";
2
+
3
+ // DOC: https://github.com/sveltejs/eslint-plugin-svelte/blob/ca37fbbe82d01019946e12eeb1b57c2a5736c018/packages/eslint-plugin-svelte/src/configs/base.ts
4
+ export default {
5
+ rules: {
6
+ // #region DISABLE
7
+ // ESLint core rules known to cause problems with `.svelte`.
8
+ "no-inner-declarations": State.OFF /* The AST generated by svelte-eslint-parser will false positive because the root node of the script is not `Program`. INFO: also extended by svelte */,
9
+ "no-self-assign": State.OFF /* Self assign is one of way to update reactive value in Svelte. */,
10
+ "no-unused-vars": State.OFF /* breaks use of svelte global */,
11
+ "ts/no-unused-vars": State.OFF /* breaks use of svelte global */,
12
+ "prefer-const": State.OFF /* svelte/prefer-const */,
13
+ // My own
14
+ "stylistic/indent": State.OFF /* @CONFLICT: with `svelte/indent` */,
15
+ "ts/no-confusing-void-expression": State.OFF /* @CONFLICT: errors on render() */,
16
+ // My own (dprint)
17
+ "stylistic/member-delimiter-style": State.OFF,
18
+ "stylistic/object-curly-spacing": State.OFF,
19
+ "stylistic/semi": State.OFF,
20
+ // #endregion
21
+
22
+ // #region EXTEND
23
+ // DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#extension-rules
24
+ "svelte/no-inner-declarations": [
25
+ State.ON,
26
+ "both",
27
+ ] /* same options: no-inner-declarations */,
28
+ /* @OVERRIDE */ "stylistic/no-trailing-spaces": State.OFF /* replaces `no-trailing-spaces` */,
29
+ // "svelte/no-trailing-spaces": State.OFF,
30
+ // #endregion
31
+
32
+ // #region ERRORS
33
+ // DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#possible-errors
34
+ "svelte/infinite-reactive-loop": State.ON,
35
+ "svelte/no-dom-manipulating": State.ON,
36
+ "svelte/no-dupe-else-if-blocks": State.ON,
37
+ "svelte/no-dupe-on-directives": State.ON,
38
+ "svelte/no-dupe-style-properties": State.ON,
39
+ "svelte/no-dupe-use-directives": State.ON,
40
+ "svelte/no-not-function-handler": State.ON,
41
+ "svelte/no-object-in-text-mustaches": State.ON,
42
+ "svelte/no-raw-special-elements": State.ON,
43
+ "svelte/no-reactive-reassign": State.ON,
44
+ "svelte/no-shorthand-style-property-overrides": State.ON,
45
+ "svelte/no-store-async": State.ON,
46
+ "svelte/no-top-level-browser-globals": State.ON,
47
+ "svelte/no-unknown-style-directive-property": State.ON,
48
+ "svelte/prefer-svelte-reactivity": State.ON,
49
+ "svelte/require-store-callbacks-use-set-param": State.ON,
50
+ "svelte/require-store-reactive-access": State.ON,
51
+ "svelte/valid-compile": State.ON,
52
+ "svelte/valid-style-parse": State.ON,
53
+ // #endregion
54
+
55
+ // #region SECURITY
56
+ // DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#security-vulnerability
57
+ "svelte/no-at-html-tags": State.ON,
58
+ "svelte/no-target-blank": State.ON,
59
+ // #endregion
60
+
61
+ // #region BEST PRACTICES
62
+ // DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#best-practices
63
+ "svelte/block-lang": [
64
+ State.WARN,
65
+ {
66
+ script: ["ts"],
67
+ style: ["css"],
68
+ },
69
+ ],
70
+ "svelte/button-has-type": State.ON,
71
+ "svelte/no-add-event-listener": State.ON,
72
+ "svelte/no-at-debug-tags": State.ON,
73
+ "svelte/no-ignored-unsubscribe": State.ON,
74
+ "svelte/no-immutable-reactive-statements": State.ON,
75
+ "svelte/no-inline-styles": State.ON,
76
+ "svelte/no-reactive-functions": State.ON,
77
+ "svelte/no-reactive-literals": State.ON,
78
+ "svelte/no-svelte-internal": State.ON,
79
+ "svelte/no-unnecessary-state-wrap": State.ON,
80
+ // "svelte/no-unused-class-name": State.OFF /* incompatible: breaks if css class is located in another file; BUG: ESLint error if array empty */,
81
+ "svelte/no-unused-props": [
82
+ State.WARN,
83
+ {
84
+ checkImportedTypes: true,
85
+ },
86
+ ],
87
+ "svelte/no-unused-svelte-ignore": State.WARN,
88
+ "svelte/no-useless-children-snippet": State.WARN,
89
+ "svelte/no-useless-mustaches": State.WARN,
90
+ "svelte/prefer-const": [
91
+ State.WARN,
92
+ {
93
+ destructuring: "all",
94
+ },
95
+ ] /* same options: prefer-const */,
96
+ "svelte/prefer-destructured-store-props": State.WARN,
97
+ "svelte/prefer-writable-derived": State.WARN,
98
+ "svelte/require-each-key": State.ON,
99
+ "svelte/require-event-dispatcher-types": State.ON,
100
+ "svelte/require-optimized-style-attribute": State.ON,
101
+ "svelte/require-stores-init": State.ON,
102
+ "svelte/valid-each-key": State.ON,
103
+ // #endregion
104
+
105
+ // #region STYLE
106
+ // DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#stylistic-issues
107
+ "svelte/consistent-selector-style": [
108
+ State.WARN,
109
+ {
110
+ checkGlobal: true,
111
+ },
112
+ ],
113
+ "svelte/derived-has-same-inputs-outputs": State.ON,
114
+ // "svelte/first-attribute-linebreak": State.OFF,
115
+ // "svelte/html-closing-bracket-new-line": State.OFF,
116
+ // "svelte/html-closing-bracket-spacing": State.OFF,
117
+ // "svelte/html-quotes": State.OFF /* BUG: incompatible with object props, which should not be stringified */,
118
+ // "svelte/html-self-closing": State.OFF,
119
+ // "svelte/indent": State.OFF,
120
+ // "svelte/max-attributes-per-line": State.OFF,
121
+ // "svelte/mustache-spacing": State.OFF,
122
+ "svelte/no-extra-reactive-curlies": State.WARN,
123
+ // "svelte/no-restricted-html-elements": State.OFF,
124
+ // "svelte/no-spaces-around-equal-signs-in-attribute": State.OFF,
125
+ "svelte/prefer-class-directive": [
126
+ State.WARN,
127
+ {
128
+ prefer: "empty",
129
+ },
130
+ ],
131
+ "svelte/prefer-style-directive": State.WARN,
132
+ "svelte/require-event-prefix": State.ON,
133
+ "svelte/shorthand-attribute": State.WARN,
134
+ "svelte/shorthand-directive": State.WARN,
135
+ // "svelte/sort-attributes": State.OFF,
136
+ // "svelte/spaced-html-comment": State.OFF,
137
+ // #endregion
138
+
139
+ // #region SVELTE-KIT
140
+ // DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#svelte-kit
141
+ "svelte/no-export-load-in-svelte-module-in-kit-pages": State.ON,
142
+ "svelte/no-navigation-without-resolve": State.ON,
143
+ "svelte/valid-prop-names-in-kit-pages": State.ON,
144
+ // #endregion
145
+
146
+ // #region REQUIRED
147
+ // DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#system
148
+ "svelte/comment-directive": State.ON,
149
+ "svelte/system": State.ON,
150
+ // #endregion
151
+
152
+ //#region Future (HTML)
153
+ // DOC: https://html-eslint.org/docs/svelte/rules
154
+ // "html/svelte/class-spacing": State.OFF,
155
+ // "html/svelte/use-baseline": State.WARN,
156
+ // "html/svelte/no-obsolete-tags": State.WARN,
157
+ // "html/svelte/no-obsolete-attrs": State.WARN,
158
+ // "html/svelte/no-ineffective-attrs": State.WARN,
159
+ // "html/svelte/no-duplicate-class": State.WARN,
160
+ // "html/svelte/no-invalid-attr-value": State.ON,
161
+ //#endregion
162
+ } as const,
163
+ };
@@ -1,9 +1,275 @@
1
- import disable from "./disable";
2
- import ts from "./ts";
3
- import extend from "./extend";
4
-
5
- export default [
6
- disable,
7
- ts,
8
- extend,
9
- ];
1
+ import { State } from "../state";
2
+
3
+ export default {
4
+ rules: {
5
+ //#region DISABLE
6
+ // Handled by TypeScript compiler
7
+ "consistent-return": State.OFF /* TSLint BUT @tsc */,
8
+ "constructor-super": State.OFF,
9
+ "getter-return": State.OFF,
10
+ "no-class-assign": State.OFF,
11
+ "no-const-assign": State.OFF,
12
+ "no-dupe-args": State.OFF,
13
+ "no-dupe-class-members": State.OFF /* supports TypeScript BUT @tsc */,
14
+ "no-dupe-keys": State.OFF,
15
+ "no-func-assign": State.OFF,
16
+ "no-import-assign": State.OFF,
17
+ "no-invalid-this": State.OFF /* supports TypeScript BUT @tsc */,
18
+ "no-new-native-nonconstructor": State.OFF,
19
+ "no-obj-calls": State.OFF,
20
+ "no-redeclare": State.OFF /* TSLint BUT @tsc */,
21
+ "no-setter-return": State.OFF,
22
+ "no-this-before-super": State.OFF,
23
+ "no-undef": State.OFF,
24
+ "no-unreachable": State.OFF,
25
+ "no-unsafe-negation": State.OFF,
26
+ //#endregion
27
+
28
+ // #region EXTEND
29
+ // DOC: https://typescript-eslint.io/rules/?=extension-xdeprecated#rules
30
+ /* @OVERRIDE */ "dot-notation": State.OFF,
31
+ "ts/dot-notation": [
32
+ State.WARN,
33
+ {
34
+ // TS-only:
35
+ allowPrivateClassPropertyAccess: true,
36
+ allowProtectedClassPropertyAccess: true,
37
+ allowIndexSignaturePropertyAccess: true,
38
+ },
39
+ ],
40
+ /* @OVERRIDE */ "no-implied-eval": State.OFF,
41
+ "ts/no-implied-eval": State.ON,
42
+ // "ts/no-redeclare": State.OFF /* @tsc: (let, const, -var) */,
43
+ /* @OVERRIDE */ "no-restricted-imports": State.OFF,
44
+ // "ts/no-restricted-imports": State.OFF,
45
+ /* @OVERRIDE */ "no-unused-vars": State.OFF,
46
+ "ts/no-unused-vars": State.WARN,
47
+ /* @OVERRIDE */ "no-throw-literal": State.OFF,
48
+ "ts/only-throw-error": [
49
+ State.WARN,
50
+ {
51
+ allowThrowingAny: false,
52
+ },
53
+ ],
54
+ /* @OVERRIDE */ "prefer-destructuring": State.OFF,
55
+ // "ts/prefer-destructuring": State.OFF /* @preference: too prescriptive */,
56
+ /* @OVERRIDE */ "prefer-promise-reject-errors": State.OFF,
57
+ "ts/prefer-promise-reject-errors": [
58
+ State.WARN,
59
+ {
60
+ allowThrowingUnknown: true,
61
+ },
62
+ ],
63
+ /* @OVERRIDE */ "require-await": State.OFF,
64
+ "ts/require-await": State.ON,
65
+ // #endregion
66
+
67
+ // #region ...
68
+ // DOC: https://typescript-eslint.io/rules/?=xextension-xdeprecated#rules
69
+
70
+ // "ts/adjacent-overload-signatures": State.OFF,
71
+ // "ts/array-type": State.OFF /* @preference: ideally, I'd like to don't-care mutable arrays while requiring readonly [] syntax for immutable arrays, but there is no way to do that with the current rule options */,
72
+ "ts/await-thenable": State.ON,
73
+ "ts/ban-ts-comment": State.WARN,
74
+ "ts/ban-tslint-comment": State.WARN,
75
+ "ts/class-literal-property-style": State.WARN,
76
+ "ts/consistent-generic-constructors": State.WARN,
77
+ // "ts/consistent-indexed-object-style": State.OFF,
78
+ "ts/consistent-type-assertions": [
79
+ State.WARN,
80
+ {
81
+ arrayLiteralTypeAssertions: "never",
82
+ objectLiteralTypeAssertions: "never",
83
+ },
84
+ ],
85
+ // "ts/consistent-type-definitions": State.OFF,
86
+ "ts/consistent-type-exports": State.WARN,
87
+ "ts/consistent-type-imports": State.WARN,
88
+ // "ts/explicit-function-return-type": State.OFF,
89
+ "ts/explicit-member-accessibility": [
90
+ State.WARN,
91
+ {
92
+ overrides: {
93
+ constructors: "no-public",
94
+ },
95
+ },
96
+ ],
97
+ // "ts/explicit-module-boundary-types": State.OFF,
98
+ "ts/member-ordering": [
99
+ State.WARN,
100
+ {
101
+ "default": {
102
+ optionalityOrder: "required-first",
103
+ },
104
+ },
105
+ ],
106
+ "ts/method-signature-style": State.WARN,
107
+ // "ts/naming-convention": State.OFF,
108
+ "ts/no-array-delete": State.ON,
109
+ "ts/no-base-to-string": State.ON,
110
+ "ts/no-confusing-non-null-assertion": State.ON,
111
+ "ts/no-confusing-void-expression": State.ON,
112
+ // "ts/no-deprecated": State.OFF /* incompatible: Cannot be used with jsDocParsingMode: "none" */,
113
+ "ts/no-duplicate-enum-values": State.ON,
114
+ "ts/no-duplicate-type-constituents": State.ON,
115
+ "ts/no-dynamic-delete": State.ON,
116
+ "ts/no-empty-object-type": State.ON,
117
+ "ts/no-explicit-any": [
118
+ State.ON,
119
+ {
120
+ fixToUnknown: true,
121
+ },
122
+ ],
123
+ "ts/no-extra-non-null-assertion": State.ON,
124
+ "ts/no-extraneous-class": [
125
+ State.ON,
126
+ {
127
+ allowEmpty: true,
128
+ },
129
+ ],
130
+ "ts/no-floating-promises": [
131
+ State.ON,
132
+ {
133
+ checkThenables: true,
134
+ },
135
+ ],
136
+ "ts/no-for-in-array": State.ON,
137
+ "ts/no-import-type-side-effects": State.ON,
138
+ "ts/no-inferrable-types": State.ON,
139
+ // "ts/no-invalid-void-type": State.OFF /* @preference: I powerfully ideologically disagree with disallowing void, a valid type */,
140
+ "ts/no-meaningless-void-operator": [
141
+ State.ON,
142
+ {
143
+ checkNever: true,
144
+ },
145
+ ],
146
+ "ts/no-misused-new": State.ON,
147
+ "ts/no-misused-promises": State.ON,
148
+ "ts/no-misused-spread": State.ON,
149
+ "ts/no-mixed-enums": State.ON,
150
+ "ts/no-namespace": State.ON,
151
+ "ts/no-non-null-asserted-nullish-coalescing": State.ON,
152
+ "ts/no-non-null-asserted-optional-chain": State.ON,
153
+ // "ts/no-non-null-assertion": State.OFF,
154
+ "ts/no-redundant-type-constituents": State.ON,
155
+ // "ts/no-restricted-types": State.OFF /* @preference: no shared custom types across all projects that I wish to ban */,
156
+ "ts/no-require-imports": State.ON,
157
+ "ts/no-this-alias": State.ON,
158
+ "ts/no-unnecessary-boolean-literal-compare": State.ON,
159
+ "ts/no-unnecessary-condition": State.ON,
160
+ "ts/no-unnecessary-parameter-property-assignment": State.ON,
161
+ "ts/no-unnecessary-qualifier": State.ON,
162
+ "ts/no-unnecessary-template-expression": State.ON,
163
+ "ts/no-unnecessary-type-arguments": State.ON,
164
+ "ts/no-unnecessary-type-assertion": State.ON,
165
+ "ts/no-unnecessary-type-constraint": State.ON,
166
+ "ts/no-unnecessary-type-conversion": State.ON,
167
+ // "ts/no-unnecessary-type-parameters": State.OFF /* extremely noisy and pointless, do not ever configure again */,
168
+ "ts/no-unsafe-argument": State.ON,
169
+ "ts/no-unsafe-assignment": State.ON,
170
+ "ts/no-unsafe-call": State.ON,
171
+ "ts/no-unsafe-declaration-merging": State.ON,
172
+ // "ts/no-unsafe-enum-comparison": State.OFF,
173
+ "ts/no-unsafe-function-type": State.ON,
174
+ "ts/no-unsafe-member-access": [
175
+ State.ON,
176
+ {
177
+ allowOptionalChaining: true,
178
+ },
179
+ ],
180
+ "ts/no-unsafe-return": State.ON,
181
+ // "ts/no-unsafe-type-assertion": State.OFF,
182
+ "ts/no-unsafe-unary-minus": State.ON,
183
+ "ts/no-unused-private-class-members": State.WARN,
184
+ "ts/no-useless-default-assignment": State.WARN,
185
+ "ts/no-useless-empty-export": State.WARN,
186
+ "ts/no-wrapper-object-types": State.ON,
187
+ // "ts/non-nullable-type-assertion-style": State.OFF,
188
+ "ts/parameter-properties": [
189
+ State.WARN,
190
+ {
191
+ prefer: "parameter-property",
192
+ },
193
+ ],
194
+ "ts/prefer-as-const": State.WARN,
195
+ // "ts/prefer-enum-initializers": State.OFF,
196
+ "ts/prefer-find": State.WARN,
197
+ "ts/prefer-for-of": State.WARN,
198
+ "ts/prefer-function-type": State.WARN,
199
+ "ts/prefer-includes": State.WARN,
200
+ // "ts/prefer-literal-enum-member": State.OFF /* @preference: idk why this would be considering, maybe we should ban all variable scopes */,
201
+ "ts/prefer-namespace-keyword": State.WARN,
202
+ "ts/prefer-nullish-coalescing": [
203
+ State.WARN,
204
+ {
205
+ ignoreMixedLogicalExpressions: true,
206
+ ignorePrimitives: true,
207
+
208
+ },
209
+ ] /* @requires @tsc: strictNullChecks */,
210
+ "ts/prefer-optional-chain": [
211
+ State.WARN,
212
+ {
213
+ checkBigInt: false,
214
+ checkBoolean: false,
215
+ checkNumber: false,
216
+ checkString: false,
217
+ },
218
+ ],
219
+ "ts/prefer-readonly": State.WARN,
220
+ // "ts/prefer-readonly-parameter-types": State.OFF /* @preference: WAY too restrictive */,
221
+ "ts/prefer-reduce-type-parameter": State.WARN,
222
+ "ts/prefer-regexp-exec": State.WARN,
223
+ "ts/prefer-return-this-type": State.WARN,
224
+ "ts/prefer-string-starts-ends-with": State.WARN,
225
+ "ts/promise-function-async": State.ON,
226
+ // "ts/related-getter-setter-pairs": State.OFF,
227
+ "ts/require-array-sort-compare": State.WARN,
228
+ "ts/restrict-plus-operands": [
229
+ State.ON,
230
+ {
231
+ allowAny: false,
232
+ allowBoolean: false,
233
+ allowNullish: false,
234
+ allowRegExp: false,
235
+ },
236
+ ],
237
+ "ts/restrict-template-expressions": [
238
+ State.ON,
239
+ {
240
+ allowAny: false,
241
+ allowNullish: false,
242
+ allowRegExp: false,
243
+ },
244
+ ],
245
+ "ts/return-await": State.ON /* BUG: doc incorrectly states that this extends the DEPRECATED (since 8.46) no-return-await: https://typescript-eslint.io/rules/return-await */,
246
+ "ts/strict-boolean-expressions": [
247
+ State.ON,
248
+ {
249
+ allowNullableBoolean: true,
250
+ allowNullableEnum: true,
251
+ allowNullableNumber: true,
252
+ allowNullableString: true,
253
+ },
254
+ ] /* @requires @tsc: strictNullChecks */,
255
+ "ts/strict-void-return": State.ON,
256
+ "ts/switch-exhaustiveness-check": [
257
+ State.ON,
258
+ {
259
+ requireDefaultForNonUnion: true,
260
+ considerDefaultExhaustiveForUnions: true,
261
+ },
262
+ ],
263
+ // "ts/triple-slash-reference": State.OFF,
264
+ // "ts/typedef": State.OFF /* @tsc: noImplicitAny, strictPropertyInitialization */,
265
+ "ts/unbound-method": [
266
+ State.ON,
267
+ {
268
+ ignoreStatic: true,
269
+ },
270
+ ],
271
+ // "ts/unified-signatures": State.OFF /* BUG: https://github.com/typescript-eslint/typescript-eslint/issues/11732 */,
272
+ "ts/use-unknown-in-catch-callback-variable": State.ON,
273
+ // #endregion
274
+ } as const,
275
+ };
@@ -1,58 +1,56 @@
1
1
  import { State } from "../state";
2
2
 
3
3
  // DOC: https://ota-meshi.github.io/eslint-plugin-yml/rules/#yaml-rules
4
- export default [
5
- {
6
- rules: {
7
- //#region Custom
8
- "yml/block-mapping-colon-indicator-newline": State.WARN,
9
- "yml/block-mapping-question-indicator-newline": State.WARN,
10
- "yml/block-mapping": State.WARN,
11
- "yml/block-sequence-hyphen-indicator-newline": State.WARN,
12
- "yml/block-sequence": State.WARN,
13
- // "yml/file-extension": State.OFF,
14
- // "yml/indent": State.OFF,
15
- // "yml/key-name-casing": State.OFF,
16
- // "yml/no-empty-document": State.OFF,
17
- "yml/no-empty-key": State.WARN,
18
- // "yml/no-empty-mapping-value": State.OFF /* @preference: breaks Home Assistant integration enablement shorthand style (would require a `{}` after) */,
19
- "yml/no-empty-sequence-entry": State.WARN,
20
- "yml/no-tab-indent": State.WARN,
21
- // "yml/no-trailing-zeros": State.OFF,
22
- // "yml/plain-scalar": State.OFF /* @CONFLICT: breaks any holdovers from YAML 1.1 or non-YAML 1.2 core implementers */,
23
- // "yml/quotes": State.OFF,
24
- "yml/require-string-key": State.WARN,
25
- // "yml/sort-keys": State.OFF,
26
- // "yml/sort-sequence-values": State.OFF,
27
- // "yml/vue-custom-block/no-parsing-error": State.OFF,
28
- //#endregion
4
+ export default {
5
+ rules: {
6
+ //#region Custom
7
+ "yml/block-mapping-colon-indicator-newline": State.WARN,
8
+ "yml/block-mapping-question-indicator-newline": State.WARN,
9
+ "yml/block-mapping": State.WARN,
10
+ "yml/block-sequence-hyphen-indicator-newline": State.WARN,
11
+ "yml/block-sequence": State.WARN,
12
+ // "yml/file-extension": State.OFF,
13
+ // "yml/indent": State.OFF,
14
+ // "yml/key-name-casing": State.OFF,
15
+ // "yml/no-empty-document": State.OFF,
16
+ "yml/no-empty-key": State.WARN,
17
+ // "yml/no-empty-mapping-value": State.OFF /* @preference: breaks Home Assistant integration enablement shorthand style (would require a `{}` after) */,
18
+ "yml/no-empty-sequence-entry": State.WARN,
19
+ "yml/no-tab-indent": State.WARN,
20
+ // "yml/no-trailing-zeros": State.OFF,
21
+ // "yml/plain-scalar": State.OFF /* @CONFLICT: breaks any holdovers from YAML 1.1 or non-YAML 1.2 core implementers */,
22
+ // "yml/quotes": State.OFF,
23
+ "yml/require-string-key": State.WARN,
24
+ // "yml/sort-keys": State.OFF,
25
+ // "yml/sort-sequence-values": State.OFF,
26
+ // "yml/vue-custom-block/no-parsing-error": State.OFF,
27
+ //#endregion
29
28
 
30
- //#region Extension
31
- // "yml/flow-mapping-curly-newline": State.OFF,
32
- // "yml/flow-mapping-curly-spacing": State.OFF,
33
- // "yml/flow-sequence-bracket-newline": State.OFF,
34
- // "yml/flow-sequence-bracket-spacing": State.OFF,
35
- // "yml/key-spacing": State.OFF,
36
- "yml/no-irregular-whitespace": State.ON,
37
- // "yml/no-multiple-empty-lines": State.OFF,
38
- "yml/spaced-comment": [
39
- State.WARN,
40
- "always",
41
- {
42
- exceptions: ["#"],
43
- markers: [
44
- "-",
45
- "#",
46
- "##",
47
- "###",
48
- "####",
49
- "#####",
50
- "region",
51
- "endregion",
52
- ],
53
- },
54
- ],
55
- //#endregion
56
- } as const,
57
- },
58
- ];
29
+ //#region Extension
30
+ // "yml/flow-mapping-curly-newline": State.OFF,
31
+ // "yml/flow-mapping-curly-spacing": State.OFF,
32
+ // "yml/flow-sequence-bracket-newline": State.OFF,
33
+ // "yml/flow-sequence-bracket-spacing": State.OFF,
34
+ // "yml/key-spacing": State.OFF,
35
+ "yml/no-irregular-whitespace": State.ON,
36
+ // "yml/no-multiple-empty-lines": State.OFF,
37
+ "yml/spaced-comment": [
38
+ State.WARN,
39
+ "always",
40
+ {
41
+ exceptions: ["#"],
42
+ markers: [
43
+ "-",
44
+ "#",
45
+ "##",
46
+ "###",
47
+ "####",
48
+ "#####",
49
+ "region",
50
+ "endregion",
51
+ ],
52
+ },
53
+ ],
54
+ //#endregion
55
+ } as const,
56
+ };