Skip to content

Commit

Permalink
feat(typescript)!: Bump TypeScript version (#364)
Browse files Browse the repository at this point in the history
Bumps TypeScript to `~5.5` and `@typescript-eslint` dependencies to `^8.1.0`. Also simplifies the TypeScript peer dependency version range in `package.json`.
  • Loading branch information
rekmarks authored Aug 16, 2024
1 parent cfb590f commit 627c927
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 114 deletions.
14 changes: 7 additions & 7 deletions packages/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@
},
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@metamask/eslint-config": "^12.0.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@metamask/eslint-config": "^12.2.0",
"@typescript-eslint/eslint-plugin": "^8.1.0",
"@typescript-eslint/parser": "^8.1.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "~2.26.0",
"eslint-plugin-jsdoc": "^47.0.2",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.7.1",
"typescript": "~5.4.3"
"typescript": "~5.5.4"
},
"peerDependencies": {
"@metamask/eslint-config": "^12.2.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@typescript-eslint/eslint-plugin": "^8.1.0",
"@typescript-eslint/parser": "^8.1.0",
"eslint": "^8.57.0",
"typescript": "~4.8.4 || ~5.0 || ~5.1 || ~5.2 || ~5.3 || ~5.4"
"typescript": ">=4.8.4 <5.6"
},
"engines": {
"node": "^16.20 || ^18.18 || >=20"
Expand Down
15 changes: 10 additions & 5 deletions packages/typescript/rules-snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/ban-types": "error",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
"@typescript-eslint/consistent-type-exports": "error",
Expand Down Expand Up @@ -75,16 +74,17 @@
}
],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-array-delete": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-dupe-class-members": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/no-duplicate-type-constituents": "error",
"@typescript-eslint/no-empty-object-type": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-implied-eval": "error",
"@typescript-eslint/no-loss-of-precision": "error",
"@typescript-eslint/no-meaningless-void-operator": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-misused-promises": "error",
Expand All @@ -105,7 +105,6 @@
}
],
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-throw-literal": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-arguments": "error",
Expand All @@ -116,8 +115,10 @@
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-declaration-merging": "error",
"@typescript-eslint/no-unsafe-enum-comparison": "error",
"@typescript-eslint/no-unsafe-function-type": "error",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-unary-minus": "error",
"@typescript-eslint/no-unused-expressions": [
"error",
{
Expand All @@ -141,15 +142,18 @@
}
],
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/no-wrapper-object-types": "error",
"@typescript-eslint/only-throw-error": "error",
"@typescript-eslint/parameter-properties": "error",
"@typescript-eslint/prefer-as-const": "error",
"@typescript-eslint/prefer-enum-initializers": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-promise-reject-errors": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/prefer-reduce-type-parameter": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
Expand Down Expand Up @@ -187,7 +191,7 @@
"no-func-assign": "off",
"no-implied-eval": "off",
"no-import-assign": "off",
"no-loss-of-precision": "off",
"no-new-native-nonconstructor": "off",
"no-new-symbol": "off",
"no-obj-calls": "off",
"no-redeclare": "off",
Expand All @@ -211,6 +215,7 @@
"no-useless-constructor": "off",
"no-var": "error",
"prefer-const": "error",
"prefer-promise-reject-errors": "off",
"prefer-rest-params": "error",
"prefer-spread": "error",
"require-await": "off"
Expand Down
5 changes: 0 additions & 5 deletions packages/typescript/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ module.exports = {
],
'@typescript-eslint/no-non-null-assertion': 'error',
'@typescript-eslint/parameter-properties': 'error',
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/prefer-for-of': 'error',
'@typescript-eslint/prefer-function-type': 'error',
'@typescript-eslint/prefer-optional-chain': 'error',
Expand Down Expand Up @@ -167,10 +166,6 @@ module.exports = {
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error', { builtinGlobals: true }],

'no-throw-literal': 'off',
'@typescript-eslint/no-throw-literal': 'error',

'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': [
'error',
{ allowShortCircuit: true, allowTernary: true },
Expand Down
Loading

0 comments on commit 627c927

Please sign in to comment.