@eslinted/defaults 17.0.0-rc.0 → 17.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.
@@ -5,7 +5,7 @@ export default {
5
5
  name: "enable/extension",
6
6
  rules: {
7
7
  /* @OVERRIDE */ "dot-notation": State.OFF,
8
- "@typescript-eslint/dot-notation": [
8
+ "ts/dot-notation": [
9
9
  State.ON,
10
10
  {
11
11
  // TS-only:
@@ -15,21 +15,21 @@ export default {
15
15
  },
16
16
  ],
17
17
  /* @OVERRIDE */ "no-implied-eval": State.OFF,
18
- "@typescript-eslint/no-implied-eval": State.ON,
19
- // "@typescript-eslint/no-redeclare": State.OFF /* tsc (let, const, -var) */,
18
+ "ts/no-implied-eval": State.ON,
19
+ // "ts/no-redeclare": State.OFF /* tsc (let, const, -var) */,
20
20
  /* @OVERRIDE */ "no-restricted-imports": State.OFF,
21
- // "@typescript-eslint/no-restricted-imports": State.OFF /* preference */,
21
+ // "ts/no-restricted-imports": State.OFF /* preference */,
22
22
  /* @OVERRIDE */ "no-unused-vars": State.OFF,
23
- "@typescript-eslint/no-unused-vars": State.ON,
23
+ "ts/no-unused-vars": State.ON,
24
24
  /* @OVERRIDE */ "no-throw-literal": State.OFF,
25
- "@typescript-eslint/only-throw-error": [
25
+ "ts/only-throw-error": [
26
26
  State.ON,
27
27
  {
28
28
  allowThrowingAny: false,
29
29
  },
30
30
  ],
31
31
  /* @OVERRIDE */ "prefer-destructuring": State.OFF,
32
- "@typescript-eslint/prefer-destructuring": [
32
+ "ts/prefer-destructuring": [
33
33
  State.ON,
34
34
  {
35
35
  AssignmentExpression: {
@@ -39,13 +39,13 @@ export default {
39
39
  },
40
40
  ],
41
41
  /* @OVERRIDE */ "prefer-promise-reject-errors": State.OFF,
42
- "@typescript-eslint/prefer-promise-reject-errors": [
42
+ "ts/prefer-promise-reject-errors": [
43
43
  State.ON,
44
44
  {
45
45
  allowThrowingUnknown: true,
46
46
  },
47
47
  ],
48
48
  /* @OVERRIDE */ "require-await": State.OFF,
49
- "@typescript-eslint/require-await": State.ON,
49
+ "ts/require-await": State.ON,
50
50
  } as const,
51
51
  };
@@ -4,26 +4,26 @@ import { State } from "../state";
4
4
  export default {
5
5
  name: "enable",
6
6
  rules: {
7
- // "@typescript-eslint/adjacent-overload-signatures": State.OFF,
8
- // "@typescript-eslint/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 */,
9
- "@typescript-eslint/await-thenable": State.ON,
10
- "@typescript-eslint/ban-ts-comment": State.ON,
11
- "@typescript-eslint/ban-tslint-comment": State.ON,
12
- "@typescript-eslint/class-literal-property-style": State.ON,
13
- "@typescript-eslint/consistent-generic-constructors": State.ON,
14
- "@typescript-eslint/consistent-indexed-object-style": State.ON,
15
- "@typescript-eslint/consistent-type-assertions": [
7
+ // "ts/adjacent-overload-signatures": State.OFF,
8
+ // "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 */,
9
+ "ts/await-thenable": State.ON,
10
+ "ts/ban-ts-comment": State.ON,
11
+ "ts/ban-tslint-comment": State.ON,
12
+ "ts/class-literal-property-style": State.ON,
13
+ "ts/consistent-generic-constructors": State.ON,
14
+ "ts/consistent-indexed-object-style": State.ON,
15
+ "ts/consistent-type-assertions": [
16
16
  State.ON,
17
17
  {
18
18
  arrayLiteralTypeAssertions: "never",
19
19
  objectLiteralTypeAssertions: "never",
20
20
  },
21
21
  ],
22
- // "@typescript-eslint/consistent-type-definitions": State.OFF,
23
- "@typescript-eslint/consistent-type-exports": State.ON,
24
- "@typescript-eslint/consistent-type-imports": State.ON,
25
- // "@typescript-eslint/explicit-function-return-type": State.OFF,
26
- "@typescript-eslint/explicit-member-accessibility": [
22
+ // "ts/consistent-type-definitions": State.OFF,
23
+ "ts/consistent-type-exports": State.ON,
24
+ "ts/consistent-type-imports": State.ON,
25
+ // "ts/explicit-function-return-type": State.OFF,
26
+ "ts/explicit-member-accessibility": [
27
27
  State.ON,
28
28
  {
29
29
  overrides: {
@@ -31,8 +31,8 @@ export default {
31
31
  },
32
32
  },
33
33
  ],
34
- // "@typescript-eslint/explicit-module-boundary-types": State.OFF,
35
- "@typescript-eslint/member-ordering": [
34
+ // "ts/explicit-module-boundary-types": State.OFF,
35
+ "ts/member-ordering": [
36
36
  State.ON,
37
37
  {
38
38
  "default": {
@@ -40,112 +40,112 @@ export default {
40
40
  },
41
41
  },
42
42
  ],
43
- "@typescript-eslint/method-signature-style": State.ON,
44
- // "@typescript-eslint/naming-convention": State.OFF,
45
- "@typescript-eslint/no-array-delete": State.ON,
46
- "@typescript-eslint/no-base-to-string": State.ON,
47
- "@typescript-eslint/no-confusing-non-null-assertion": State.ON,
48
- "@typescript-eslint/no-confusing-void-expression": State.ON,
49
- // "@typescript-eslint/no-deprecated": State.OFF /* incompatible: Cannot be used with jsDocParsingMode: "none" */,
50
- "@typescript-eslint/no-duplicate-enum-values": State.ON,
51
- "@typescript-eslint/no-duplicate-type-constituents": State.ON,
52
- "@typescript-eslint/no-dynamic-delete": State.ON,
53
- "@typescript-eslint/no-empty-object-type": State.ON,
54
- "@typescript-eslint/no-explicit-any": [
43
+ "ts/method-signature-style": State.ON,
44
+ // "ts/naming-convention": State.OFF,
45
+ "ts/no-array-delete": State.ON,
46
+ "ts/no-base-to-string": State.ON,
47
+ "ts/no-confusing-non-null-assertion": State.ON,
48
+ "ts/no-confusing-void-expression": State.ON,
49
+ // "ts/no-deprecated": State.OFF /* incompatible: Cannot be used with jsDocParsingMode: "none" */,
50
+ "ts/no-duplicate-enum-values": State.ON,
51
+ "ts/no-duplicate-type-constituents": State.ON,
52
+ "ts/no-dynamic-delete": State.ON,
53
+ "ts/no-empty-object-type": State.ON,
54
+ "ts/no-explicit-any": [
55
55
  State.ON,
56
56
  {
57
57
  fixToUnknown: true,
58
58
  },
59
59
  ],
60
- "@typescript-eslint/no-extra-non-null-assertion": State.ON,
61
- "@typescript-eslint/no-extraneous-class": [
60
+ "ts/no-extra-non-null-assertion": State.ON,
61
+ "ts/no-extraneous-class": [
62
62
  State.ON,
63
63
  {
64
64
  allowEmpty: true,
65
65
  },
66
66
  ],
67
- "@typescript-eslint/no-floating-promises": [
67
+ "ts/no-floating-promises": [
68
68
  State.ON,
69
69
  {
70
70
  checkThenables: true,
71
71
  },
72
72
  ],
73
- "@typescript-eslint/no-for-in-array": State.ON,
74
- "@typescript-eslint/no-import-type-side-effects": State.ON,
75
- "@typescript-eslint/no-inferrable-types": State.ON,
76
- // "@typescript-eslint/no-invalid-void-type": State.OFF /* preference - I powerfully ideologically disagree with disallowing void, a valid type */,
77
- "@typescript-eslint/no-meaningless-void-operator": [
73
+ "ts/no-for-in-array": State.ON,
74
+ "ts/no-import-type-side-effects": State.ON,
75
+ "ts/no-inferrable-types": State.ON,
76
+ // "ts/no-invalid-void-type": State.OFF /* preference - I powerfully ideologically disagree with disallowing void, a valid type */,
77
+ "ts/no-meaningless-void-operator": [
78
78
  State.ON,
79
79
  {
80
80
  checkNever: true,
81
81
  },
82
82
  ],
83
- "@typescript-eslint/no-misused-new": State.ON,
84
- "@typescript-eslint/no-misused-promises": State.ON,
85
- "@typescript-eslint/no-misused-spread": State.ON,
86
- "@typescript-eslint/no-mixed-enums": State.ON,
87
- // "@typescript-eslint/no-namespace": State.OFF,
88
- "@typescript-eslint/no-non-null-asserted-nullish-coalescing": State.ON,
89
- "@typescript-eslint/no-non-null-asserted-optional-chain": State.ON,
90
- // "@typescript-eslint/no-non-null-assertion": State.OFF /* preference */,
91
- "@typescript-eslint/no-redundant-type-constituents": State.ON,
92
- // "@typescript-eslint/no-restricted-types": State.OFF /* preference - no shared custom types across all projects that I wish to ban */,
93
- "@typescript-eslint/no-require-imports": State.ON,
94
- "@typescript-eslint/no-this-alias": State.ON,
95
- "@typescript-eslint/no-unnecessary-boolean-literal-compare": State.ON,
96
- "@typescript-eslint/no-unnecessary-condition": State.ON,
97
- "@typescript-eslint/no-unnecessary-parameter-property-assignment": State.ON,
98
- "@typescript-eslint/no-unnecessary-qualifier": State.ON,
99
- "@typescript-eslint/no-unnecessary-template-expression": State.ON,
100
- "@typescript-eslint/no-unnecessary-type-arguments": State.ON,
101
- "@typescript-eslint/no-unnecessary-type-assertion": State.ON,
102
- "@typescript-eslint/no-unnecessary-type-constraint": State.ON,
103
- "@typescript-eslint/no-unnecessary-type-conversion": State.ON,
104
- "@typescript-eslint/no-unnecessary-type-parameters": State.ON,
105
- "@typescript-eslint/no-unsafe-argument": State.ON,
106
- "@typescript-eslint/no-unsafe-assignment": State.ON,
107
- "@typescript-eslint/no-unsafe-call": State.ON,
108
- "@typescript-eslint/no-unsafe-declaration-merging": State.ON,
109
- "@typescript-eslint/no-unsafe-enum-comparison": State.ON,
110
- "@typescript-eslint/no-unsafe-function-type": State.ON,
111
- "@typescript-eslint/no-unsafe-member-access": [
83
+ "ts/no-misused-new": State.ON,
84
+ "ts/no-misused-promises": State.ON,
85
+ "ts/no-misused-spread": State.ON,
86
+ "ts/no-mixed-enums": State.ON,
87
+ // "ts/no-namespace": State.OFF,
88
+ "ts/no-non-null-asserted-nullish-coalescing": State.ON,
89
+ "ts/no-non-null-asserted-optional-chain": State.ON,
90
+ // "ts/no-non-null-assertion": State.OFF /* preference */,
91
+ "ts/no-redundant-type-constituents": State.ON,
92
+ // "ts/no-restricted-types": State.OFF /* preference - no shared custom types across all projects that I wish to ban */,
93
+ "ts/no-require-imports": State.ON,
94
+ "ts/no-this-alias": State.ON,
95
+ "ts/no-unnecessary-boolean-literal-compare": State.ON,
96
+ "ts/no-unnecessary-condition": State.ON,
97
+ "ts/no-unnecessary-parameter-property-assignment": State.ON,
98
+ "ts/no-unnecessary-qualifier": State.ON,
99
+ "ts/no-unnecessary-template-expression": State.ON,
100
+ "ts/no-unnecessary-type-arguments": State.ON,
101
+ "ts/no-unnecessary-type-assertion": State.ON,
102
+ "ts/no-unnecessary-type-constraint": State.ON,
103
+ "ts/no-unnecessary-type-conversion": State.ON,
104
+ "ts/no-unnecessary-type-parameters": State.ON,
105
+ "ts/no-unsafe-argument": State.ON,
106
+ "ts/no-unsafe-assignment": State.ON,
107
+ "ts/no-unsafe-call": State.ON,
108
+ "ts/no-unsafe-declaration-merging": State.ON,
109
+ "ts/no-unsafe-enum-comparison": State.ON,
110
+ "ts/no-unsafe-function-type": State.ON,
111
+ "ts/no-unsafe-member-access": [
112
112
  State.ON,
113
113
  {
114
114
  allowOptionalChaining: true,
115
115
  },
116
116
  ],
117
- "@typescript-eslint/no-unsafe-return": State.ON,
118
- // "@typescript-eslint/no-unsafe-type-assertion": State.OFF,
119
- "@typescript-eslint/no-unsafe-unary-minus": State.ON,
120
- "@typescript-eslint/no-useless-empty-export": State.ON,
121
- "@typescript-eslint/no-wrapper-object-types": State.ON,
122
- // "@typescript-eslint/non-nullable-type-assertion-style": State.OFF /* preference */,
123
- "@typescript-eslint/parameter-properties": [
117
+ "ts/no-unsafe-return": State.ON,
118
+ // "ts/no-unsafe-type-assertion": State.OFF,
119
+ "ts/no-unsafe-unary-minus": State.ON,
120
+ "ts/no-useless-empty-export": State.ON,
121
+ "ts/no-wrapper-object-types": State.ON,
122
+ // "ts/non-nullable-type-assertion-style": State.OFF /* preference */,
123
+ "ts/parameter-properties": [
124
124
  State.ON,
125
125
  {
126
126
  prefer: "parameter-property" /* parameter-property | @default class-property */,
127
127
  },
128
128
  ],
129
- "@typescript-eslint/prefer-as-const": State.ON,
130
- // "@typescript-eslint/prefer-enum-initializers": State.OFF /* preference */,
131
- "@typescript-eslint/prefer-find": State.ON,
132
- "@typescript-eslint/prefer-for-of": State.ON,
133
- "@typescript-eslint/prefer-function-type": State.ON,
134
- "@typescript-eslint/prefer-includes": State.ON,
135
- "@typescript-eslint/prefer-literal-enum-member": State.ON,
136
- "@typescript-eslint/prefer-namespace-keyword": State.ON,
137
- "@typescript-eslint/prefer-nullish-coalescing": State.ON /* requires tsconfig: strictNullChecks */,
138
- "@typescript-eslint/prefer-optional-chain": State.ON,
139
- "@typescript-eslint/prefer-readonly": State.ON,
140
- // "@typescript-eslint/prefer-readonly-parameter-types": State.OFF /* preference - WAY too restrictive */,
141
- "@typescript-eslint/prefer-reduce-type-parameter": State.ON,
142
- "@typescript-eslint/prefer-regexp-exec": State.ON,
143
- "@typescript-eslint/prefer-return-this-type": State.ON,
144
- "@typescript-eslint/prefer-string-starts-ends-with": State.ON,
145
- "@typescript-eslint/promise-function-async": State.ON,
146
- "@typescript-eslint/related-getter-setter-pairs": State.ON,
147
- "@typescript-eslint/require-array-sort-compare": State.ON,
148
- "@typescript-eslint/restrict-plus-operands": [
129
+ "ts/prefer-as-const": State.ON,
130
+ // "ts/prefer-enum-initializers": State.OFF /* preference */,
131
+ "ts/prefer-find": State.ON,
132
+ "ts/prefer-for-of": State.ON,
133
+ "ts/prefer-function-type": State.ON,
134
+ "ts/prefer-includes": State.ON,
135
+ "ts/prefer-literal-enum-member": State.ON,
136
+ "ts/prefer-namespace-keyword": State.ON,
137
+ "ts/prefer-nullish-coalescing": State.ON /* requires tsconfig: strictNullChecks */,
138
+ "ts/prefer-optional-chain": State.ON,
139
+ "ts/prefer-readonly": State.ON,
140
+ // "ts/prefer-readonly-parameter-types": State.OFF /* preference - WAY too restrictive */,
141
+ "ts/prefer-reduce-type-parameter": State.ON,
142
+ "ts/prefer-regexp-exec": State.ON,
143
+ "ts/prefer-return-this-type": State.ON,
144
+ "ts/prefer-string-starts-ends-with": State.ON,
145
+ "ts/promise-function-async": State.ON,
146
+ "ts/related-getter-setter-pairs": State.ON,
147
+ "ts/require-array-sort-compare": State.ON,
148
+ "ts/restrict-plus-operands": [
149
149
  State.ON,
150
150
  {
151
151
  allowAny: false,
@@ -155,7 +155,7 @@ export default {
155
155
  allowRegExp: false,
156
156
  },
157
157
  ],
158
- "@typescript-eslint/restrict-template-expressions": [
158
+ "ts/restrict-template-expressions": [
159
159
  State.ON,
160
160
  {
161
161
  allowNullish: false,
@@ -163,19 +163,19 @@ export default {
163
163
  allowRegExp: false,
164
164
  },
165
165
  ],
166
- "@typescript-eslint/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 */,
167
- "@typescript-eslint/strict-boolean-expressions": [
166
+ "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 */,
167
+ "ts/strict-boolean-expressions": [
168
168
  State.ON,
169
169
  {
170
170
  allowNullableObject: false,
171
171
  allowString: false,
172
172
  },
173
173
  ], /* requires tsconfig: strictNullChecks */
174
- "@typescript-eslint/switch-exhaustiveness-check": State.ON,
175
- // "@typescript-eslint/triple-slash-reference": State.OFF /* preference */,
176
- // "@typescript-eslint/typedef": State.OFF /* tsconfig: { noImplicitAny, strictPropertyInitialization } */,
177
- "@typescript-eslint/unbound-method": State.ON,
178
- "@typescript-eslint/unified-signatures": State.ON,
179
- "@typescript-eslint/use-unknown-in-catch-callback-variable": State.ON,
174
+ "ts/switch-exhaustiveness-check": State.ON,
175
+ // "ts/triple-slash-reference": State.OFF /* preference */,
176
+ // "ts/typedef": State.OFF /* tsconfig: { noImplicitAny, strictPropertyInitialization } */,
177
+ "ts/unbound-method": State.ON,
178
+ "ts/unified-signatures": State.ON,
179
+ "ts/use-unknown-in-catch-callback-variable": State.ON,
180
180
  } as const,
181
181
  };
@@ -16,7 +16,7 @@ export default {
16
16
  State.ON,
17
17
  "always",
18
18
  ] /* MUST match jsonc/object-curly-spacing */,
19
- "yml/flow-sequence-bracket-newline": State.ON /* @OVERRIDE jsonc/array-bracket-newline, instead -> MUST match its parent: @stylistic/array-bracket-newline */,
19
+ "yml/flow-sequence-bracket-newline": State.ON /* @OVERRIDE jsonc/array-bracket-newline, instead -> MUST match its parent: stylistic/array-bracket-newline */,
20
20
  "yml/flow-sequence-bracket-spacing": State.ON /* MUST match jsonc/array-bracket-spacing */,
21
21
  "yml/key-spacing": State.ON /* MUST match jsonc/key-spacing */,
22
22
  "yml/no-irregular-whitespace": State.ON,
@@ -27,7 +27,7 @@ export default {
27
27
  maxBOF: 0,
28
28
  maxEOF: 0 /* INFO: auto-fix still keeps final line-break (eol character) at EOF even though unlike `stylistic`, `yml` does not have `eol-last` */,
29
29
  },
30
- ] /* MUST match @stylistic/no-multiple-empty-lines */,
30
+ ] /* MUST match stylistic/no-multiple-empty-lines */,
31
31
  "yml/spaced-comment": [
32
32
  State.ON,
33
33
  "always",
@@ -44,6 +44,6 @@ export default {
44
44
  "endregion",
45
45
  ],
46
46
  },
47
- ] /* @OVERRIDE @stylistic/spaced-comment */,
47
+ ] /* @OVERRIDE stylistic/spaced-comment */,
48
48
  } as const,
49
49
  };