From 636bc751f80ad1f28a58478c6b1ceccc76a46053 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Mon, 10 Nov 2025 12:00:03 -0330 Subject: [PATCH 01/11] Revert "Revert "feat(typescript): Update type import specifier rules"" (#418) Reverts MetaMask/eslint-config#407, which itself was a revert of https://github.com/MetaMask/eslint-config/pull/381 because it had breaking changes, and we wanted to release some non-breaking things first. This PR restores the breaking changes in #381. --- > [!NOTE] > Replace @typescript-eslint/consistent-type-imports with import-x/consistent-type-specifier-style (prefer-top-level) and enable TypeScript verbatimModuleSyntax in tsconfigs. > > - **TypeScript ESLint config (`packages/typescript/src/index.mjs`, `rules-snapshot.json`)**: > - Add `import-x/consistent-type-specifier-style: ["error", "prefer-top-level"]` and keep `import-x/no-unresolved: "off"`. > - Remove `@typescript-eslint/consistent-type-imports`. > - **TypeScript config (`tsconfig.json`, `packages/typescript/tsconfig.json`)**: > - Enable `compilerOptions.verbatimModuleSyntax: true`. > > Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 245508bcd10fcab51aea46e2c2128f5453f95188. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot). --- packages/typescript/rules-snapshot.json | 2 +- packages/typescript/src/index.mjs | 13 +++++++++---- packages/typescript/tsconfig.json | 3 ++- tsconfig.json | 3 ++- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/packages/typescript/rules-snapshot.json b/packages/typescript/rules-snapshot.json index f0998f54..afb709c3 100644 --- a/packages/typescript/rules-snapshot.json +++ b/packages/typescript/rules-snapshot.json @@ -5,7 +5,6 @@ "@typescript-eslint/consistent-type-assertions": "error", "@typescript-eslint/consistent-type-definitions": ["error", "type"], "@typescript-eslint/consistent-type-exports": "error", - "@typescript-eslint/consistent-type-imports": "error", "@typescript-eslint/default-param-last": "error", "@typescript-eslint/explicit-function-return-type": "error", "@typescript-eslint/naming-convention": [ @@ -154,6 +153,7 @@ "constructor-super": "off", "default-param-last": "off", "getter-return": "off", + "import-x/consistent-type-specifier-style": ["error", "prefer-top-level"], "import-x/named": "off", "import-x/no-unresolved": "off", "jsdoc/check-access": "error", diff --git a/packages/typescript/src/index.mjs b/packages/typescript/src/index.mjs index 141a604a..3903bd02 100644 --- a/packages/typescript/src/index.mjs +++ b/packages/typescript/src/index.mjs @@ -38,14 +38,10 @@ const config = createConfig({ }, rules: { - // Handled by TypeScript - 'import-x/no-unresolved': 'off', - // Our rules '@typescript-eslint/array-type': 'error', '@typescript-eslint/consistent-type-assertions': 'error', '@typescript-eslint/consistent-type-definitions': ['error', 'type'], - '@typescript-eslint/consistent-type-imports': 'error', '@typescript-eslint/explicit-function-return-type': 'error', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-namespace': [ @@ -199,6 +195,15 @@ const config = createConfig({ 'no-useless-constructor': 'off', '@typescript-eslint/no-useless-constructor': 'error', + /* import-x plugin rules */ + + // Handled by TypeScript + 'import-x/no-unresolved': 'off', + + // Combined with the "verbatimModuleSyntax" tsconfig option, a better option than + // @typescript-eslint/consistent-type-imports + 'import-x/consistent-type-specifier-style': ['error', 'prefer-top-level'], + /* jsdoc plugin rules */ 'jsdoc/check-syntax': 'error', diff --git a/packages/typescript/tsconfig.json b/packages/typescript/tsconfig.json index 5bb107d6..cf964c35 100644 --- a/packages/typescript/tsconfig.json +++ b/packages/typescript/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { - "strictNullChecks": true + "strictNullChecks": true, + "verbatimModuleSyntax": true }, "include": ["src"] } diff --git a/tsconfig.json b/tsconfig.json index 02ff7a3b..6534da27 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,7 +12,8 @@ "noUncheckedIndexedAccess": true, "resolveJsonModule": true, "strict": true, - "target": "ES2022" + "target": "ES2022", + "verbatimModuleSyntax": true }, "include": ["**/*.mjs", "**/*.mts"], "exclude": ["./dist", "**/node_modules"] From c70a3ffb39a6f6a65f2dd15d73cdd72b739ffd7c Mon Sep 17 00:00:00 2001 From: Maarten Zuidhoorn Date: Mon, 10 Nov 2025 16:50:31 +0100 Subject: [PATCH 02/11] BREAKING: Update `jsdoc/require-jsdoc` to require documentation for more things (#394) This updates the `jsdoc/require-jsdoc` rule to require documentation for: - Arrow functions. ```ts const myFunction = () => { // ... }; ``` - Class declarations. ```ts class MyClass { // ... } ``` - TypeScript enum declarations. ```ts enum MyEnum { // ... }; ``` - Function expressions. ```ts const myFunction = function () { // ... }; ``` - TypeScript interface declarations. ```ts interface MyInterface { // ... }; ``` - Method definitions. ```ts const myObject = { myFunction() { // ... }, }; ``` - TypeScript type alias declarations. ```ts type MyType = { // ... }; - TypeScript property signatures. ```ts type MyType = { myProperty: string; }; ``` ## Breaking changes Each of the code blocks above was previously valid, but will now produce an error. Closes #223. --- > [!NOTE] > Expands `jsdoc/require-jsdoc` to require JSDoc on more JS/TS constructs and adds a brief doc comment to `ConfigWithExtends.extends`. > > - **ESLint config (`packages/base/src/index.mjs`, `packages/base/rules-snapshot.json`)**: > - Expand `jsdoc/require-jsdoc` from a simple enablement to a configured rule requiring docs for: > - `ArrowFunctionExpression`, `ClassDeclaration`, `FunctionDeclaration`, `FunctionExpression`, `MethodDefinition`. > - TS contexts: `TSInterfaceDeclaration`, `TSTypeAliasDeclaration`, `TSEnumDeclaration`, `TSPropertySignature`. > - **Types (`packages/base/src/index.d.mts`)**: > - Add JSDoc for `ConfigWithExtends`.`extends` detailing supported shapes. > > Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit e0efa13db0953a9c449e3b4b6c5b90601e0b3b1f. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot). --- packages/base/rules-snapshot.json | 19 ++++++++++++++++++- packages/base/src/index.d.mts | 4 ++++ packages/base/src/index.mjs | 19 ++++++++++++++++++- 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/packages/base/rules-snapshot.json b/packages/base/rules-snapshot.json index e37c4f11..e301a5a8 100644 --- a/packages/base/rules-snapshot.json +++ b/packages/base/rules-snapshot.json @@ -176,7 +176,24 @@ "always", { "tags": { "returns": "never", "template": "always", "throws": "never" } } ], - "jsdoc/require-jsdoc": "error", + "jsdoc/require-jsdoc": [ + "error", + { + "require": { + "ArrowFunctionExpression": true, + "ClassDeclaration": true, + "FunctionDeclaration": true, + "FunctionExpression": true, + "MethodDefinition": true + }, + "contexts": [ + "TSInterfaceDeclaration", + "TSTypeAliasDeclaration", + "TSEnumDeclaration", + "TSPropertySignature" + ] + } + ], "jsdoc/require-param": ["error", { "unnamedRootBase": ["options"] }], "jsdoc/require-param-description": "error", "jsdoc/require-param-name": "error", diff --git a/packages/base/src/index.d.mts b/packages/base/src/index.d.mts index 98df94e8..df20e921 100644 --- a/packages/base/src/index.d.mts +++ b/packages/base/src/index.d.mts @@ -11,6 +11,10 @@ declare module '@metamask/eslint-config' { * can only be used with the {@link createConfig} function. */ type ConfigWithExtends = Config & { + /** + * The configuration(s) to extend. This can be a single configuration, an + * array of configurations, or an array of arrays of configurations. + */ extends?: Config | Config[] | Config[][]; }; diff --git a/packages/base/src/index.mjs b/packages/base/src/index.mjs index 9ce28b08..8d6219fb 100644 --- a/packages/base/src/index.mjs +++ b/packages/base/src/index.mjs @@ -393,7 +393,24 @@ const rules = createConfig({ 'always', { tags: { returns: 'never', template: 'always', throws: 'never' } }, ], - 'jsdoc/require-jsdoc': 'error', + 'jsdoc/require-jsdoc': [ + 'error', + { + require: { + ArrowFunctionExpression: true, + ClassDeclaration: true, + FunctionDeclaration: true, + FunctionExpression: true, + MethodDefinition: true, + }, + contexts: [ + 'TSInterfaceDeclaration', + 'TSTypeAliasDeclaration', + 'TSEnumDeclaration', + 'TSPropertySignature', + ], + }, + ], 'jsdoc/require-param-name': 'error', 'jsdoc/require-param': ['error', { unnamedRootBase: ['options'] }], 'jsdoc/require-param-description': 'error', From b1169747db159bd4fd537be78543e9dd81290ee0 Mon Sep 17 00:00:00 2001 From: Elliot Winkler Date: Mon, 1 Dec 2025 08:50:01 -0700 Subject: [PATCH 03/11] Allow remaining TypeScript 5.x versions (#422) The latest version of TypeScript is 5.9, but no project can currently use this without producing peer dependency warnings. To prevent this and unlock new versions of TypeScript 5.x in the future, widen the peer dependency. To ensure this does not cause a problem in this repo, also update the development version of TypeScript and TypeScript ESLint to their latest versions. --- package.json | 4 +- packages/jest/src/index.test.mjs | 1 - packages/typescript/package.json | 6 +- packages/typescript/rules-snapshot.json | 1 + packages/typescript/src/index.test.mjs | 1 - yarn.lock | 229 ++++++++++++++---------- 6 files changed, 137 insertions(+), 105 deletions(-) diff --git a/package.json b/package.json index fb797020..8d65d53f 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,8 @@ "globals": "^15.9.0", "prettier": "^3.3.3", "prettier-plugin-packagejson": "^2.5.2", - "typescript": "~5.8.0", - "typescript-eslint": "^8.28.0", + "typescript": "^5.9.3", + "typescript-eslint": "^8.47.0", "vite": "^5.4.19", "vitest": "^2.1.9" }, diff --git a/packages/jest/src/index.test.mjs b/packages/jest/src/index.test.mjs index 11f90aa9..915f0b04 100644 --- a/packages/jest/src/index.test.mjs +++ b/packages/jest/src/index.test.mjs @@ -35,7 +35,6 @@ describe('index', () => { }, parserOptions: { tsconfigRootDir: resolve(import.meta.dirname, '..'), - project: 'tsconfig.json', }, }, }, diff --git a/packages/typescript/package.json b/packages/typescript/package.json index 1b92f7db..294af365 100644 --- a/packages/typescript/package.json +++ b/packages/typescript/package.json @@ -48,8 +48,8 @@ "eslint-plugin-prettier": "^5.2.1", "globals": "^15.9.0", "prettier": "^3.3.3", - "typescript": "~5.8.0", - "typescript-eslint": "^8.28.0", + "typescript": "^5.9.3", + "typescript-eslint": "^8.47.0", "vitest": "^2.1.9" }, "peerDependencies": { @@ -58,7 +58,7 @@ "eslint-import-resolver-typescript": "^3.6.3", "eslint-plugin-import-x": "^4.3.0", "eslint-plugin-jsdoc": "^50.2.4", - "typescript": ">=4.8.4 <5.9.0", + "typescript": ">=4.8.4 <6", "typescript-eslint": "^8.24" }, "engines": { diff --git a/packages/typescript/rules-snapshot.json b/packages/typescript/rules-snapshot.json index afb709c3..6a3d5a9c 100644 --- a/packages/typescript/rules-snapshot.json +++ b/packages/typescript/rules-snapshot.json @@ -245,6 +245,7 @@ "no-use-before-define": "off", "no-useless-constructor": "off", "no-var": "error", + "no-with": "off", "prefer-const": "error", "prefer-promise-reject-errors": "off", "prefer-rest-params": "error", diff --git a/packages/typescript/src/index.test.mjs b/packages/typescript/src/index.test.mjs index 41886b29..660ec8a2 100644 --- a/packages/typescript/src/index.test.mjs +++ b/packages/typescript/src/index.test.mjs @@ -16,7 +16,6 @@ describe('index', () => { }, parserOptions: { tsconfigRootDir: resolve(import.meta.dirname, '..'), - project: 'tsconfig.json', }, }, }, diff --git a/yarn.lock b/yarn.lock index 82f33845..d57812a3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -581,14 +581,14 @@ __metadata: languageName: node linkType: hard -"@eslint-community/eslint-utils@npm:^4.1.2, @eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": - version: 4.4.0 - resolution: "@eslint-community/eslint-utils@npm:4.4.0" +"@eslint-community/eslint-utils@npm:^4.1.2, @eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0, @eslint-community/eslint-utils@npm:^4.7.0": + version: 4.9.0 + resolution: "@eslint-community/eslint-utils@npm:4.9.0" dependencies: - eslint-visitor-keys: "npm:^3.3.0" + eslint-visitor-keys: "npm:^3.4.3" peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - checksum: 10/8d70bcdcd8cd279049183aca747d6c2ed7092a5cf0cf5916faac1ef37ffa74f0c245c2a3a3d3b9979d9dfdd4ca59257b4c5621db699d637b847a2c5e02f491c2 + checksum: 10/89b1eb3137e14c379865e60573f524fcc0ee5c4b0c7cd21090673e75e5a720f14b92f05ab2d02704c2314b67e67b6f96f3bb209ded6b890ced7b667aa4bf1fa2 languageName: node linkType: hard @@ -1245,8 +1245,8 @@ __metadata: globals: "npm:^15.9.0" prettier: "npm:^3.3.3" prettier-plugin-packagejson: "npm:^2.5.2" - typescript: "npm:~5.8.0" - typescript-eslint: "npm:^8.28.0" + typescript: "npm:^5.9.3" + typescript-eslint: "npm:^8.47.0" vite: "npm:^5.4.19" vitest: "npm:^2.1.9" languageName: unknown @@ -1268,8 +1268,8 @@ __metadata: eslint-plugin-prettier: "npm:^5.2.1" globals: "npm:^15.9.0" prettier: "npm:^3.3.3" - typescript: "npm:~5.8.0" - typescript-eslint: "npm:^8.28.0" + typescript: "npm:^5.9.3" + typescript-eslint: "npm:^8.47.0" vitest: "npm:^2.1.9" peerDependencies: "@metamask/eslint-config": "workspace:^" @@ -1277,7 +1277,7 @@ __metadata: eslint-import-resolver-typescript: ^3.6.3 eslint-plugin-import-x: ^4.3.0 eslint-plugin-jsdoc: ^50.2.4 - typescript: ">=4.8.4 <5.9.0" + typescript: ">=4.8.4 <6" typescript-eslint: ^8.24 languageName: unknown linkType: soft @@ -1880,115 +1880,140 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:8.28.0": - version: 8.28.0 - resolution: "@typescript-eslint/eslint-plugin@npm:8.28.0" +"@typescript-eslint/eslint-plugin@npm:8.47.0": + version: 8.47.0 + resolution: "@typescript-eslint/eslint-plugin@npm:8.47.0" dependencies: "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:8.28.0" - "@typescript-eslint/type-utils": "npm:8.28.0" - "@typescript-eslint/utils": "npm:8.28.0" - "@typescript-eslint/visitor-keys": "npm:8.28.0" + "@typescript-eslint/scope-manager": "npm:8.47.0" + "@typescript-eslint/type-utils": "npm:8.47.0" + "@typescript-eslint/utils": "npm:8.47.0" + "@typescript-eslint/visitor-keys": "npm:8.47.0" graphemer: "npm:^1.4.0" - ignore: "npm:^5.3.1" + ignore: "npm:^7.0.0" natural-compare: "npm:^1.4.0" - ts-api-utils: "npm:^2.0.1" + ts-api-utils: "npm:^2.1.0" peerDependencies: - "@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0 + "@typescript-eslint/parser": ^8.47.0 eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.9.0" - checksum: 10/cd83f6c52218f7d31142b08a73b398370e4a7cf95c8afc03821050c625ec4b35e0c56f554d48bfa4a1b95564e60c0b4d5993cf2054b80f39533c1b0b84a0c7cd + typescript: ">=4.8.4 <6.0.0" + checksum: 10/53d86116a39429c0cdde5969f9ea2cf712f7c7cb2ed023088a876686a4771df131dbefda7645ba0724e2a5a0532e14bdffcb92c708060a46a8607dc5243083d1 languageName: node linkType: hard -"@typescript-eslint/parser@npm:8.28.0": - version: 8.28.0 - resolution: "@typescript-eslint/parser@npm:8.28.0" +"@typescript-eslint/parser@npm:8.47.0": + version: 8.47.0 + resolution: "@typescript-eslint/parser@npm:8.47.0" dependencies: - "@typescript-eslint/scope-manager": "npm:8.28.0" - "@typescript-eslint/types": "npm:8.28.0" - "@typescript-eslint/typescript-estree": "npm:8.28.0" - "@typescript-eslint/visitor-keys": "npm:8.28.0" + "@typescript-eslint/scope-manager": "npm:8.47.0" + "@typescript-eslint/types": "npm:8.47.0" + "@typescript-eslint/typescript-estree": "npm:8.47.0" + "@typescript-eslint/visitor-keys": "npm:8.47.0" debug: "npm:^4.3.4" peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.9.0" - checksum: 10/34d6144748384fb0900cefb07a763455bf977678be7d25ed7da783fbc4238e6800b0f9dab002736ee644cb7b0aeee023ca1f156f9885e01189e210cccf0be83f + typescript: ">=4.8.4 <6.0.0" + checksum: 10/e7213296a27b78511b8c9b2627ff6530d0eb31e6b076eef6f34f11ca7fbcb7e998a2fa079bfc1563a53f9d88326aa4af995241bcdf08a15c3e5be0d13fdff2d7 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:8.28.0": - version: 8.28.0 - resolution: "@typescript-eslint/scope-manager@npm:8.28.0" +"@typescript-eslint/project-service@npm:8.47.0": + version: 8.47.0 + resolution: "@typescript-eslint/project-service@npm:8.47.0" dependencies: - "@typescript-eslint/types": "npm:8.28.0" - "@typescript-eslint/visitor-keys": "npm:8.28.0" - checksum: 10/5100ea7e2960e7494477b5770b41453e33a2372996a8c6b0ab933440bf54877a4433dab4a6ad527e29644d7e9b1a6f7595da3ec7c168b9970cc05f4d988825f4 + "@typescript-eslint/tsconfig-utils": "npm:^8.47.0" + "@typescript-eslint/types": "npm:^8.47.0" + debug: "npm:^4.3.4" + peerDependencies: + typescript: ">=4.8.4 <6.0.0" + checksum: 10/e2f935dae66ce27e6c0cce8b750da0e8fe84b6e0fa248bf8210b84eec3c4d2e2679a878185f445ce507d132215a676dcf8a21d47ab70c547da47ede000a128e1 + languageName: node + linkType: hard + +"@typescript-eslint/scope-manager@npm:8.47.0": + version: 8.47.0 + resolution: "@typescript-eslint/scope-manager@npm:8.47.0" + dependencies: + "@typescript-eslint/types": "npm:8.47.0" + "@typescript-eslint/visitor-keys": "npm:8.47.0" + checksum: 10/e97ae0f746f6bb5706181a973bcc0c1268706ef7e8c18594b37168bb0b41b1673d3f0ba1a2575ee3bd121066500fdc75af313f6ad283198942a5cdb65ade7621 + languageName: node + linkType: hard + +"@typescript-eslint/tsconfig-utils@npm:8.47.0, @typescript-eslint/tsconfig-utils@npm:^8.47.0": + version: 8.47.0 + resolution: "@typescript-eslint/tsconfig-utils@npm:8.47.0" + peerDependencies: + typescript: ">=4.8.4 <6.0.0" + checksum: 10/7f44441da3778928937419f8ebc62939538cf30087e56c0ca56f599ce98111b82f496902a9e15d713822b9cd14b17937d57b722468450a48748f8e50fd7161af languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:8.28.0": - version: 8.28.0 - resolution: "@typescript-eslint/type-utils@npm:8.28.0" +"@typescript-eslint/type-utils@npm:8.47.0": + version: 8.47.0 + resolution: "@typescript-eslint/type-utils@npm:8.47.0" dependencies: - "@typescript-eslint/typescript-estree": "npm:8.28.0" - "@typescript-eslint/utils": "npm:8.28.0" + "@typescript-eslint/types": "npm:8.47.0" + "@typescript-eslint/typescript-estree": "npm:8.47.0" + "@typescript-eslint/utils": "npm:8.47.0" debug: "npm:^4.3.4" - ts-api-utils: "npm:^2.0.1" + ts-api-utils: "npm:^2.1.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.9.0" - checksum: 10/a915f767531004ae486767613178d125719b4da7cb76de0534688bb41634d93dc3c631a2c8dd97b72306dfcd5fddf62e725536622494831fdf0eb3eecb1beda4 + typescript: ">=4.8.4 <6.0.0" + checksum: 10/07dcdd1ac071bbaf87b6b320d107129787a62cc403ce78e081cbe5e2ed0c576d660654e4117e6224c4c23d46919d7130b70801835d2fc41d9344c47ff946ce81 languageName: node linkType: hard -"@typescript-eslint/types@npm:8.28.0": - version: 8.28.0 - resolution: "@typescript-eslint/types@npm:8.28.0" - checksum: 10/83938402e473f43b34f476627a78da5daeef35ffca24b02fefea8702703e490196c01ef6b3c780a543ef703cea814b4d3fb55a747051bfc7e30d02f2576f2158 +"@typescript-eslint/types@npm:8.47.0, @typescript-eslint/types@npm:^8.47.0": + version: 8.47.0 + resolution: "@typescript-eslint/types@npm:8.47.0" + checksum: 10/fc42416c01c512cfe1533bdf521925bca999adc68ffefa246e48552783f1fe9d22487d912611c5cb35fca481604aae3cab88279a53ce76c7cd7510b76775c078 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:8.28.0": - version: 8.28.0 - resolution: "@typescript-eslint/typescript-estree@npm:8.28.0" +"@typescript-eslint/typescript-estree@npm:8.47.0": + version: 8.47.0 + resolution: "@typescript-eslint/typescript-estree@npm:8.47.0" dependencies: - "@typescript-eslint/types": "npm:8.28.0" - "@typescript-eslint/visitor-keys": "npm:8.28.0" + "@typescript-eslint/project-service": "npm:8.47.0" + "@typescript-eslint/tsconfig-utils": "npm:8.47.0" + "@typescript-eslint/types": "npm:8.47.0" + "@typescript-eslint/visitor-keys": "npm:8.47.0" debug: "npm:^4.3.4" fast-glob: "npm:^3.3.2" is-glob: "npm:^4.0.3" minimatch: "npm:^9.0.4" semver: "npm:^7.6.0" - ts-api-utils: "npm:^2.0.1" + ts-api-utils: "npm:^2.1.0" peerDependencies: - typescript: ">=4.8.4 <5.9.0" - checksum: 10/277639fe8007f7612a914f6a3a2b0fdc5f764afe6cba86aeacf6a9585a0114a3235dd730caef0a17e92ca3f4137068ad56a483514b8399650ddc9078aeb90a7d + typescript: ">=4.8.4 <6.0.0" + checksum: 10/a480e83f1fca8a389642cbb18855ef25214c4765694b1d4a74051d2653a4fbbbf3a3cc4e544d1ecb79d49958fbf819246043c0d823d4384aa1c7b5ff79d02fcc languageName: node linkType: hard -"@typescript-eslint/utils@npm:8.28.0, @typescript-eslint/utils@npm:^6.0.0 || ^7.0.0 || ^8.0.0, @typescript-eslint/utils@npm:^8.1.0": - version: 8.28.0 - resolution: "@typescript-eslint/utils@npm:8.28.0" +"@typescript-eslint/utils@npm:8.47.0, @typescript-eslint/utils@npm:^6.0.0 || ^7.0.0 || ^8.0.0, @typescript-eslint/utils@npm:^8.1.0": + version: 8.47.0 + resolution: "@typescript-eslint/utils@npm:8.47.0" dependencies: - "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:8.28.0" - "@typescript-eslint/types": "npm:8.28.0" - "@typescript-eslint/typescript-estree": "npm:8.28.0" + "@eslint-community/eslint-utils": "npm:^4.7.0" + "@typescript-eslint/scope-manager": "npm:8.47.0" + "@typescript-eslint/types": "npm:8.47.0" + "@typescript-eslint/typescript-estree": "npm:8.47.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.9.0" - checksum: 10/a5b318b184a700605c5a0b5c92901af81c394d6aca903f69472b746d4e8ccba99a4aeb0f27f3edbf7c4f89a378606d64d7e5d978d6e3ec4c2ef3ae8bc1cf116a + typescript: ">=4.8.4 <6.0.0" + checksum: 10/e165bbcaaafb88761f12272bc4b3be1631d8a8ea319765c80cfe5bf7a5858f437486eeae177643baa213570a664f0254b41bf0541e9238b57080bb30d1a2c8ab languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:8.28.0": - version: 8.28.0 - resolution: "@typescript-eslint/visitor-keys@npm:8.28.0" +"@typescript-eslint/visitor-keys@npm:8.47.0": + version: 8.47.0 + resolution: "@typescript-eslint/visitor-keys@npm:8.47.0" dependencies: - "@typescript-eslint/types": "npm:8.28.0" - eslint-visitor-keys: "npm:^4.2.0" - checksum: 10/df159834ab40497f7adfa2bab973b64418d10e9dbbab92cf7d68e4b136734690e21bf6229f2770c5202e56c245eb641df3039652838bd439ce9f8e3293309662 + "@typescript-eslint/types": "npm:8.47.0" + eslint-visitor-keys: "npm:^4.2.1" + checksum: 10/1e184cdebc4ab15da8a46ae2624ba4543c6bea83ced80a1602da99b72c00b5f6ea913ae021823c555a35a65bb9a9df09d119713998c44b00eba25e1407844294 languageName: node linkType: hard @@ -3613,17 +3638,17 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^3.3.0": +"eslint-visitor-keys@npm:^3.4.3": version: 3.4.3 resolution: "eslint-visitor-keys@npm:3.4.3" checksum: 10/3f357c554a9ea794b094a09bd4187e5eacd1bc0d0653c3adeb87962c548e6a1ab8f982b86963ae1337f5d976004146536dcee5d0e2806665b193fbfbf1a9231b languageName: node linkType: hard -"eslint-visitor-keys@npm:^4.0.0, eslint-visitor-keys@npm:^4.2.0": - version: 4.2.0 - resolution: "eslint-visitor-keys@npm:4.2.0" - checksum: 10/9651b3356b01760e586b4c631c5268c0e1a85236e3292bf754f0472f465bf9a856c0ddc261fceace155334118c0151778effafbab981413dbf9288349343fa25 +"eslint-visitor-keys@npm:^4.0.0, eslint-visitor-keys@npm:^4.2.1": + version: 4.2.1 + resolution: "eslint-visitor-keys@npm:4.2.1" + checksum: 10/3ee00fc6a7002d4b0ffd9dc99e13a6a7882c557329e6c25ab254220d71e5c9c4f89dca4695352949ea678eb1f3ba912a18ef8aac0a7fe094196fd92f441bfce2 languageName: node linkType: hard @@ -4496,13 +4521,20 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^5.2.0, ignore@npm:^5.2.4, ignore@npm:^5.3.1": +"ignore@npm:^5.2.0, ignore@npm:^5.2.4": version: 5.3.2 resolution: "ignore@npm:5.3.2" checksum: 10/cceb6a457000f8f6a50e1196429750d782afce5680dd878aa4221bd79972d68b3a55b4b1458fc682be978f4d3c6a249046aa0880637367216444ab7b014cfc98 languageName: node linkType: hard +"ignore@npm:^7.0.0": + version: 7.0.5 + resolution: "ignore@npm:7.0.5" + checksum: 10/f134b96a4de0af419196f52c529d5c6120c4456ff8a6b5a14ceaaa399f883e15d58d2ce651c9b69b9388491d4669dda47285d307e827de9304a53a1824801bc6 + languageName: node + linkType: hard + "import-fresh@npm:^3.2.1": version: 3.3.0 resolution: "import-fresh@npm:3.3.0" @@ -7310,12 +7342,12 @@ __metadata: languageName: node linkType: hard -"ts-api-utils@npm:^2.0.1": - version: 2.0.1 - resolution: "ts-api-utils@npm:2.0.1" +"ts-api-utils@npm:^2.1.0": + version: 2.1.0 + resolution: "ts-api-utils@npm:2.1.0" peerDependencies: typescript: ">=4.8.4" - checksum: 10/2e68938cd5acad6b5157744215ce10cd097f9f667fd36b5fdd5efdd4b0c51063e855459d835f94f6777bb8a0f334916b6eb5c1eedab8c325feb34baa39238898 + checksum: 10/02e55b49d9617c6eebf8aadfa08d3ca03ca0cd2f0586ad34117fdfc7aa3cd25d95051843fde9df86665ad907f99baed179e7a117b11021417f379e4d2614eacd languageName: node linkType: hard @@ -7366,37 +7398,38 @@ __metadata: languageName: node linkType: hard -"typescript-eslint@npm:^8.28.0": - version: 8.28.0 - resolution: "typescript-eslint@npm:8.28.0" +"typescript-eslint@npm:^8.47.0": + version: 8.47.0 + resolution: "typescript-eslint@npm:8.47.0" dependencies: - "@typescript-eslint/eslint-plugin": "npm:8.28.0" - "@typescript-eslint/parser": "npm:8.28.0" - "@typescript-eslint/utils": "npm:8.28.0" + "@typescript-eslint/eslint-plugin": "npm:8.47.0" + "@typescript-eslint/parser": "npm:8.47.0" + "@typescript-eslint/typescript-estree": "npm:8.47.0" + "@typescript-eslint/utils": "npm:8.47.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.9.0" - checksum: 10/6ac47f886907d8187b37f9fe9cefa3433cd55b875385622e2788465fc118b400f5da0c8dbfa818195a9fb27b1cada9fb198b04d1c34591c8e10419799e0e56cf + typescript: ">=4.8.4 <6.0.0" + checksum: 10/159dad98535dafd68c6228fae4aaf9e02d65d9ac3b02ddf0356b56ce72651dd9860e8bf9e0ee22532d77dd382d7f810e1bf1dd41c3fab381f627a08580c5117e languageName: node linkType: hard -"typescript@npm:~5.8.0": - version: 5.8.2 - resolution: "typescript@npm:5.8.2" +"typescript@npm:^5.9.3": + version: 5.9.3 + resolution: "typescript@npm:5.9.3" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10/dbc2168a55d56771f4d581997be52bab5cbc09734fec976cfbaabd787e61fb4c6cf9125fd48c6f98054ce549c77ecedefc7f64252a830dd8e9c3381f61fbeb78 + checksum: 10/c089d9d3da2729fd4ac517f9b0e0485914c4b3c26f80dc0cffcb5de1719a17951e92425d55db59515c1a7ddab65808466debb864d0d56dcf43f27007d0709594 languageName: node linkType: hard -"typescript@patch:typescript@npm%3A~5.8.0#optional!builtin": - version: 5.8.2 - resolution: "typescript@patch:typescript@npm%3A5.8.2#optional!builtin::version=5.8.2&hash=8c6c40" +"typescript@patch:typescript@npm%3A^5.9.3#optional!builtin": + version: 5.9.3 + resolution: "typescript@patch:typescript@npm%3A5.9.3#optional!builtin::version=5.9.3&hash=8c6c40" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10/6ae9b2c4d3254ec2eaee6f26ed997e19c02177a212422993209f81e87092b2bb0a4738085549c5b0164982a5609364c047c72aeb281f6c8d802cd0d1c6f0d353 + checksum: 10/5d416ad4f2ea564f515a3f919e901edbfa4b497cc17dd325c5726046c3eef7ed22d1f59c787267d478311f6f0a265ff790f8a6c7e9df3ea3471458f5ec81e8b7 languageName: node linkType: hard From b243e90e8923a784ace831cdf89e1a1aad6ffe27 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Tue, 2 Dec 2025 12:05:11 -0330 Subject: [PATCH 04/11] chore: Increase minimum `typescript-eslint` version (#423) The minimum version of `typescript-eslint` has been updated to v8.39.0. This is the version that included widening the range of allowed `typescript` versions, so this new minimum will ensure users of this config won't see warnings about incompatible typescript versions if they satisfy this new minimum. This update also brings in a bug fix we encountered on `core` related to the `@typescript-eslint/no-unnecessary-type-assertion` rule, which was in v8.31.0. Details here: https://github.com/typescript-eslint/typescript-eslint/issues/8721 --- > [!NOTE] > Increase `typescript-eslint` peer dependency minimum to ^8.39.0 and document as a breaking change. > > - **TypeScript config package (`packages/typescript`)**: > - **Peer deps**: Raise `typescript-eslint` minimum from `^8.24` to `^8.39.0` in `package.json`. > - **Changelog**: Add Unreleased entry marking this as a **BREAKING** change with notes on compatibility and fixes. > > Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 735688e5c57cdf6796873245627c329a0a4addc7. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot). --- packages/typescript/CHANGELOG.md | 5 +++++ packages/typescript/package.json | 2 +- yarn.lock | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/typescript/CHANGELOG.md b/packages/typescript/CHANGELOG.md index 29091f05..e342a6e5 100644 --- a/packages/typescript/CHANGELOG.md +++ b/packages/typescript/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- **BREAKING:** Update `typescript-eslint` peer dependency to have a minimum version of v8.39.0 ([#423](https://github.com/MetaMask/eslint-config/pull/423)) + - This version has a matching supported `typescript` range, and includes some bug fixes for problems we ran into. + ## [14.1.0] ### Added diff --git a/packages/typescript/package.json b/packages/typescript/package.json index 294af365..18210668 100644 --- a/packages/typescript/package.json +++ b/packages/typescript/package.json @@ -59,7 +59,7 @@ "eslint-plugin-import-x": "^4.3.0", "eslint-plugin-jsdoc": "^50.2.4", "typescript": ">=4.8.4 <6", - "typescript-eslint": "^8.24" + "typescript-eslint": "^8.39.0" }, "engines": { "node": "^18.18 || >=20" diff --git a/yarn.lock b/yarn.lock index d57812a3..ae943958 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1278,7 +1278,7 @@ __metadata: eslint-plugin-import-x: ^4.3.0 eslint-plugin-jsdoc: ^50.2.4 typescript: ">=4.8.4 <6" - typescript-eslint: ^8.24 + typescript-eslint: ^8.39.0 languageName: unknown linkType: soft From a0e0bc840a6d12f9dc2fb40be9f1022ffbff467e Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Tue, 2 Dec 2025 14:09:42 -0330 Subject: [PATCH 05/11] feat: Convert all warnings to errors (#424) We try to avoid using ESLint warnings because they tend to be easy for conitrbutors to miss, and they pile up over time and make the linter miserable to work with. Our team's preference is to ignore or suppress violations that we don't want to resolve directly. We never set any rules to `warn` directly, but some of the configs we're inheriting from include warnings. All of them have been converted to errors. --- > [!NOTE] > Converts specific Promise and Jest ESLint rules from warn to error and updates changelogs accordingly. > > - **Base (`@metamask/eslint-config`)**: > - Elevate Promise rules to `error`: `promise/no-callback-in-promise`, `promise/no-nesting`, `promise/no-promise-in-callback`, `promise/no-return-in-finally`, `promise/valid-params`. > - Update `CHANGELOG.md` to note breaking changes. > - **Jest (`@metamask/eslint-config-jest`)**: > - Elevate Jest rules to `error`: `jest/expect-expect`, `jest/no-alias-methods`, `jest/no-commented-out-tests`, `jest/no-disabled-tests`. > - Update `CHANGELOG.md` to note breaking changes. > > Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit a545b6ac7b5f5fad8575de0498a90c77473f021c. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot). --- packages/base/CHANGELOG.md | 10 ++++++++++ packages/base/rules-snapshot.json | 10 +++++----- packages/base/src/index.mjs | 5 +++++ packages/jest/CHANGELOG.md | 9 +++++++++ packages/jest/rules-snapshot.json | 8 ++++---- packages/jest/src/index.mjs | 4 ++++ 6 files changed, 37 insertions(+), 9 deletions(-) diff --git a/packages/base/CHANGELOG.md b/packages/base/CHANGELOG.md index cfe6067f..550dff59 100644 --- a/packages/base/CHANGELOG.md +++ b/packages/base/CHANGELOG.md @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- **BREAKING:** Convert various rules from `warn` to `error` ([#424](https://github.com/MetaMask/eslint-config/pull/424)) + - The rules impacted are: + - `promise/no-callback-in-promise` + - `promise/no-nesting` + - `promise/no-promise-in-callback` + - `promise/no-return-in-finally` + - `promise/valid-params` + ## [14.1.0] ### Changed diff --git a/packages/base/rules-snapshot.json b/packages/base/rules-snapshot.json index e301a5a8..89238702 100644 --- a/packages/base/rules-snapshot.json +++ b/packages/base/rules-snapshot.json @@ -3266,18 +3266,18 @@ "promise/always-return": "error", "promise/avoid-new": "off", "promise/catch-or-return": ["error", { "allowFinally": true }], - "promise/no-callback-in-promise": "warn", + "promise/no-callback-in-promise": "error", "promise/no-native": "off", - "promise/no-nesting": "warn", + "promise/no-nesting": "error", "promise/no-new-statics": "error", - "promise/no-promise-in-callback": "warn", - "promise/no-return-in-finally": "warn", + "promise/no-promise-in-callback": "error", + "promise/no-return-in-finally": "error", "promise/no-return-wrap": "error", "promise/param-names": [ "error", { "resolvePattern": "^_?resolve", "rejectPattern": "^_?reject" } ], - "promise/valid-params": "warn", + "promise/valid-params": "error", "quote-props": "off", "quotes": "off", "radix": "error", diff --git a/packages/base/src/index.mjs b/packages/base/src/index.mjs index 8d6219fb..f4bfd3da 100644 --- a/packages/base/src/index.mjs +++ b/packages/base/src/index.mjs @@ -441,6 +441,10 @@ const rules = createConfig({ allowFinally: true, }, ], + 'promise/no-callback-in-promise': 'error', + 'promise/no-nesting': 'error', + 'promise/no-promise-in-callback': 'error', + 'promise/no-return-in-finally': 'error', 'promise/param-names': [ 'error', { @@ -448,6 +452,7 @@ const rules = createConfig({ rejectPattern: '^_?reject', }, ], + 'promise/valid-params': 'error', }, }); diff --git a/packages/jest/CHANGELOG.md b/packages/jest/CHANGELOG.md index 3d5bcfb8..ed9c7bf8 100644 --- a/packages/jest/CHANGELOG.md +++ b/packages/jest/CHANGELOG.md @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- **BREAKING:** Convert various rules from `warn` to `error` ([#424](https://github.com/MetaMask/eslint-config/pull/424)) + - The rules impacted are: + - `jest/expect-expect` + - `jest/no-alias-methods` + - `jest/no-commented-out-tests` + - `jest/no-disabled-tests` + ## [14.1.0] ### Changed diff --git a/packages/jest/rules-snapshot.json b/packages/jest/rules-snapshot.json index 1c5e8718..2ea051a7 100644 --- a/packages/jest/rules-snapshot.json +++ b/packages/jest/rules-snapshot.json @@ -1,12 +1,12 @@ { "@typescript-eslint/unbound-method": "off", "jest/consistent-test-it": ["error", { "fn": "it" }], - "jest/expect-expect": "warn", - "jest/no-alias-methods": "warn", - "jest/no-commented-out-tests": "warn", + "jest/expect-expect": "error", + "jest/no-alias-methods": "error", + "jest/no-commented-out-tests": "error", "jest/no-conditional-expect": "error", "jest/no-deprecated-functions": "error", - "jest/no-disabled-tests": "warn", + "jest/no-disabled-tests": "error", "jest/no-done-callback": "error", "jest/no-duplicate-hooks": "error", "jest/no-export": "error", diff --git a/packages/jest/src/index.mjs b/packages/jest/src/index.mjs index a1ed6489..731437a6 100644 --- a/packages/jest/src/index.mjs +++ b/packages/jest/src/index.mjs @@ -19,6 +19,10 @@ const config = createConfig([ rules: { 'jest/consistent-test-it': ['error', { fn: 'it' }], + 'jest/expect-expect': 'error', + 'jest/no-alias-methods': 'error', + 'jest/no-commented-out-tests': 'error', + 'jest/no-disabled-tests': 'error', 'jest/no-duplicate-hooks': 'error', 'jest/no-test-return-statement': 'error', 'jest/prefer-hooks-on-top': 'error', From 383fbeca6ae261f1307d61ec99a16127b3f038a8 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Tue, 2 Dec 2025 14:13:26 -0330 Subject: [PATCH 06/11] feat: Disable `@typescript-eslint/no-unnecessary-type-arguments` (#426) This rule ended up getting in our way more than helping. Type arguments can sometimes be useful to include even when they're not strictly needed, so that the reader doesn't have to dig into the type definition to discover the default value. Closes #413 --- > [!NOTE] > Disables `@typescript-eslint/no-unnecessary-type-arguments` in the TypeScript ESLint config and updates the changelog and rules snapshot. > > - **TypeScript ESLint config**: > - Disable `@typescript-eslint/no-unnecessary-type-arguments` in `packages/typescript/src/index.mjs` (with rationale comment). > - Reflect rule change in `packages/typescript/rules-snapshot.json`. > - **Changelog**: > - Add Unreleased entry noting the rule disablement in `packages/typescript/CHANGELOG.md`. > > Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit f9b673c7bf27ca903c334dadf206944abb1495d3. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot). --- packages/typescript/CHANGELOG.md | 2 ++ packages/typescript/rules-snapshot.json | 2 +- packages/typescript/src/index.mjs | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/typescript/CHANGELOG.md b/packages/typescript/CHANGELOG.md index e342a6e5..eea7356e 100644 --- a/packages/typescript/CHANGELOG.md +++ b/packages/typescript/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **BREAKING:** Update `typescript-eslint` peer dependency to have a minimum version of v8.39.0 ([#423](https://github.com/MetaMask/eslint-config/pull/423)) - This version has a matching supported `typescript` range, and includes some bug fixes for problems we ran into. +- Disable `@typescript-eslint/no-unnecessary-type-arguments` ([#426](https://github.com/MetaMask/eslint-config/pull/426)) + - We decided that "unnecessary" type arguments make types easier to read sometimes, so we should allow them. ## [14.1.0] diff --git a/packages/typescript/rules-snapshot.json b/packages/typescript/rules-snapshot.json index 6a3d5a9c..f81cc068 100644 --- a/packages/typescript/rules-snapshot.json +++ b/packages/typescript/rules-snapshot.json @@ -91,7 +91,7 @@ "@typescript-eslint/no-this-alias": "error", "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error", "@typescript-eslint/no-unnecessary-qualifier": "error", - "@typescript-eslint/no-unnecessary-type-arguments": "error", + "@typescript-eslint/no-unnecessary-type-arguments": "off", "@typescript-eslint/no-unnecessary-type-assertion": "error", "@typescript-eslint/no-unnecessary-type-constraint": "error", "@typescript-eslint/no-unsafe-argument": "off", diff --git a/packages/typescript/src/index.mjs b/packages/typescript/src/index.mjs index 3903bd02..afa1e94d 100644 --- a/packages/typescript/src/index.mjs +++ b/packages/typescript/src/index.mjs @@ -78,6 +78,9 @@ const config = createConfig({ '@typescript-eslint/no-unsafe-enum-comparison': 'off', '@typescript-eslint/require-await': 'off', + // Disabled because unnecessary type arguments are sometimes helpful for readability + '@typescript-eslint/no-unnecessary-type-arguments': 'off', + // Our rules that require type information '@typescript-eslint/consistent-type-exports': 'error', '@typescript-eslint/naming-convention': [ @@ -152,7 +155,6 @@ const config = createConfig({ '@typescript-eslint/no-meaningless-void-operator': 'error', '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error', '@typescript-eslint/no-unnecessary-qualifier': 'error', - '@typescript-eslint/no-unnecessary-type-arguments': 'error', '@typescript-eslint/prefer-enum-initializers': 'error', '@typescript-eslint/prefer-includes': 'error', '@typescript-eslint/prefer-nullish-coalescing': 'error', From f3246f7ec2d4c206a0e8930765345339187d4a4e Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Tue, 2 Dec 2025 14:32:50 -0330 Subject: [PATCH 07/11] chore: Disable redudant lint rule (#425) The rule `promise/valid-params` is now disabled in our TypeScript config. The rule is redundant in a TypeScript context, where Promise parameters are being type-checked already. --- > [!NOTE] > Disables the `promise/valid-params` rule in the TypeScript config and documents it in the changelog, updating the rules snapshot. > > - **TypeScript ESLint config** > - Disable `promise/valid-params` in `packages/typescript/src/index.mjs` (redundant with TS type-checking). > - **Changelog** > - Add Unreleased note about disabling `promise/valid-params` in `packages/typescript/CHANGELOG.md`. > - **Rules snapshot** > - Update `packages/typescript/rules-snapshot.json` to include `"promise/valid-params": "off"`. > > Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 0ed1ba275cf86841adb077b0cbde57753070a1eb. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot). --- packages/typescript/CHANGELOG.md | 1 + packages/typescript/rules-snapshot.json | 1 + packages/typescript/src/index.mjs | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/packages/typescript/CHANGELOG.md b/packages/typescript/CHANGELOG.md index eea7356e..f3b279b4 100644 --- a/packages/typescript/CHANGELOG.md +++ b/packages/typescript/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - This version has a matching supported `typescript` range, and includes some bug fixes for problems we ran into. - Disable `@typescript-eslint/no-unnecessary-type-arguments` ([#426](https://github.com/MetaMask/eslint-config/pull/426)) - We decided that "unnecessary" type arguments make types easier to read sometimes, so we should allow them. +- Disable `promise/valid-params` because it's redundant in type-checked projects ([#425](https://github.com/MetaMask/eslint-config/pull/425)) ## [14.1.0] diff --git a/packages/typescript/rules-snapshot.json b/packages/typescript/rules-snapshot.json index f81cc068..139b8997 100644 --- a/packages/typescript/rules-snapshot.json +++ b/packages/typescript/rules-snapshot.json @@ -250,5 +250,6 @@ "prefer-promise-reject-errors": "off", "prefer-rest-params": "error", "prefer-spread": "error", + "promise/valid-params": "off", "require-await": "off" } diff --git a/packages/typescript/src/index.mjs b/packages/typescript/src/index.mjs index afa1e94d..035f8c2d 100644 --- a/packages/typescript/src/index.mjs +++ b/packages/typescript/src/index.mjs @@ -232,6 +232,11 @@ const config = createConfig({ message: 'Use a hash name instead.', }, ], + + /* promise plugin rules */ + + // TypeScript already validates Promise params, no need to validate them twice + 'promise/valid-params': 'off', }, }); From cf93ef1cabcd65365a3401043a2ad2087b1e2a6a Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Tue, 2 Dec 2025 14:45:14 -0330 Subject: [PATCH 08/11] fix: Disable `import-x/no-duplicates` in TypeScript files (#427) This rule had to be disabled in `core` because the autofixer is very broken. I'm also not sure we want to strictly require one import between type and non-type imports anyway, it's a stylistic preference. --- > [!NOTE] > Disables `import-x/no-duplicates` in the TypeScript ESLint config, updates the rules snapshot, and adds changelog entries noting the change and related autofix behavior fix. > > - **TypeScript ESLint config**: > - Disable `import-x/no-duplicates` in `packages/typescript/src/index.mjs` with rationale comments. > - **Rules Snapshot**: > - Set `import-x/no-duplicates` to `off` in `packages/typescript/rules-snapshot.json`. > - **Changelog**: > - Add "Changed" entry for disabling `import-x/no-duplicates` in `packages/typescript/CHANGELOG.md`. > - Add "Fixed" entry noting prevention of non-type imports being grouped under a type import during auto-fix. > > Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit d06d2c89572c3d743b76906ebc4d9d9a20382515. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot). --- packages/typescript/CHANGELOG.md | 7 +++++++ packages/typescript/rules-snapshot.json | 1 + packages/typescript/src/index.mjs | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/packages/typescript/CHANGELOG.md b/packages/typescript/CHANGELOG.md index f3b279b4..e6ddba70 100644 --- a/packages/typescript/CHANGELOG.md +++ b/packages/typescript/CHANGELOG.md @@ -14,6 +14,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Disable `@typescript-eslint/no-unnecessary-type-arguments` ([#426](https://github.com/MetaMask/eslint-config/pull/426)) - We decided that "unnecessary" type arguments make types easier to read sometimes, so we should allow them. - Disable `promise/valid-params` because it's redundant in type-checked projects ([#425](https://github.com/MetaMask/eslint-config/pull/425)) +- Disable `import-x/no-duplicates` ([#427](https://github.com/MetaMask/eslint-config/pull/427)) + - It was a style preference that we may not want, and the auto-fix was broken. + +### Fixed + +- Prevent non-type imports from being grouped under a type import upon auto-fix ([#427](https://github.com/MetaMask/eslint-config/pull/427)) + - This was caused by `import-x/no-duplicates`, which is now disabled. ## [14.1.0] diff --git a/packages/typescript/rules-snapshot.json b/packages/typescript/rules-snapshot.json index 139b8997..93d70972 100644 --- a/packages/typescript/rules-snapshot.json +++ b/packages/typescript/rules-snapshot.json @@ -155,6 +155,7 @@ "getter-return": "off", "import-x/consistent-type-specifier-style": ["error", "prefer-top-level"], "import-x/named": "off", + "import-x/no-duplicates": "off", "import-x/no-unresolved": "off", "jsdoc/check-access": "error", "jsdoc/check-alignment": "error", diff --git a/packages/typescript/src/index.mjs b/packages/typescript/src/index.mjs index 035f8c2d..7752811b 100644 --- a/packages/typescript/src/index.mjs +++ b/packages/typescript/src/index.mjs @@ -199,6 +199,11 @@ const config = createConfig({ /* import-x plugin rules */ + // This rule is to aggresive about combining type and non-type imports, which I'm not sure that we want. + // But more importantly, the auto-fixer is broken. + // See here for details on that bug: https://github.com/un-ts/eslint-plugin-import-x/issues/231 + 'import-x/no-duplicates': 'off', + // Handled by TypeScript 'import-x/no-unresolved': 'off', From 7837174f1d29fd4ee50173748009dac9b223d945 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Tue, 2 Dec 2025 19:15:37 -0330 Subject: [PATCH 09/11] feat: Loosen `@typescript-eslint/naming-convention` for object literal properties (#428) The rule `@typescript-eslint/naming-convention` has been updated to no longer enforce a naming convention for object literal properties. This too often needs to be disabled because of the naming conventions of 3rd party libraries/services that we don't control, which can require object-literal parameters. Closes #323 --- > [!NOTE] > Stops enforcing naming conventions for `objectLiteralProperty` in the TypeScript ESLint config; updates snapshot and changelog accordingly. > > - **TypeScript ESLint config (`packages/typescript/src/index.mjs`)**: > - Loosen `@typescript-eslint/naming-convention` by setting `objectLiteralProperty` `format: null` (with comment explaining third-party params). > - **Rules snapshot (`packages/typescript/rules-snapshot.json`)**: > - Reflect the `objectLiteralProperty` change to `format: null`. > - **Changelog (`packages/typescript/CHANGELOG.md`)**: > - Add entry noting the loosened naming convention for object literal properties. > > Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 2e72fb72735542f790a296df3c80f0cb538bc561. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot). --- packages/typescript/CHANGELOG.md | 2 ++ packages/typescript/rules-snapshot.json | 5 +---- packages/typescript/src/index.mjs | 4 +++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/typescript/CHANGELOG.md b/packages/typescript/CHANGELOG.md index e6ddba70..66e31569 100644 --- a/packages/typescript/CHANGELOG.md +++ b/packages/typescript/CHANGELOG.md @@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Disable `promise/valid-params` because it's redundant in type-checked projects ([#425](https://github.com/MetaMask/eslint-config/pull/425)) - Disable `import-x/no-duplicates` ([#427](https://github.com/MetaMask/eslint-config/pull/427)) - It was a style preference that we may not want, and the auto-fix was broken. +- Loosen `@typescript-eslint/naming-convention` by not enforcing naming conventions for object literal properties ([#428](https://github.com/MetaMask/eslint-config/pull/428)) + - Object literals are too often used as parameters for 3rd party libraries/services. ### Fixed diff --git a/packages/typescript/rules-snapshot.json b/packages/typescript/rules-snapshot.json index 93d70972..e76505fe 100644 --- a/packages/typescript/rules-snapshot.json +++ b/packages/typescript/rules-snapshot.json @@ -29,10 +29,7 @@ "selector": "objectLiteralMethod", "format": ["camelCase", "PascalCase", "UPPER_CASE"] }, - { - "selector": "objectLiteralProperty", - "format": ["camelCase", "PascalCase", "UPPER_CASE"] - }, + { "selector": "objectLiteralProperty", "format": null }, { "selector": "typeLike", "format": ["PascalCase"] }, { "selector": "typeParameter", diff --git a/packages/typescript/src/index.mjs b/packages/typescript/src/index.mjs index 7752811b..9bdeb557 100644 --- a/packages/typescript/src/index.mjs +++ b/packages/typescript/src/index.mjs @@ -113,7 +113,9 @@ const config = createConfig({ }, { selector: 'objectLiteralProperty', - format: ['camelCase', 'PascalCase', 'UPPER_CASE'], + // Disabled because object literals are often parameters to 3rd party libraries/services, + // which we don't set the naming conventions for + format: null, }, { selector: 'typeLike', From 9568eb3707153dd06d1289a2609d274929e115c7 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Wed, 3 Dec 2025 10:31:23 -0330 Subject: [PATCH 10/11] fix: Disable `jsdoc/check-indentation` to fix bullet list formatting (#430) Bulleted lists and other types of indented sections are incorrectly flagged by the current version of the `jsdoc/check-indentation` rule, so it has been temporarily disabled. We can bring it back in a later version after updating the plugin to 61.4, which includes a new option that can fix this problem. That has been postponed for now because it requires bumping the minimum supported Node.js version. Fixes #404 --- > [!NOTE] > Turns off `jsdoc/check-indentation` in the TypeScript ESLint config and updates the changelog and rule snapshot accordingly. > > - **TypeScript ESLint config (`packages/typescript/src/index.mjs`)**: > - Disable `jsdoc/check-indentation` (`'off'`) with notes about issues on indented sections/bullet lists. > - **Rules snapshot (`packages/typescript/rules-snapshot.json`)**: > - Update `jsdoc/check-indentation` from `"error"` to `"off"`. > - **Changelog (`packages/typescript/CHANGELOG.md`)**: > - Add entry under Changed to disable `jsdoc/check-indentation`. > - Add entry under Fixed noting false positives on TSDoc blocks with indented sections. > > Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 9ee5744e331cda060b114cfa19dc0bb3a06242d4. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot). --- packages/typescript/CHANGELOG.md | 3 +++ packages/typescript/rules-snapshot.json | 2 +- packages/typescript/src/index.mjs | 7 ++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/typescript/CHANGELOG.md b/packages/typescript/CHANGELOG.md index 66e31569..d75afc7a 100644 --- a/packages/typescript/CHANGELOG.md +++ b/packages/typescript/CHANGELOG.md @@ -18,11 +18,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - It was a style preference that we may not want, and the auto-fix was broken. - Loosen `@typescript-eslint/naming-convention` by not enforcing naming conventions for object literal properties ([#428](https://github.com/MetaMask/eslint-config/pull/428)) - Object literals are too often used as parameters for 3rd party libraries/services. +- Disable `jsdoc/check-indentation` ([#430](https://github.com/MetaMask/eslint-config/pull/430)) + - Disabled due to a problem with indended sections in TSDoc blocks. ### Fixed - Prevent non-type imports from being grouped under a type import upon auto-fix ([#427](https://github.com/MetaMask/eslint-config/pull/427)) - This was caused by `import-x/no-duplicates`, which is now disabled. +- Fix false positive lint error on TSDoc blocks with indended sections (e.g. bullet lists) ([#430](https://github.com/MetaMask/eslint-config/pull/430)) ## [14.1.0] diff --git a/packages/typescript/rules-snapshot.json b/packages/typescript/rules-snapshot.json index e76505fe..a153a46d 100644 --- a/packages/typescript/rules-snapshot.json +++ b/packages/typescript/rules-snapshot.json @@ -157,7 +157,7 @@ "jsdoc/check-access": "error", "jsdoc/check-alignment": "error", "jsdoc/check-examples": "off", - "jsdoc/check-indentation": "error", + "jsdoc/check-indentation": "off", "jsdoc/check-line-alignment": "off", "jsdoc/check-param-names": "error", "jsdoc/check-property-names": "error", diff --git a/packages/typescript/src/index.mjs b/packages/typescript/src/index.mjs index 9bdeb557..85297a35 100644 --- a/packages/typescript/src/index.mjs +++ b/packages/typescript/src/index.mjs @@ -217,9 +217,10 @@ const config = createConfig({ 'jsdoc/check-syntax': 'error', - // This is enabled here rather than in the base config because it doesn't play nicely with - // multi-line JSDoc types. - 'jsdoc/check-indentation': 'error', + // This is disabled because it doesn't work with bullet lists, and other types of indented + // sections. This issue is fixed in later versions, we can re-enable it after updating. + // See https://github.com/gajus/eslint-plugin-jsdoc/issues/541 for details + 'jsdoc/check-indentation': 'off', // Use TypeScript types rather than JSDoc types. 'jsdoc/no-types': 'error', From 0b8cf6db0edcc5e1582bf188a5495bfd6f1cf069 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Wed, 3 Dec 2025 13:21:26 -0330 Subject: [PATCH 11/11] Release/15.0.0 (#431) > [!NOTE] > Publishes v15.0.0 with stricter JSDoc requirements, escalates select rules to errors, updates TypeScript rules/peer deps, and bumps peer deps across all configs. > > - **Base (`@metamask/eslint-config`)**: > - **BREAKING:** Expand `jsdoc/require-jsdoc` coverage (arrow functions, classes, TS enums/interfaces/types, methods, etc.). > - **BREAKING:** Promote several `promise/*` rules from `warn` to `error`. > - **TypeScript (`@metamask/eslint-config-typescript`)**: > - **BREAKING:** Require `typescript-eslint@>=8.39.0`; switch to `import-x/consistent-type-specifier-style` preferring top-level type imports. > - Disable `@typescript-eslint/no-unnecessary-type-arguments`, `promise/valid-params`, and `import-x/no-duplicates`; loosen naming for object literal properties; disable `jsdoc/check-indentation`. > - Widen `typescript` peer range to all 5.x; fix issues with type-import grouping and TSDoc indentation. > - **Test configs**: > - **Jest:** Bump peer on base to `^15.0.0`; promote select `jest/*` rules to `error`; widen `typescript` peer to 5.x. > - **Vitest:** Version aligned to `15.0.0`; bump peer on base to `^15.0.0`. > - **Environment configs**: > - **Browser, CommonJS, Node.js, Mocha:** Bump versions to `15.0.0` and peer on base to `^15.0.0`. > - **Repo**: > - Root version to `15.0.0`; update changelogs and comparison links. > > Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 5eaa19a260247e3ce807c96666cffbd3eb9996e4. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot). --- package.json | 2 +- packages/base/CHANGELOG.md | 15 ++++++++++++++- packages/base/package.json | 2 +- packages/browser/CHANGELOG.md | 9 ++++++++- packages/browser/package.json | 2 +- packages/commonjs/CHANGELOG.md | 9 ++++++++- packages/commonjs/package.json | 2 +- packages/jest/CHANGELOG.md | 7 ++++++- packages/jest/package.json | 2 +- packages/mocha/CHANGELOG.md | 9 ++++++++- packages/mocha/package.json | 2 +- packages/nodejs/CHANGELOG.md | 9 ++++++++- packages/nodejs/package.json | 2 +- packages/typescript/CHANGELOG.md | 10 +++++++++- packages/typescript/package.json | 2 +- packages/vitest/CHANGELOG.md | 10 +++++++++- packages/vitest/package.json | 2 +- 17 files changed, 79 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 8d65d53f..a9e3b45b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/eslint-config-root", - "version": "14.1.0", + "version": "15.0.0", "private": true, "repository": { "type": "git", diff --git a/packages/base/CHANGELOG.md b/packages/base/CHANGELOG.md index 550dff59..400d12cf 100644 --- a/packages/base/CHANGELOG.md +++ b/packages/base/CHANGELOG.md @@ -7,8 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [15.0.0] + ### Changed +- **BREAKING:** Update `jsdoc/require-jsdoc` to require documentation for more things ([#394](https://github.com/MetaMask/eslint-config/pull/394)) + - New things that now require documentation are: + - Arrow functions + - Class declarations + - TypeScript enum declarations + - Function expressions + - TypeScript interface declarations + - Method definitions + - TypeScript type alias declarations + - TypeScript property signatures - **BREAKING:** Convert various rules from `warn` to `error` ([#424](https://github.com/MetaMask/eslint-config/pull/424)) - The rules impacted are: - `promise/no-callback-in-promise` @@ -280,7 +292,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add base, TypeScript, and Jest configs (#3) -[Unreleased]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config@14.1.0...HEAD +[Unreleased]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config@15.0.0...HEAD +[15.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config@14.1.0...@metamask/eslint-config@15.0.0 [14.1.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config@14.0.0...@metamask/eslint-config@14.1.0 [14.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config@13.0.0...@metamask/eslint-config@14.0.0 [13.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config@12.2.0...@metamask/eslint-config@13.0.0 diff --git a/packages/base/package.json b/packages/base/package.json index 642b64ca..60324e82 100644 --- a/packages/base/package.json +++ b/packages/base/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/eslint-config", - "version": "14.1.0", + "version": "15.0.0", "description": "Shareable MetaMask ESLint config.", "homepage": "https://github.com/MetaMask/eslint-config#readme", "bugs": { diff --git a/packages/browser/CHANGELOG.md b/packages/browser/CHANGELOG.md index 580b2694..9fcec7cd 100644 --- a/packages/browser/CHANGELOG.md +++ b/packages/browser/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [15.0.0] + +### Changed + +- **BREAKING:** Bump peer dependency on `@metamask/eslint-config` from `^14.0.0` to `^15.0.0` ([#431](https://github.com/MetaMask/eslint-config/pull/431)) + ## [14.0.0] ### Changed @@ -54,7 +60,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial release of this package. -[Unreleased]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-browser@14.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-browser@15.0.0...HEAD +[15.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-browser@14.0.0...@metamask/eslint-config-browser@15.0.0 [14.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-browser@13.0.0...@metamask/eslint-config-browser@14.0.0 [13.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-browser@12.1.0...@metamask/eslint-config-browser@13.0.0 [12.1.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-browser@12.0.0...@metamask/eslint-config-browser@12.1.0 diff --git a/packages/browser/package.json b/packages/browser/package.json index 04430bd3..5d60badd 100644 --- a/packages/browser/package.json +++ b/packages/browser/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/eslint-config-browser", - "version": "14.0.0", + "version": "15.0.0", "description": "Shareable MetaMask ESLint plugin for browser environments.", "homepage": "https://github.com/MetaMask/eslint-config#readme", "bugs": { diff --git a/packages/commonjs/CHANGELOG.md b/packages/commonjs/CHANGELOG.md index 70f3c3e6..d7605625 100644 --- a/packages/commonjs/CHANGELOG.md +++ b/packages/commonjs/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [15.0.0] + +### Changed + +- **BREAKING:** Bump peer dependency on `@metamask/eslint-config` from `^14.0.0` to `^15.0.0` ([#431](https://github.com/MetaMask/eslint-config/pull/431)) + ## [14.0.0] ### Changed @@ -49,7 +55,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial release of this package ([#267](https://github.com/MetaMask/eslint-config/pull/267)) -[Unreleased]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-commonjs@14.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-commonjs@15.0.0...HEAD +[15.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-commonjs@14.0.0...@metamask/eslint-config-commonjs@15.0.0 [14.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-commonjs@13.0.0...@metamask/eslint-config-commonjs@14.0.0 [13.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-commonjs@12.1.0...@metamask/eslint-config-commonjs@13.0.0 [12.1.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-commonjs@12.0.0...@metamask/eslint-config-commonjs@12.1.0 diff --git a/packages/commonjs/package.json b/packages/commonjs/package.json index bf5724c0..1e218d0c 100644 --- a/packages/commonjs/package.json +++ b/packages/commonjs/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/eslint-config-commonjs", - "version": "14.0.0", + "version": "15.0.0", "description": "Shareable MetaMask ESLint config for CommonJS projects.", "homepage": "https://github.com/MetaMask/eslint-config#readme", "bugs": { diff --git a/packages/jest/CHANGELOG.md b/packages/jest/CHANGELOG.md index ed9c7bf8..c76e5f55 100644 --- a/packages/jest/CHANGELOG.md +++ b/packages/jest/CHANGELOG.md @@ -7,14 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [15.0.0] + ### Changed +- **BREAKING:** Bump peer dependency on `@metamask/eslint-config` from `^14.0.0` to `^15.0.0` ([#431](https://github.com/MetaMask/eslint-config/pull/431)) - **BREAKING:** Convert various rules from `warn` to `error` ([#424](https://github.com/MetaMask/eslint-config/pull/424)) - The rules impacted are: - `jest/expect-expect` - `jest/no-alias-methods` - `jest/no-commented-out-tests` - `jest/no-disabled-tests` +- Widen `typescript` peer dependency to allow all 5.x versions ([#422](https://github.com/MetaMask/eslint-config/pull/422)) ## [14.1.0] @@ -124,7 +128,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - To continue extending this config, install this package and update your `.eslintrc.js` `extends` array to include `@metamask/eslint-config-jest` instead of `@metamask/eslint-config/jest`. - Update `eslint` and other ESLint peer dependencies ([#151](https://github.com/MetaMask/eslint-config/pull/151)) -[Unreleased]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-jest@14.1.0...HEAD +[Unreleased]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-jest@15.0.0...HEAD +[15.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-jest@14.1.0...@metamask/eslint-config-jest@15.0.0 [14.1.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-jest@14.0.0...@metamask/eslint-config-jest@14.1.0 [14.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-jest@13.0.0...@metamask/eslint-config-jest@14.0.0 [13.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-jest@12.1.0...@metamask/eslint-config-jest@13.0.0 diff --git a/packages/jest/package.json b/packages/jest/package.json index 0d8b85e2..aa724df8 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/eslint-config-jest", - "version": "14.1.0", + "version": "15.0.0", "description": "Shareable MetaMask ESLint config for Jest.", "homepage": "https://github.com/MetaMask/eslint-config#readme", "bugs": { diff --git a/packages/mocha/CHANGELOG.md b/packages/mocha/CHANGELOG.md index 57d866c1..50f610b1 100644 --- a/packages/mocha/CHANGELOG.md +++ b/packages/mocha/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [15.0.0] + +### Changed + +- **BREAKING:** Bump peer dependency on `@metamask/eslint-config` from `^14.0.0` to `^15.0.0` ([#431](https://github.com/MetaMask/eslint-config/pull/431)) + ## [14.0.0] ### Changed @@ -109,7 +115,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - To continue extending this config, install this package and update your `.eslintrc.js` `extends` array to include `@metamask/eslint-config-mocha` instead of `@metamask/eslint-config/mocha`. - Update `eslint` and other ESLint peer dependencies ([#151](https://github.com/MetaMask/eslint-config/pull/151)) -[Unreleased]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-mocha@14.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-mocha@15.0.0...HEAD +[15.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-mocha@14.0.0...@metamask/eslint-config-mocha@15.0.0 [14.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-mocha@13.0.0...@metamask/eslint-config-mocha@14.0.0 [13.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-mocha@12.1.0...@metamask/eslint-config-mocha@13.0.0 [12.1.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-mocha@12.0.0...@metamask/eslint-config-mocha@12.1.0 diff --git a/packages/mocha/package.json b/packages/mocha/package.json index 232cac03..89809bdf 100644 --- a/packages/mocha/package.json +++ b/packages/mocha/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/eslint-config-mocha", - "version": "14.0.0", + "version": "15.0.0", "description": "Shareable MetaMask ESLint config for Mocha.", "homepage": "https://github.com/MetaMask/eslint-config#readme", "bugs": { diff --git a/packages/nodejs/CHANGELOG.md b/packages/nodejs/CHANGELOG.md index 34f9ae49..fd26a15f 100644 --- a/packages/nodejs/CHANGELOG.md +++ b/packages/nodejs/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [15.0.0] + +### Changed + +- **BREAKING:** Bump peer dependency on `@metamask/eslint-config` from `^14.0.0` to `^15.0.0` ([#431](https://github.com/MetaMask/eslint-config/pull/431)) + ## [14.0.0] ### Changed @@ -123,7 +129,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - To continue extending this config, install this package and update your `.eslintrc.js` `extends` array to include `@metamask/eslint-config-nodejs` instead of `@metamask/eslint-config/nodejs`. - Update `eslint` and other ESLint peer dependencies ([#151](https://github.com/MetaMask/eslint-config/pull/151)) -[Unreleased]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-nodejs@14.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-nodejs@15.0.0...HEAD +[15.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-nodejs@14.0.0...@metamask/eslint-config-nodejs@15.0.0 [14.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-nodejs@13.0.0...@metamask/eslint-config-nodejs@14.0.0 [13.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-nodejs@12.1.0...@metamask/eslint-config-nodejs@13.0.0 [12.1.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-nodejs@12.0.0...@metamask/eslint-config-nodejs@12.1.0 diff --git a/packages/nodejs/package.json b/packages/nodejs/package.json index 36256fa4..fe784f9b 100644 --- a/packages/nodejs/package.json +++ b/packages/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/eslint-config-nodejs", - "version": "14.0.0", + "version": "15.0.0", "description": "Shareable MetaMask ESLint config for Node.js.", "homepage": "https://github.com/MetaMask/eslint-config#readme", "bugs": { diff --git a/packages/typescript/CHANGELOG.md b/packages/typescript/CHANGELOG.md index d75afc7a..2c1ac42a 100644 --- a/packages/typescript/CHANGELOG.md +++ b/packages/typescript/CHANGELOG.md @@ -7,10 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [15.0.0] + ### Changed +- **BREAKING:** Bump peer dependency on `@metamask/eslint-config` from `^14.0.0` to `^15.0.0` ([#431](https://github.com/MetaMask/eslint-config/pull/431)) - **BREAKING:** Update `typescript-eslint` peer dependency to have a minimum version of v8.39.0 ([#423](https://github.com/MetaMask/eslint-config/pull/423)) - This version has a matching supported `typescript` range, and includes some bug fixes for problems we ran into. +- **BREAKING:** Update type import specifier rules ([#381](https://github.com/MetaMask/eslint-config/pull/381)) + - `@typescript-eslint/consistent-type-imports` has been replaced with `import-x/consistent-type-specifier-style` + - The rule now prefers "top-level" type imports over inline. e.g. `import type { a } from 'x'` over `import { type a } from 'x'` - Disable `@typescript-eslint/no-unnecessary-type-arguments` ([#426](https://github.com/MetaMask/eslint-config/pull/426)) - We decided that "unnecessary" type arguments make types easier to read sometimes, so we should allow them. - Disable `promise/valid-params` because it's redundant in type-checked projects ([#425](https://github.com/MetaMask/eslint-config/pull/425)) @@ -20,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Object literals are too often used as parameters for 3rd party libraries/services. - Disable `jsdoc/check-indentation` ([#430](https://github.com/MetaMask/eslint-config/pull/430)) - Disabled due to a problem with indended sections in TSDoc blocks. +- Widen `typescript` peer dependency to allow all 5.x versions ([#422](https://github.com/MetaMask/eslint-config/pull/422)) ### Fixed @@ -204,7 +211,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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`. - Update `eslint` and other ESLint peer dependencies ([#151](https://github.com/MetaMask/eslint-config/pull/151)) -[Unreleased]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-typescript@14.1.0...HEAD +[Unreleased]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-typescript@15.0.0...HEAD +[15.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-typescript@14.1.0...@metamask/eslint-config-typescript@15.0.0 [14.1.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-typescript@14.0.0...@metamask/eslint-config-typescript@14.1.0 [14.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-typescript@13.0.0...@metamask/eslint-config-typescript@14.0.0 [13.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-typescript@12.1.0...@metamask/eslint-config-typescript@13.0.0 diff --git a/packages/typescript/package.json b/packages/typescript/package.json index 18210668..13b17e23 100644 --- a/packages/typescript/package.json +++ b/packages/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/eslint-config-typescript", - "version": "14.1.0", + "version": "15.0.0", "description": "Shareable MetaMask ESLint config for TypeScript.", "homepage": "https://github.com/MetaMask/eslint-config#readme", "bugs": { diff --git a/packages/vitest/CHANGELOG.md b/packages/vitest/CHANGELOG.md index 2e77607b..403c3381 100644 --- a/packages/vitest/CHANGELOG.md +++ b/packages/vitest/CHANGELOG.md @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [15.0.0] + +### Changed + +- **BREAKING:** Bump peer dependency on `@metamask/eslint-config` from `^14.0.0` to `^15.0.0` ([#431](https://github.com/MetaMask/eslint-config/pull/431)) +- Bump version to v15 rather than v2 to synchronize this with the other lint config packages ([#431](https://github.com/MetaMask/eslint-config/pull/431)) + ## [1.0.0] ### Added @@ -15,5 +22,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - This config is based on the `@metamask/eslint-config-jest` config, but uses the Vitest plugin instead of Jest. -[Unreleased]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-vitest@1.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-vitest@15.0.0...HEAD +[15.0.0]: https://github.com/MetaMask/eslint-config/compare/@metamask/eslint-config-vitest@1.0.0...@metamask/eslint-config-vitest@15.0.0 [1.0.0]: https://github.com/MetaMask/eslint-config/releases/tag/@metamask/eslint-config-vitest@1.0.0 diff --git a/packages/vitest/package.json b/packages/vitest/package.json index bdfdbdea..77fb8e64 100644 --- a/packages/vitest/package.json +++ b/packages/vitest/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/eslint-config-vitest", - "version": "1.0.0", + "version": "15.0.0", "description": "Shareable MetaMask ESLint config for Vitest.", "homepage": "https://github.com/MetaMask/eslint-config#readme", "bugs": {