@metamask/eslint-config-typescript 9.0.1 → 10.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,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [10.0.0]
10
+ ### Changed
11
+ - **(BREAKING)** Update ESLint from v7 to v8 ([#233](https://github.com/MetaMask/eslint-config/pull/233))
12
+ - This is breaking because `eslint` is a `peerDependency`.
13
+ - Four new rules have been added:
14
+ - [`no-loss-of-precision`](https://eslint.org/docs/latest/rules/no-loss-of-precision)
15
+ - [`no-nonoctal-decimal-escape`](https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape)
16
+ - [`no-unsafe-optional-chaining`](https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining)
17
+ - [`no-useless-backreference`](https://eslint.org/docs/latest/rules/no-useless-backreference)
18
+ - **(BREAKING)** Update `@typescript-eslint` parser and plugin ([#230](https://github.com/MetaMask/eslint-config/pull/230))
19
+ - This is breaking because these two packages are `peerDependencies`
20
+ - There are two new rules:
21
+ - [`@typescript-eslint/no-loss-of-precision`](https://typescript-eslint.io/rules/no-loss-of-precision)
22
+ - [`@typescript-eslint/no-unnecessary-type-constraint`](https://typescript-eslint.io/rules/no-unnecessary-type-constraint).
23
+ - **(BREAKING)** Update minimium Node.js version to v14 ([#225](https://github.com/MetaMask/eslint-config/pull/225))
24
+ - **(BREAKING)** Forbid TypeScript interfaces ([#216](https://github.com/MetaMask/eslint-config/pull/216))
25
+ - Ignore rest siblings for `no-unused-vars` ([#213](https://github.com/MetaMask/eslint-config/pull/213))
26
+ - This makes the `no-unused-vars` rule more permissive
27
+
9
28
  ## [9.0.1]
10
29
  ### Changed
11
30
  - Disable `@typescript-eslint/no-throw-literal` ([#210](https://github.com/MetaMask/eslint-config/pull/210))
@@ -21,6 +40,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
21
40
  - Note: This change has been undone in v9.0.1. You can ignore this change if you're updating to v9.0.1 or greater.
22
41
 
23
42
  ## [8.0.0]
43
+ ### Changed
44
+ - ***BREAKING*** The peer dependency `@metamask/eslint-config` has been updated from v7 to v8.
24
45
 
25
46
  ## [7.0.1]
26
47
  ### Fixed
@@ -55,7 +76,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
55
76
  - 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`.
56
77
  - Update `eslint` and other ESLint peer dependencies ([#151](https://github.com/MetaMask/eslint-config/pull/151))
57
78
 
58
- [Unreleased]: https://github.com/MetaMask/eslint-config/compare/v9.0.1...HEAD
79
+ [Unreleased]: https://github.com/MetaMask/eslint-config/compare/v10.0.0...HEAD
80
+ [10.0.0]: https://github.com/MetaMask/eslint-config/compare/v9.0.1...v10.0.0
59
81
  [9.0.1]: https://github.com/MetaMask/eslint-config/compare/v9.0.0...v9.0.1
60
82
  [9.0.0]: https://github.com/MetaMask/eslint-config/compare/v8.0.0...v9.0.0
61
83
  [8.0.0]: https://github.com/MetaMask/eslint-config/compare/v7.0.1...v8.0.0
package/README.md CHANGED
@@ -8,12 +8,12 @@ MetaMask's [TypeScript](https://www.typescriptlang.org) ESLint configuration.
8
8
  yarn add --dev \
9
9
  @metamask/eslint-config@^9.0.0 \
10
10
  @metamask/eslint-config-typescript@^9.0.1 \
11
- @typescript-eslint/eslint-plugin@^4.20.0 \
12
- @typescript-eslint/parser@^4.20.0 \
11
+ @typescript-eslint/eslint-plugin@^5.33.0 \
12
+ @typescript-eslint/parser@^5.33.0 \
13
13
  eslint@^7.23.0 \
14
14
  eslint-config-prettier@^8.1.0 \
15
15
  eslint-plugin-import@^2.22.1 \
16
- eslint-plugin-jsdoc@^36.1.0 \
16
+ eslint-plugin-jsdoc@^39.2.9 \
17
17
  eslint-plugin-prettier@^3.3.1 \
18
18
  prettier@^2.2.1
19
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask/eslint-config-typescript",
3
- "version": "9.0.1",
3
+ "version": "10.0.0",
4
4
  "description": "Shareable MetaMask ESLint config for TypeScript.",
5
5
  "main": "src/index.js",
6
6
  "publishConfig": {
@@ -11,7 +11,7 @@
11
11
  "src/"
12
12
  ],
13
13
  "engines": {
14
- "node": ">=12.0.0"
14
+ "node": ">=14.0.0"
15
15
  },
16
16
  "scripts": {
17
17
  "test": "eslint .",
@@ -27,17 +27,22 @@
27
27
  },
28
28
  "homepage": "https://github.com/MetaMask/eslint-config#readme",
29
29
  "devDependencies": {
30
- "@metamask/eslint-config": "^9.0.0",
31
- "@typescript-eslint/eslint-plugin": "^4.20.0",
32
- "@typescript-eslint/parser": "^4.20.0",
33
- "eslint": "^7.23.0",
30
+ "@metamask/eslint-config": "^10.0.0",
31
+ "@typescript-eslint/eslint-plugin": "^5.33.0",
32
+ "@typescript-eslint/parser": "^5.33.0",
33
+ "eslint": "^8.21.0",
34
+ "eslint-config-prettier": "^8.1.0",
35
+ "eslint-plugin-import": "^2.26.0",
36
+ "eslint-plugin-jsdoc": "^39.2.9",
37
+ "eslint-plugin-prettier": "^4.2.1",
38
+ "prettier": "^2.2.1",
34
39
  "typescript": "^4.0.7"
35
40
  },
36
41
  "peerDependencies": {
37
- "@metamask/eslint-config": "^9.0.0",
38
- "@typescript-eslint/eslint-plugin": "^4.20.0",
39
- "@typescript-eslint/parser": "^4.20.0",
40
- "eslint": "^7.23.0",
42
+ "@metamask/eslint-config": "^10.0.0",
43
+ "@typescript-eslint/eslint-plugin": "^5.33.0",
44
+ "@typescript-eslint/parser": "^5.33.0",
45
+ "eslint": "^8.21.0",
41
46
  "typescript": "^4.0.7"
42
47
  }
43
48
  }
package/src/index.js CHANGED
@@ -34,8 +34,7 @@ module.exports = {
34
34
  // Our rules
35
35
  '@typescript-eslint/array-type': 'error',
36
36
  '@typescript-eslint/consistent-type-assertions': 'error',
37
- '@typescript-eslint/consistent-type-definitions': 'error',
38
- '@typescript-eslint/explicit-module-boundary-types': 'off',
37
+ '@typescript-eslint/consistent-type-definitions': ['error', 'type'],
39
38
  '@typescript-eslint/no-explicit-any': 'off',
40
39
  '@typescript-eslint/no-namespace': [
41
40
  'error',
@@ -51,7 +50,12 @@ module.exports = {
51
50
  '@typescript-eslint/no-dupe-class-members': 'error',
52
51
  '@typescript-eslint/no-unused-vars': [
53
52
  'error',
54
- { vars: 'all', args: 'all', argsIgnorePattern: '[_]+' },
53
+ {
54
+ vars: 'all',
55
+ args: 'all',
56
+ argsIgnorePattern: '[_]+',
57
+ ignoreRestSiblings: true,
58
+ },
55
59
  ],
56
60
 
57
61
  'default-param-last': 'off',