@metamask/eslint-config-typescript 12.1.0 → 13.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.
- package/CHANGELOG.md +12 -2
- package/README.md +7 -7
- package/package.json +15 -15
- package/src/index.js +5 -12
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [13.0.0]
|
|
10
|
+
### Changed
|
|
11
|
+
- **BREAKING**: Bump TypeScript to v5.5 ([#364](https://github.com/MetaMask/eslint-config/pull/364))
|
|
12
|
+
- Also bump relevant `@typescript-eslint` packages.
|
|
13
|
+
- **BREAKING**: Replace `eslint-plugin-import` with `eslint-plugin-import-x` ([#366](https://github.com/MetaMask/eslint-config/pull/366))
|
|
14
|
+
- **BREAKING**: Bump all ESLint dependencies ([#351](https://github.com/MetaMask/eslint-config/pull/351))
|
|
15
|
+
- Bumps all ESLint dependencies to the latest version compatible with Node.js 16.
|
|
16
|
+
- **BREAKING**: Bump minimum Node.js version from 14 to 16 ([#332](https://github.com/MetaMask/eslint-config/pull/332), [#339](https://github.com/MetaMask/eslint-config/pull/339))
|
|
17
|
+
|
|
9
18
|
## [12.1.0]
|
|
10
19
|
### Changed
|
|
11
20
|
- Add support for typescript 5.0.x, 5.1.x ([#288](https://github.com/MetaMask/eslint-config/pull/288))
|
|
@@ -51,7 +60,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
51
60
|
- There are two new rules:
|
|
52
61
|
- [`@typescript-eslint/no-loss-of-precision`](https://typescript-eslint.io/rules/no-loss-of-precision)
|
|
53
62
|
- [`@typescript-eslint/no-unnecessary-type-constraint`](https://typescript-eslint.io/rules/no-unnecessary-type-constraint).
|
|
54
|
-
- **BREAKING:** Update
|
|
63
|
+
- **BREAKING:** Update minimum Node.js version to v14 ([#225](https://github.com/MetaMask/eslint-config/pull/225))
|
|
55
64
|
- **BREAKING:** Forbid TypeScript interfaces ([#216](https://github.com/MetaMask/eslint-config/pull/216))
|
|
56
65
|
- Ignore rest siblings for `no-unused-vars` ([#213](https://github.com/MetaMask/eslint-config/pull/213))
|
|
57
66
|
- This makes the `no-unused-vars` rule more permissive
|
|
@@ -107,7 +116,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
107
116
|
- 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`.
|
|
108
117
|
- Update `eslint` and other ESLint peer dependencies ([#151](https://github.com/MetaMask/eslint-config/pull/151))
|
|
109
118
|
|
|
110
|
-
[Unreleased]: https://github.com/MetaMask/eslint-config/compare/
|
|
119
|
+
[Unreleased]: https://github.com/MetaMask/eslint-config/compare/v13.0.0...HEAD
|
|
120
|
+
[13.0.0]: https://github.com/MetaMask/eslint-config/compare/v12.1.0...v13.0.0
|
|
111
121
|
[12.1.0]: https://github.com/MetaMask/eslint-config/compare/v12.0.0...v12.1.0
|
|
112
122
|
[12.0.0]: https://github.com/MetaMask/eslint-config/compare/v11.1.0...v12.0.0
|
|
113
123
|
[11.1.0]: https://github.com/MetaMask/eslint-config/compare/v11.0.2...v11.1.0
|
package/README.md
CHANGED
|
@@ -6,14 +6,14 @@ MetaMask's [TypeScript](https://www.typescriptlang.org) ESLint configuration.
|
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
yarn add --dev \
|
|
9
|
-
@metamask/eslint-config@^12.
|
|
10
|
-
@metamask/eslint-config-typescript@^12.
|
|
11
|
-
@typescript-eslint/eslint-plugin@^
|
|
12
|
-
@typescript-eslint/parser@^
|
|
13
|
-
eslint@^8.
|
|
9
|
+
@metamask/eslint-config@^12.2.0 \
|
|
10
|
+
@metamask/eslint-config-typescript@^12.1.0 \
|
|
11
|
+
@typescript-eslint/eslint-plugin@^6.21.0 \
|
|
12
|
+
@typescript-eslint/parser@^6.21.0 \
|
|
13
|
+
eslint@^8.57.0 \
|
|
14
14
|
eslint-config-prettier@^8.5.0 \
|
|
15
|
-
eslint-plugin-import@^
|
|
16
|
-
eslint-plugin-jsdoc@^
|
|
15
|
+
eslint-plugin-import-x@^0.5.1 \
|
|
16
|
+
eslint-plugin-jsdoc@^47.0.2 \
|
|
17
17
|
eslint-plugin-prettier@^4.2.1 \
|
|
18
18
|
eslint-plugin-promise@^6.1.1 \
|
|
19
19
|
prettier@^2.7.1
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask/eslint-config-typescript",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.0",
|
|
4
4
|
"description": "Shareable MetaMask ESLint config for TypeScript.",
|
|
5
5
|
"homepage": "https://github.com/MetaMask/eslint-config#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -23,27 +23,27 @@
|
|
|
23
23
|
"test": "eslint ."
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@metamask/auto-changelog": "^3.
|
|
27
|
-
"@metamask/eslint-config": "^
|
|
28
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
29
|
-
"@typescript-eslint/parser": "^
|
|
30
|
-
"eslint": "^8.
|
|
26
|
+
"@metamask/auto-changelog": "^3.4.4",
|
|
27
|
+
"@metamask/eslint-config": "^13.0.0",
|
|
28
|
+
"@typescript-eslint/eslint-plugin": "^8.1.0",
|
|
29
|
+
"@typescript-eslint/parser": "^8.1.0",
|
|
30
|
+
"eslint": "^8.57.0",
|
|
31
31
|
"eslint-config-prettier": "^8.5.0",
|
|
32
|
-
"eslint-plugin-import": "^
|
|
33
|
-
"eslint-plugin-jsdoc": "^
|
|
32
|
+
"eslint-plugin-import-x": "^0.5.1",
|
|
33
|
+
"eslint-plugin-jsdoc": "^47.0.2",
|
|
34
34
|
"eslint-plugin-prettier": "^4.2.1",
|
|
35
35
|
"prettier": "^2.7.1",
|
|
36
|
-
"typescript": "
|
|
36
|
+
"typescript": "~5.5.4"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@metamask/eslint-config": "^
|
|
40
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
41
|
-
"@typescript-eslint/parser": "^
|
|
42
|
-
"eslint": "^8.
|
|
43
|
-
"typescript": "
|
|
39
|
+
"@metamask/eslint-config": "^13.0.0",
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "^8.1.0",
|
|
41
|
+
"@typescript-eslint/parser": "^8.1.0",
|
|
42
|
+
"eslint": "^8.57.0",
|
|
43
|
+
"typescript": ">=4.8.4 <5.6"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
|
-
"node": "
|
|
46
|
+
"node": "^16.20 || ^18.18 || >=20"
|
|
47
47
|
},
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public",
|
package/src/index.js
CHANGED
|
@@ -27,30 +27,27 @@ module.exports = {
|
|
|
27
27
|
|
|
28
28
|
extends: [
|
|
29
29
|
'plugin:@typescript-eslint/recommended',
|
|
30
|
-
'plugin:@typescript-eslint/recommended-
|
|
31
|
-
'plugin:import/typescript',
|
|
30
|
+
'plugin:@typescript-eslint/recommended-type-checked',
|
|
31
|
+
'plugin:import-x/typescript',
|
|
32
32
|
],
|
|
33
33
|
|
|
34
34
|
rules: {
|
|
35
|
-
// Should be disabled per Prettier
|
|
36
|
-
'@typescript-eslint/no-extra-semi': 'off',
|
|
37
|
-
|
|
38
35
|
// Handled by TypeScript
|
|
39
|
-
'import/no-unresolved': 'off',
|
|
36
|
+
'import-x/no-unresolved': 'off',
|
|
40
37
|
|
|
41
38
|
// Our rules
|
|
42
39
|
'@typescript-eslint/array-type': 'error',
|
|
43
40
|
'@typescript-eslint/consistent-type-assertions': 'error',
|
|
44
41
|
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
|
|
45
42
|
'@typescript-eslint/consistent-type-imports': 'error',
|
|
43
|
+
'@typescript-eslint/explicit-function-return-type': 'error',
|
|
46
44
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
47
45
|
'@typescript-eslint/no-namespace': [
|
|
48
46
|
'error',
|
|
49
47
|
{ allowDefinitionFiles: true },
|
|
50
48
|
],
|
|
51
49
|
'@typescript-eslint/no-non-null-assertion': 'error',
|
|
52
|
-
'@typescript-eslint/
|
|
53
|
-
'@typescript-eslint/no-require-imports': 'error',
|
|
50
|
+
'@typescript-eslint/parameter-properties': 'error',
|
|
54
51
|
'@typescript-eslint/prefer-for-of': 'error',
|
|
55
52
|
'@typescript-eslint/prefer-function-type': 'error',
|
|
56
53
|
'@typescript-eslint/prefer-optional-chain': 'error',
|
|
@@ -169,10 +166,6 @@ module.exports = {
|
|
|
169
166
|
'no-shadow': 'off',
|
|
170
167
|
'@typescript-eslint/no-shadow': ['error', { builtinGlobals: true }],
|
|
171
168
|
|
|
172
|
-
'no-throw-literal': 'off',
|
|
173
|
-
'@typescript-eslint/no-throw-literal': 'error',
|
|
174
|
-
|
|
175
|
-
'no-unused-expressions': 'off',
|
|
176
169
|
'@typescript-eslint/no-unused-expressions': [
|
|
177
170
|
'error',
|
|
178
171
|
{ allowShortCircuit: true, allowTernary: true },
|