@metamask/eslint-config-typescript 14.0.0 → 14.1.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.
- package/CHANGELOG.md +15 -1
- package/README.md +3 -2
- package/package.json +8 -8
- package/src/index.mjs +15 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [14.1.0]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Add support for TypeScript 5.6.x-5.8.x ([#395](https://github.com/MetaMask/eslint-config/pull/395))
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Disable `@typescript-eslint/no-unsafe-enum-comparison` rule ([#387](https://github.com/MetaMask/eslint-config/pull/387))
|
|
19
|
+
- Loosen `@typescript-eslint/prefer-promise-reject-errors` rule to allow rejecting with `unknown` ([#389](https://github.com/MetaMask/eslint-config/pull/389))
|
|
20
|
+
- Loosen `@typescript-eslint/naming-convention` rule to allow more formats for import names ([#388](https://github.com/MetaMask/eslint-config/pull/388))
|
|
21
|
+
- Loosen `@typescript-eslint/switch-exhaustiveness-check` rule to allow `default` case ([#390](https://github.com/MetaMask/eslint-config/pull/390))
|
|
22
|
+
|
|
10
23
|
## [14.0.0]
|
|
11
24
|
|
|
12
25
|
### Added
|
|
@@ -171,7 +184,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
171
184
|
- To continue extending this config, install this package and update your `.eslintrc.js` `extends` array to include `@metamask/eslint-config-typescript` instead of `@metamask/eslint-config/typescript`.
|
|
172
185
|
- Update `eslint` and other ESLint peer dependencies ([#151](https://github.com/MetaMask/eslint-config/pull/151))
|
|
173
186
|
|
|
174
|
-
[Unreleased]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-typescript@14.
|
|
187
|
+
[Unreleased]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-typescript@14.1.0...HEAD
|
|
188
|
+
[14.1.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-typescript@14.0.0...@metamask/eslint-config-typescript@14.1.0
|
|
175
189
|
[14.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-typescript@13.0.0...@metamask/eslint-config-typescript@14.0.0
|
|
176
190
|
[13.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-typescript@12.1.0...@metamask/eslint-config-typescript@13.0.0
|
|
177
191
|
[12.1.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-typescript@12.0.0...@metamask/eslint-config-typescript@12.1.0
|
package/README.md
CHANGED
|
@@ -14,8 +14,9 @@ yarn add --dev \
|
|
|
14
14
|
eslint-plugin-jsdoc@^50.2.4 \
|
|
15
15
|
eslint-plugin-prettier@^5.2.1 \
|
|
16
16
|
eslint-plugin-promise@^7.1.0 \
|
|
17
|
-
prettier@^3.3.3
|
|
18
|
-
typescript
|
|
17
|
+
prettier@^3.3.3 \
|
|
18
|
+
typescript@~5.8.0 \
|
|
19
|
+
typescript-eslint@^8.28.0
|
|
19
20
|
```
|
|
20
21
|
|
|
21
22
|
The order in which you extend ESLint rules matters.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask/eslint-config-typescript",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.1.0",
|
|
4
4
|
"description": "Shareable MetaMask ESLint config for TypeScript.",
|
|
5
5
|
"homepage": "https://github.com/MetaMask/eslint-config#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@jest/globals": "^29.7.0",
|
|
41
41
|
"@metamask/auto-changelog": "^3.4.4",
|
|
42
|
-
"@metamask/eslint-config": "^14.
|
|
42
|
+
"@metamask/eslint-config": "^14.1.0",
|
|
43
43
|
"eslint": "^9.11.0",
|
|
44
44
|
"eslint-config-prettier": "^9.1.0",
|
|
45
45
|
"eslint-import-resolver-typescript": "^3.6.3",
|
|
@@ -48,18 +48,18 @@
|
|
|
48
48
|
"eslint-plugin-prettier": "^5.2.1",
|
|
49
49
|
"globals": "^15.9.0",
|
|
50
50
|
"prettier": "^3.3.3",
|
|
51
|
-
"typescript": "~5.
|
|
52
|
-
"typescript-eslint": "^8.
|
|
53
|
-
"vitest": "^2.1.
|
|
51
|
+
"typescript": "~5.8.0",
|
|
52
|
+
"typescript-eslint": "^8.28.0",
|
|
53
|
+
"vitest": "^2.1.9"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@metamask/eslint-config": "^14.
|
|
56
|
+
"@metamask/eslint-config": "^14.1.0",
|
|
57
57
|
"eslint": "^9.11.0",
|
|
58
58
|
"eslint-import-resolver-typescript": "^3.6.3",
|
|
59
59
|
"eslint-plugin-import-x": "^4.3.0",
|
|
60
60
|
"eslint-plugin-jsdoc": "^50.2.4",
|
|
61
|
-
"typescript": ">=4.8.4 <5.
|
|
62
|
-
"typescript-eslint": "^8.
|
|
61
|
+
"typescript": ">=4.8.4 <5.9.0",
|
|
62
|
+
"typescript-eslint": "^8.24"
|
|
63
63
|
},
|
|
64
64
|
"engines": {
|
|
65
65
|
"node": "^18.18 || >=20"
|
package/src/index.mjs
CHANGED
|
@@ -79,6 +79,7 @@ const config = createConfig({
|
|
|
79
79
|
// Recommended rules that we do not want to use
|
|
80
80
|
'@typescript-eslint/no-duplicate-type-constituents': 'off',
|
|
81
81
|
'@typescript-eslint/no-redundant-type-constituents': 'off',
|
|
82
|
+
'@typescript-eslint/no-unsafe-enum-comparison': 'off',
|
|
82
83
|
'@typescript-eslint/require-await': 'off',
|
|
83
84
|
|
|
84
85
|
// Our rules that require type information
|
|
@@ -95,6 +96,10 @@ const config = createConfig({
|
|
|
95
96
|
selector: 'enumMember',
|
|
96
97
|
format: ['PascalCase'],
|
|
97
98
|
},
|
|
99
|
+
{
|
|
100
|
+
selector: 'import',
|
|
101
|
+
format: ['camelCase', 'PascalCase', 'snake_case', 'UPPER_CASE'],
|
|
102
|
+
},
|
|
98
103
|
{
|
|
99
104
|
selector: 'interface',
|
|
100
105
|
format: ['PascalCase'],
|
|
@@ -155,6 +160,10 @@ const config = createConfig({
|
|
|
155
160
|
'@typescript-eslint/prefer-enum-initializers': 'error',
|
|
156
161
|
'@typescript-eslint/prefer-includes': 'error',
|
|
157
162
|
'@typescript-eslint/prefer-nullish-coalescing': 'error',
|
|
163
|
+
'@typescript-eslint/prefer-promise-reject-errors': [
|
|
164
|
+
'error',
|
|
165
|
+
{ allowThrowingUnknown: true },
|
|
166
|
+
],
|
|
158
167
|
'@typescript-eslint/prefer-readonly': 'error',
|
|
159
168
|
'@typescript-eslint/prefer-reduce-type-parameter': 'error',
|
|
160
169
|
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
|
|
@@ -166,7 +175,12 @@ const config = createConfig({
|
|
|
166
175
|
allowNumber: true,
|
|
167
176
|
},
|
|
168
177
|
],
|
|
169
|
-
'@typescript-eslint/switch-exhaustiveness-check':
|
|
178
|
+
'@typescript-eslint/switch-exhaustiveness-check': [
|
|
179
|
+
'error',
|
|
180
|
+
{
|
|
181
|
+
considerDefaultExhaustiveForUnions: true,
|
|
182
|
+
},
|
|
183
|
+
],
|
|
170
184
|
|
|
171
185
|
'default-param-last': 'off',
|
|
172
186
|
'@typescript-eslint/default-param-last': 'error',
|