@metamask/eslint-config-typescript 12.0.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 CHANGED
@@ -6,6 +6,19 @@ 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
+
18
+ ## [12.1.0]
19
+ ### Changed
20
+ - Add support for typescript 5.0.x, 5.1.x ([#288](https://github.com/MetaMask/eslint-config/pull/288))
21
+
9
22
  ## [12.0.0]
10
23
  ### Added
11
24
  - **BREAKING:** Add rule to enforce generic parameters have a length of at least 3 characters ([#292](https://github.com/MetaMask/eslint-config/pull/292))
@@ -47,7 +60,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
47
60
  - There are two new rules:
48
61
  - [`@typescript-eslint/no-loss-of-precision`](https://typescript-eslint.io/rules/no-loss-of-precision)
49
62
  - [`@typescript-eslint/no-unnecessary-type-constraint`](https://typescript-eslint.io/rules/no-unnecessary-type-constraint).
50
- - **BREAKING:** Update minimium Node.js version to v14 ([#225](https://github.com/MetaMask/eslint-config/pull/225))
63
+ - **BREAKING:** Update minimum Node.js version to v14 ([#225](https://github.com/MetaMask/eslint-config/pull/225))
51
64
  - **BREAKING:** Forbid TypeScript interfaces ([#216](https://github.com/MetaMask/eslint-config/pull/216))
52
65
  - Ignore rest siblings for `no-unused-vars` ([#213](https://github.com/MetaMask/eslint-config/pull/213))
53
66
  - This makes the `no-unused-vars` rule more permissive
@@ -103,7 +116,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
103
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`.
104
117
  - Update `eslint` and other ESLint peer dependencies ([#151](https://github.com/MetaMask/eslint-config/pull/151))
105
118
 
106
- [Unreleased]: https://github.com/MetaMask/eslint-config/compare/v12.0.0...HEAD
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
121
+ [12.1.0]: https://github.com/MetaMask/eslint-config/compare/v12.0.0...v12.1.0
107
122
  [12.0.0]: https://github.com/MetaMask/eslint-config/compare/v11.1.0...v12.0.0
108
123
  [11.1.0]: https://github.com/MetaMask/eslint-config/compare/v11.0.2...v11.1.0
109
124
  [11.0.2]: https://github.com/MetaMask/eslint-config/compare/v11.0.0...v11.0.2
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.0.0 \
10
- @metamask/eslint-config-typescript@^12.0.0 \
11
- @typescript-eslint/eslint-plugin@^5.42.1 \
12
- @typescript-eslint/parser@^5.42.1 \
13
- eslint@^8.27.0 \
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@^2.26.0 \
16
- eslint-plugin-jsdoc@^39.6.2 \
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": "12.0.0",
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.0.0",
27
- "@metamask/eslint-config": "^12.0.0",
28
- "@typescript-eslint/eslint-plugin": "^5.42.1",
29
- "@typescript-eslint/parser": "^5.42.1",
30
- "eslint": "^8.27.0",
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": "^2.26.0",
33
- "eslint-plugin-jsdoc": "^39.6.2",
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": "~4.8.4"
36
+ "typescript": "~5.5.4"
37
37
  },
38
38
  "peerDependencies": {
39
- "@metamask/eslint-config": "^12.0.0",
40
- "@typescript-eslint/eslint-plugin": "^5.42.1",
41
- "@typescript-eslint/parser": "^5.42.1",
42
- "eslint": "^8.27.0",
43
- "typescript": "~4.8.4"
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": ">=14.0.0"
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-requiring-type-checking',
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/no-parameter-properties': 'error',
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 },