-
Notifications
You must be signed in to change notification settings - Fork 19
Comparing changes
Open a pull request
base repository: MetaMask/eslint-config
base: @metamask/[email protected]
head repository: MetaMask/eslint-config
compare: @metamask/[email protected]
- 11 commits
- 29 files changed
- 3 contributors
Commits on Nov 10, 2025
-
Revert "Revert "feat(typescript): Update type import specifier rules"" (
#418) Reverts #407, which itself was a revert of #381 because it had breaking changes, and we wanted to release some non-breaking things first. This PR restores the breaking changes in #381. <!-- CURSOR_SUMMARY --> --- > [!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`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 245508b. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Configuration menu - View commit details
-
Copy full SHA for 636bc75 - Browse repository at this point
Copy the full SHA 636bc75View commit details -
BREAKING: Update
jsdoc/require-jsdocto require documentation for m……ore 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. <!-- CURSOR_SUMMARY --> --- > [!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. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit e0efa13. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Configuration menu - View commit details
-
Copy full SHA for c70a3ff - Browse repository at this point
Copy the full SHA c70a3ffView commit details
Commits on Dec 1, 2025
-
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.
Configuration menu - View commit details
-
Copy full SHA for b116974 - Browse repository at this point
Copy the full SHA b116974View commit details
Commits on Dec 2, 2025
-
chore: Increase minimum
typescript-eslintversion (#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: typescript-eslint/typescript-eslint#8721 <!-- CURSOR_SUMMARY --> --- > [!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. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 735688e. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Configuration menu - View commit details
-
Copy full SHA for b243e90 - Browse repository at this point
Copy the full SHA b243e90View commit details -
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. <!-- CURSOR_SUMMARY --> --- > [!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. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit a545b6a. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Configuration menu - View commit details
-
Copy full SHA for a0e0bc8 - Browse repository at this point
Copy the full SHA a0e0bc8View commit details -
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 <!-- CURSOR_SUMMARY --> --- > [!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`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit f9b673c. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Configuration menu - View commit details
-
Copy full SHA for 383fbec - Browse repository at this point
Copy the full SHA 383fbecView commit details -
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. <!-- CURSOR_SUMMARY --> --- > [!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"`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 0ed1ba2. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Configuration menu - View commit details
-
Copy full SHA for f3246f7 - Browse repository at this point
Copy the full SHA f3246f7View commit details -
fix: Disable
import-x/no-duplicatesin 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. <!-- CURSOR_SUMMARY --> --- > [!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. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit d06d2c8. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Configuration menu - View commit details
-
Copy full SHA for cf93ef1 - Browse repository at this point
Copy the full SHA cf93ef1View commit details -
feat: Loosen
@typescript-eslint/naming-conventionfor object litera……l 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 <!-- CURSOR_SUMMARY --> --- > [!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. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 2e72fb7. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Configuration menu - View commit details
-
Copy full SHA for 7837174 - Browse repository at this point
Copy the full SHA 7837174View commit details
Commits on Dec 3, 2025
-
fix: Disable
jsdoc/check-indentationto 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 <!-- CURSOR_SUMMARY --> --- > [!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. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 9ee5744. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Configuration menu - View commit details
-
Copy full SHA for 9568eb3 - Browse repository at this point
Copy the full SHA 9568eb3View commit details -
<!-- CURSOR_SUMMARY --> > [!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. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 5eaa19a. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Configuration menu - View commit details
-
Copy full SHA for 0b8cf6d - Browse repository at this point
Copy the full SHA 0b8cf6dView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff @metamask/[email protected]...@metamask/[email protected]