diff --git a/package.json b/package.json index e6795733..cd76ef0b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "root", - "version": "10.0.0", + "version": "11.0.0", "private": true, "repository": { "type": "git", @@ -26,8 +26,8 @@ "@eslint/eslintrc": "^1.3.0", "@lavamoat/allow-scripts": "^2.0.3", "@metamask/auto-changelog": "^3.0.0", - "@metamask/eslint-config": "*", - "@metamask/eslint-config-nodejs": "*", + "@metamask/eslint-config": "^11.0.0", + "@metamask/eslint-config-nodejs": "^11.0.0", "@metamask/utils": "^3.3.1", "@types/jest": "^29.2.2", "eslint": "^8.27.0", diff --git a/packages/base/CHANGELOG.md b/packages/base/CHANGELOG.md index e8548816..4f2d73d1 100644 --- a/packages/base/CHANGELOG.md +++ b/packages/base/CHANGELOG.md @@ -6,28 +6,44 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [11.0.0] +### Added +- **BREAKING:** Enable id-denylist and id-length in base config ([#200](https://github.com/MetaMask/eslint-config/pull/200)) +- **BREAKING:** Add rules for hybrid Node.js and browser environments ([#242](https://github.com/MetaMask/eslint-config/pull/242)) + - The base config now only allows globals and modules that are available in both Node.js and browsers. + - This adds a new `@metamask/eslint-config-browser` package, to be used in browser-only environments. + - The `@metamask/eslint-config-nodejs` package has been updated to allow Node.js-only globals and modules. + +### Changed +- **BREAKING:** Remove no-undef in favour of custom environments configuration ([#254](https://github.com/MetaMask/eslint-config/pull/254)) +- **BREAKING:** Bump all ESLint dependencies to the latest version ([#252](https://github.com/MetaMask/eslint-config/pull/252)) + - This includes peer dependencies. +- **BREAKING:** Automatically sort imports ([#248](https://github.com/MetaMask/eslint-config/pull/248)) +- **BREAKING:** Disable more undesired syntax ([#207](https://github.com/MetaMask/eslint-config/pull/207)) + - This disables the `with` statement, function expressions, and the `in` operator. + ## [10.0.0] ### Changed -- **(BREAKING)** Update ESLint from v7 to v8 ([#233](https://github.com/MetaMask/eslint-config/pull/233)) +- **BREAKING:** Update ESLint from v7 to v8 ([#233](https://github.com/MetaMask/eslint-config/pull/233)) - This is breaking because `eslint` is a `peerDependency`. - Four new rules have been added: - [`no-loss-of-precision`](https://eslint.org/docs/latest/rules/no-loss-of-precision) - [`no-nonoctal-decimal-escape`](https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape) - [`no-unsafe-optional-chaining`](https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining) - [`no-useless-backreference`](https://eslint.org/docs/latest/rules/no-useless-backreference) -- **(BREAKING)** Update `eslint-plugin-prettier` from v3 to v4 ([#231](https://github.com/MetaMask/eslint-config/pull/231)) +- **BREAKING:** Update `eslint-plugin-prettier` from v3 to v4 ([#231](https://github.com/MetaMask/eslint-config/pull/231)) - This is breaking beacuse `eslint-plugin-prettier` is a `peerDependency`. -- **(BREAKING)** Update minimium Node.js version to v14 ([#225](https://github.com/MetaMask/eslint-config/pull/225)) +- **BREAKING:** Update minimium Node.js version to v14 ([#225](https://github.com/MetaMask/eslint-config/pull/225)) - Ignore rest siblings for `no-unused-vars` ([#213](https://github.com/MetaMask/eslint-config/pull/213)) - This makes the `no-unused-vars` rule more permissive ## [9.0.0] ### Added -- **BREAKING** Add JSDoc ESLint rules ([#203](https://github.com/MetaMask/eslint-config/pull/203)) +- **BREAKING:** Add JSDoc ESLint rules ([#203](https://github.com/MetaMask/eslint-config/pull/203)) ## [8.0.0] ### Changed -- **(BREAKING)** Require newlines between multiline blocks and expressions ([#197](https://github.com/MetaMask/eslint-config/pull/197)) +- **BREAKING:** Require newlines between multiline blocks and expressions ([#197](https://github.com/MetaMask/eslint-config/pull/197)) ## [7.0.1] ### Fixed @@ -39,8 +55,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [7.0.0] ### Changed -- **(BREAKING)** Update Prettier `quoteProps` rule to `as-needed` ([#181](https://github.com/MetaMask/eslint-config/pull/181)) -- **(BREAKING)** Update ESLint `no-shadow` config ([#168](https://github.com/MetaMask/eslint-config/pull/168)) +- **BREAKING:** Update Prettier `quoteProps` rule to `as-needed` ([#181](https://github.com/MetaMask/eslint-config/pull/181)) +- **BREAKING:** Update ESLint `no-shadow` config ([#168](https://github.com/MetaMask/eslint-config/pull/168)) - Use recommended `eslint-plugin-import` rule sets ([#184](https://github.com/MetaMask/eslint-config/pull/184)) - This only removed or disabled rules, and is not breaking. - Update install instructions in readme ([#185](https://github.com/MetaMask/eslint-config/pull/185)) @@ -48,15 +64,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [6.0.0] - 2021-04-08 ### Changed -- **(BREAKING)** Set minimum Node.js version to `^12.0.0` ([#144](https://github.com/MetaMask/eslint-config/pull/144)) -- **(BREAKING)** Set ECMAScript version to `es2017`/`8` ([#150](https://github.com/MetaMask/eslint-config/pull/150)) -- **(BREAKING)** Add the [Prettier](https://prettier.io) ESLint plugin and extend the recommended Prettier ESLint config ([#96](https://github.com/MetaMask/eslint-config/pull/96)) +- **BREAKING:** Set minimum Node.js version to `^12.0.0` ([#144](https://github.com/MetaMask/eslint-config/pull/144)) +- **BREAKING:** Set ECMAScript version to `es2017`/`8` ([#150](https://github.com/MetaMask/eslint-config/pull/150)) +- **BREAKING:** Add the [Prettier](https://prettier.io) ESLint plugin and extend the recommended Prettier ESLint config ([#96](https://github.com/MetaMask/eslint-config/pull/96)) - See [here](https://github.com/prettier/eslint-plugin-prettier/blob/d993f24/eslint-plugin-prettier.js#L62-L73) for the `eslint-plugin-prettier` rules and [here](https://github.com/prettier/eslint-config-prettier/blob/abf3ba1/index.js) for the rules of `eslint-config-prettier`, which the plugin extends. - The rules of this config should otherwise be unchanged. - Update `eslint` and other ESLint peer dependencies ([#151](https://github.com/MetaMask/eslint-config/pull/151)) ### Removed -- **(BREAKING)** All configs except the base config ([#141](https://github.com/MetaMask/eslint-config/pull/141)) +- **BREAKING:** All configs except the base config ([#141](https://github.com/MetaMask/eslint-config/pull/141)) - All configs are now published as separate packages, and must be extended by referencing their package names: - [`@metamask/eslint-config`](https://npmjs.com/package/@metamask/eslint-config) (the base config) - [`@metamask/eslint-config-jest`](https://npmjs.com/package/@metamask/eslint-config-jest) @@ -66,9 +82,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [5.0.0] - 2021-02-02 ### Changed -- **(BREAKING)** Enable `semi` in base config ([#101](https://github.com/MetaMask/eslint-config/pull/101)) -- **(BREAKING)** Disallow spaces before parentheses of named functions ([#101](https://github.com/MetaMask/eslint-config/pull/101)) -- **(BREAKING)** Upgrade to TypeScript v4 and corresponding `@typescript-eslint` dependencies ([#79](https://github.com/MetaMask/eslint-config/pull/79), [#80](https://github.com/MetaMask/eslint-config/pull/80), [#103](https://github.com/MetaMask/eslint-config/pull/103)) +- **BREAKING:** Enable `semi` in base config ([#101](https://github.com/MetaMask/eslint-config/pull/101)) +- **BREAKING:** Disallow spaces before parentheses of named functions ([#101](https://github.com/MetaMask/eslint-config/pull/101)) +- **BREAKING:** Upgrade to TypeScript v4 and corresponding `@typescript-eslint` dependencies ([#79](https://github.com/MetaMask/eslint-config/pull/79), [#80](https://github.com/MetaMask/eslint-config/pull/80), [#103](https://github.com/MetaMask/eslint-config/pull/103)) ## [4.1.0] - 2020-10-21 ### Changed @@ -77,7 +93,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [4.0.0] - 2020-10-20 ### Changed -- **(BREAKING)** Update to ESLint v7 (#46, #58, #62, #63) +- **BREAKING:** Update to ESLint v7 (#46, #58, #62, #63) - Relax `member-delimiter-style` for TypeScript ([#68](https://github.com/MetaMask/eslint-config/pull/68)) - Disable `space-before-function-paren` for TypeScript ([#65](https://github.com/MetaMask/eslint-config/pull/65)) @@ -131,7 +147,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Add base, TypeScript, and Jest configs (#3) -[Unreleased]: https://github.com/MetaMask/eslint-config/compare/v10.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/eslint-config/compare/v11.0.0...HEAD +[11.0.0]: https://github.com/MetaMask/eslint-config/compare/v10.0.0...v11.0.0 [10.0.0]: https://github.com/MetaMask/eslint-config/compare/v9.0.0...v10.0.0 [9.0.0]: https://github.com/MetaMask/eslint-config/compare/v8.0.0...v9.0.0 [8.0.0]: https://github.com/MetaMask/eslint-config/compare/v7.0.1...v8.0.0 diff --git a/packages/base/README.md b/packages/base/README.md index 443b91fd..2f45d27c 100644 --- a/packages/base/README.md +++ b/packages/base/README.md @@ -8,7 +8,7 @@ Our default export contains a base set of ESLint rules for ES6+: ```bash yarn add --dev \ - @metamask/eslint-config@^10.0.0 \ + @metamask/eslint-config@^11.0.0 \ eslint@^8.27.0 \ eslint-config-prettier@^8.5.0 \ eslint-plugin-import@^2.26.0 \ diff --git a/packages/base/package.json b/packages/base/package.json index a0aef1d0..60898220 100644 --- a/packages/base/package.json +++ b/packages/base/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/eslint-config", - "version": "10.0.0", + "version": "11.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 36a58ce9..985db8ac 100644 --- a/packages/browser/CHANGELOG.md +++ b/packages/browser/CHANGELOG.md @@ -6,4 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -[Unreleased]: https://github.com/MetaMask/eslint-config/ +## [11.0.0] +### Added +- Initial release of this package. + +[Unreleased]: https://github.com/MetaMask/eslint-config/compare/v11.0.0...HEAD +[11.0.0]: https://github.com/MetaMask/eslint-config/releases/tag/v11.0.0 diff --git a/packages/browser/README.md b/packages/browser/README.md index 0bbc3461..36161477 100644 --- a/packages/browser/README.md +++ b/packages/browser/README.md @@ -8,8 +8,8 @@ Our default export contains a base set of ESLint rules for ES6+: ```bash yarn add --dev \ - @metamask/eslint-config@^10.0.0 \ - @metamask/eslint-config-browser@^10.0.0 \ + @metamask/eslint-config@^11.0.0 \ + @metamask/eslint-config-browser@^11.0.0 \ eslint@^8.27.0 \ eslint-config-prettier@^8.5.0 \ eslint-plugin-import@^2.26.0 \ diff --git a/packages/browser/package.json b/packages/browser/package.json index 19226e20..bc86fc55 100644 --- a/packages/browser/package.json +++ b/packages/browser/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/eslint-config-browser", - "version": "10.0.0", + "version": "11.0.0", "description": "Shareable MetaMask ESLint plugin for browser environments.", "homepage": "https://github.com/MetaMask/eslint-config#readme", "bugs": { @@ -30,7 +30,7 @@ "prettier": "^2.7.1" }, "peerDependencies": { - "@metamask/eslint-config": "^10.0.0", + "@metamask/eslint-config": "^11.0.0", "eslint": "^8.27.0" }, "engines": { diff --git a/packages/jest/CHANGELOG.md b/packages/jest/CHANGELOG.md index 83e9b238..b4c9f138 100644 --- a/packages/jest/CHANGELOG.md +++ b/packages/jest/CHANGELOG.md @@ -6,28 +6,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [11.0.0] +### Changed +- **BREAKING:** Bump all ESLint dependencies to the latest version ([#252](https://github.com/MetaMask/eslint-config/pull/252)) + - This includes peer dependencies. + ## [10.0.0] ### Changed -- **(BREAKING)** Update ESLint from v7 to v8 ([#233](https://github.com/MetaMask/eslint-config/pull/233)) +- **BREAKING:** Update ESLint from v7 to v8 ([#233](https://github.com/MetaMask/eslint-config/pull/233)) - This is breaking because `eslint` is a `peerDependency`. - Four new rules have been added: - [`no-loss-of-precision`](https://eslint.org/docs/latest/rules/no-loss-of-precision) - [`no-nonoctal-decimal-escape`](https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape) - [`no-unsafe-optional-chaining`](https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining) - [`no-useless-backreference`](https://eslint.org/docs/latest/rules/no-useless-backreference) -- **(BREAKING)** Bump eslint-plugin-jest to ^26.x ([#228](https://github.com/MetaMask/eslint-config/pull/228)) +- **BREAKING:** Bump eslint-plugin-jest to ^26.x ([#228](https://github.com/MetaMask/eslint-config/pull/228)) - This is breaking because `eslint-plugin-jest` is a `peerDependency` - The rule [`jest/prefer-to-be`](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-to-be.md) has replaced the old rules `jest/prefer-to-be-null` and `jest/prefer-to-be-undefined`. This is breaking because it is more broadly applicable than the two it replaces, and may force us to use `toBe` for all primatives (over `toBeEqual` or equivalent). - Two rules were renamed (`jest/valid-describe` => `jest/valid-describe-callback`, and `jest/lowercase-name` => `jest/prefer-lowercase-title`) -- **(BREAKING)** Update minimium Node.js version to v14 ([#225](https://github.com/MetaMask/eslint-config/pull/225)) +- **BREAKING:** Update minimium Node.js version to v14 ([#225](https://github.com/MetaMask/eslint-config/pull/225)) ## [9.0.0] ### Added -- **BREAKING** Add JSDoc ESLint rules ([#203](https://github.com/MetaMask/eslint-config/pull/203)) +- **BREAKING:** Add JSDoc ESLint rules ([#203](https://github.com/MetaMask/eslint-config/pull/203)) ## [8.0.0] ### Changed -- ***BREAKING*** The peer dependency `@metamask/eslint-config` has been updated from v7 to v8. +- **BREAKING:** The peer dependency `@metamask/eslint-config` has been updated from v7 to v8. ## [7.0.0] ### Changed @@ -39,14 +44,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [6.0.0] - 2021-04-08 ### Changed -- **(BREAKING)** Set minimum Node.js version to `^12.0.0` ([#144](https://github.com/MetaMask/eslint-config/pull/144)) +- **BREAKING:** Set minimum Node.js version to `^12.0.0` ([#144](https://github.com/MetaMask/eslint-config/pull/144)) - Publish this config as its own package ([#141](https://github.com/MetaMask/eslint-config/pull/141)) - The contents of this package were previously published as part of [`@metamask/eslint-config`](https://npmjs.com/package/@metamask/eslint-config). For changes prior to version `6.0.0`, please refer to the changelog of that package. - 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/v10.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/eslint-config/compare/v11.0.0...HEAD +[11.0.0]: https://github.com/MetaMask/eslint-config/compare/v10.0.0...v11.0.0 [10.0.0]: https://github.com/MetaMask/eslint-config/compare/v9.0.0...v10.0.0 [9.0.0]: https://github.com/MetaMask/eslint-config/compare/v8.0.0...v9.0.0 [8.0.0]: https://github.com/MetaMask/eslint-config/compare/v7.0.0...v8.0.0 diff --git a/packages/jest/README.md b/packages/jest/README.md index 799be2c1..c1c5918f 100644 --- a/packages/jest/README.md +++ b/packages/jest/README.md @@ -6,8 +6,8 @@ MetaMask's [Jest](https://jestjs.io/) ESLint configuration. ```bash yarn add --dev \ - @metamask/eslint-config@^10.0.0 \ - @metamask/eslint-config-jest@^10.0.0 \ + @metamask/eslint-config@^11.0.0 \ + @metamask/eslint-config-jest@^11.0.0 \ eslint@^8.27.0 \ eslint-config-prettier@^8.5.0 \ eslint-plugin-import@^2.26.0 \ diff --git a/packages/jest/package.json b/packages/jest/package.json index 57f6ad31..da1f92f2 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/eslint-config-jest", - "version": "10.0.0", + "version": "11.0.0", "description": "Shareable MetaMask ESLint config for Jest.", "homepage": "https://github.com/MetaMask/eslint-config#readme", "bugs": { @@ -22,7 +22,7 @@ }, "devDependencies": { "@metamask/auto-changelog": "^3.0.0", - "@metamask/eslint-config": "^10.0.0", + "@metamask/eslint-config": "^11.0.0", "eslint": "^8.27.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-import": "^2.26.0", @@ -32,7 +32,7 @@ "prettier": "^2.7.1" }, "peerDependencies": { - "@metamask/eslint-config": "^10.0.0", + "@metamask/eslint-config": "^11.0.0", "eslint": "^8.27.0", "eslint-plugin-jest": "^27.1.5" }, diff --git a/packages/mocha/CHANGELOG.md b/packages/mocha/CHANGELOG.md index 9cf9b6db..7d9d6270 100644 --- a/packages/mocha/CHANGELOG.md +++ b/packages/mocha/CHANGELOG.md @@ -6,29 +6,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [11.0.0] +### Changed +- **BREAKING:** Bump all ESLint dependencies to the latest version ([#252](https://github.com/MetaMask/eslint-config/pull/252)) + - This includes peer dependencies. + ## [10.0.0] ### Changed -- **(BREAKING)** Update ESLint from v7 to v8 ([#233](https://github.com/MetaMask/eslint-config/pull/233)) +- **BREAKING:** Update ESLint from v7 to v8 ([#233](https://github.com/MetaMask/eslint-config/pull/233)) - This is breaking because `eslint` is a `peerDependency`. - Four new rules have been added: - [`no-loss-of-precision`](https://eslint.org/docs/latest/rules/no-loss-of-precision) - [`no-nonoctal-decimal-escape`](https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape) - [`no-unsafe-optional-chaining`](https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining) - [`no-useless-backreference`](https://eslint.org/docs/latest/rules/no-useless-backreference) -- **(BREAKING)** Update `eslint-plugin-mocha` from v8 to v10 ([#232](https://github.com/MetaMask/eslint-config/pull/232)) +- **BREAKING:** Update `eslint-plugin-mocha` from v8 to v10 ([#232](https://github.com/MetaMask/eslint-config/pull/232)) - This is breaking because `eslint-plugin-mocha` is a `peerDependency`. - The rule [`mocha/no-empty-description`](https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/no-empty-description.md) was added. -- **(BREAKING)** Update minimium Node.js version to v14 ([#225](https://github.com/MetaMask/eslint-config/pull/225)) +- **BREAKING:** Update minimium Node.js version to v14 ([#225](https://github.com/MetaMask/eslint-config/pull/225)) - Update Mocha ecmaVersion ([#218](https://github.com/MetaMask/eslint-config/pull/218)) - This lets us use newer JavaScript features in our Mocha tests. ## [9.0.0] ### Added -- **BREAKING** Add JSDoc ESLint rules ([#203](https://github.com/MetaMask/eslint-config/pull/203)) +- **BREAKING:** Add JSDoc ESLint rules ([#203](https://github.com/MetaMask/eslint-config/pull/203)) ## [8.0.0] ### Changed -- ***BREAKING*** The peer dependency `@metamask/eslint-config` has been updated from v7 to v8. +- **BREAKING:** The peer dependency `@metamask/eslint-config` has been updated from v7 to v8. ## [7.0.0] ### Changed @@ -40,15 +45,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [6.0.0] - 2021-04-08 ### Changed -- **(BREAKING)** Set minimum Node.js version to `^12.0.0` ([#144](https://github.com/MetaMask/eslint-config/pull/144)) -- **(BREAKING)** Enable [`mocha/no-exports`](https://github.com/lo1tuma/eslint-plugin-mocha/blob/bb203bc/docs/rules/no-exports.md) ([#156](https://github.com/MetaMask/eslint-config/pull/156)) +- **BREAKING:** Set minimum Node.js version to `^12.0.0` ([#144](https://github.com/MetaMask/eslint-config/pull/144)) +- **BREAKING:** Enable [`mocha/no-exports`](https://github.com/lo1tuma/eslint-plugin-mocha/blob/bb203bc/docs/rules/no-exports.md) ([#156](https://github.com/MetaMask/eslint-config/pull/156)) - Publish this config as its own package ([#141](https://github.com/MetaMask/eslint-config/pull/141)) - The contents of this package were previously published as part of [`@metamask/eslint-config`](https://npmjs.com/package/@metamask/eslint-config). For changes prior to version `6.0.0`, please refer to the changelog of that package. - 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/v10.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/eslint-config/compare/v11.0.0...HEAD +[11.0.0]: https://github.com/MetaMask/eslint-config/compare/v10.0.0...v11.0.0 [10.0.0]: https://github.com/MetaMask/eslint-config/compare/v9.0.0...v10.0.0 [9.0.0]: https://github.com/MetaMask/eslint-config/compare/v8.0.0...v9.0.0 [8.0.0]: https://github.com/MetaMask/eslint-config/compare/v7.0.0...v8.0.0 diff --git a/packages/mocha/README.md b/packages/mocha/README.md index 3f6bf893..adfbef1f 100644 --- a/packages/mocha/README.md +++ b/packages/mocha/README.md @@ -6,8 +6,8 @@ MetaMask's [Mocha](https://mochajs.org/) ESLint configuration. ```bash yarn add --dev \ - @metamask/eslint-config@^10.0.0 \ - @metamask/eslint-config-mocha@^10.0.0 \ + @metamask/eslint-config@^11.0.0 \ + @metamask/eslint-config-mocha@^11.0.0 \ eslint@^8.27.0 \ eslint-config-prettier@^8.5.0 \ eslint-plugin-import@^2.26.0 \ diff --git a/packages/mocha/package.json b/packages/mocha/package.json index e9f130cd..131c259f 100644 --- a/packages/mocha/package.json +++ b/packages/mocha/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/eslint-config-mocha", - "version": "10.0.0", + "version": "11.0.0", "description": "Shareable MetaMask ESLint config for Mocha.", "homepage": "https://github.com/MetaMask/eslint-config#readme", "bugs": { @@ -22,7 +22,7 @@ }, "devDependencies": { "@metamask/auto-changelog": "^3.0.0", - "@metamask/eslint-config": "^10.0.0", + "@metamask/eslint-config": "^11.0.0", "eslint": "^8.27.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-import": "^2.26.0", @@ -32,7 +32,7 @@ "prettier": "^2.7.1" }, "peerDependencies": { - "@metamask/eslint-config": "^10.0.0", + "@metamask/eslint-config": "^11.0.0", "eslint": "^8.27.0", "eslint-plugin-mocha": "^10.1.0" }, diff --git a/packages/nodejs/CHANGELOG.md b/packages/nodejs/CHANGELOG.md index ecd2f738..f3f50666 100644 --- a/packages/nodejs/CHANGELOG.md +++ b/packages/nodejs/CHANGELOG.md @@ -6,24 +6,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [11.0.0] +### Changed +- **BREAKING:** Remove no-undef in favour of custom environments configuration ([#254](https://github.com/MetaMask/eslint-config/pull/254)) + - This config now only allows globals that are available in Node.js. +- **BREAKING:** Bump all ESLint dependencies to the latest version ([#252](https://github.com/MetaMask/eslint-config/pull/252)) + - This includes peer dependencies. + ## [10.0.0] ### Changed -- **(BREAKING)** Update ESLint from v7 to v8 ([#233](https://github.com/MetaMask/eslint-config/pull/233)) +- **BREAKING:** Update ESLint from v7 to v8 ([#233](https://github.com/MetaMask/eslint-config/pull/233)) - This is breaking because `eslint` is a `peerDependency`. - Four new rules have been added: - [`no-loss-of-precision`](https://eslint.org/docs/latest/rules/no-loss-of-precision) - [`no-nonoctal-decimal-escape`](https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape) - [`no-unsafe-optional-chaining`](https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining) - [`no-useless-backreference`](https://eslint.org/docs/latest/rules/no-useless-backreference) -- **(BREAKING)** Update minimium Node.js version to v14 ([#225](https://github.com/MetaMask/eslint-config/pull/225)) +- **BREAKING:** Update minimium Node.js version to v14 ([#225](https://github.com/MetaMask/eslint-config/pull/225)) ## [9.0.0] ### Added -- **BREAKING** Add JSDoc ESLint rules ([#203](https://github.com/MetaMask/eslint-config/pull/203)) +- **BREAKING:** Add JSDoc ESLint rules ([#203](https://github.com/MetaMask/eslint-config/pull/203)) ## [8.0.0] ### Changed -- ***BREAKING*** The peer dependency `@metamask/eslint-config` has been updated from v7 to v8. +- **BREAKING:** The peer dependency `@metamask/eslint-config` has been updated from v7 to v8. ## [7.0.1] ### Fixed @@ -43,14 +50,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [6.0.0] - 2021-04-08 ### Changed -- **(BREAKING)** Set minimum Node.js version to `^12.0.0` ([#144](https://github.com/MetaMask/eslint-config/pull/144)) +- **BREAKING:** Set minimum Node.js version to `^12.0.0` ([#144](https://github.com/MetaMask/eslint-config/pull/144)) - Publish this config as its own package ([#141](https://github.com/MetaMask/eslint-config/pull/141)) - The contents of this package were previously published as part of [`@metamask/eslint-config`](https://npmjs.com/package/@metamask/eslint-config). For changes prior to version `6.0.0`, please refer to the changelog of that package. - 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/v10.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/eslint-config/compare/v11.0.0...HEAD +[11.0.0]: https://github.com/MetaMask/eslint-config/compare/v10.0.0...v11.0.0 [10.0.0]: https://github.com/MetaMask/eslint-config/compare/v9.0.0...v10.0.0 [9.0.0]: https://github.com/MetaMask/eslint-config/compare/v8.0.0...v9.0.0 [8.0.0]: https://github.com/MetaMask/eslint-config/compare/v7.0.1...v8.0.0 diff --git a/packages/nodejs/README.md b/packages/nodejs/README.md index d8cba294..6e8d4e80 100644 --- a/packages/nodejs/README.md +++ b/packages/nodejs/README.md @@ -6,8 +6,8 @@ MetaMask's [Node.js](https://nodejs.org) ESLint configuration. ```bash yarn add --dev \ - @metamask/eslint-config@^10.0.0 \ - @metamask/eslint-config-nodejs@^10.0.0 \ + @metamask/eslint-config@^11.0.0 \ + @metamask/eslint-config-nodejs@^11.0.0 \ eslint@^8.27.0 \ eslint-config-prettier@^8.5.0 \ eslint-plugin-import@^2.26.0 \ diff --git a/packages/nodejs/package.json b/packages/nodejs/package.json index 4a86df78..1dea3351 100644 --- a/packages/nodejs/package.json +++ b/packages/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/eslint-config-nodejs", - "version": "10.0.0", + "version": "11.0.0", "description": "Shareable MetaMask ESLint config for Node.js.", "homepage": "https://github.com/MetaMask/eslint-config#readme", "bugs": { @@ -22,7 +22,7 @@ }, "devDependencies": { "@metamask/auto-changelog": "^3.0.0", - "@metamask/eslint-config": "^10.0.0", + "@metamask/eslint-config": "^11.0.0", "eslint": "^8.27.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-import": "^2.26.0", @@ -32,7 +32,7 @@ "prettier": "^2.7.1" }, "peerDependencies": { - "@metamask/eslint-config": "^10.0.0", + "@metamask/eslint-config": "^11.0.0", "eslint": "^8.27.0", "eslint-plugin-node": "^11.1.0" }, diff --git a/packages/typescript/CHANGELOG.md b/packages/typescript/CHANGELOG.md index df73ee1f..5f0273bd 100644 --- a/packages/typescript/CHANGELOG.md +++ b/packages/typescript/CHANGELOG.md @@ -6,22 +6,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [11.0.0] +### Added +- **BREAKING:** Add rules that require type information ([#250](https://github.com/MetaMask/eslint-config/pull/250)) + - This requires setting some parser options. See the README for more details. +- **BREAKING:** Bump all ESLint dependencies to the latest version ([#252](https://github.com/MetaMask/eslint-config/pull/252)) + - This includes peer dependencies. +- **BREAKING:** Forbid TypeScript's private modifier in favour of hash names ([#244](https://github.com/MetaMask/eslint-config/pull/244)) + ## [10.0.0] ### Changed -- **(BREAKING)** Update ESLint from v7 to v8 ([#233](https://github.com/MetaMask/eslint-config/pull/233)) +- **BREAKING:** Update ESLint from v7 to v8 ([#233](https://github.com/MetaMask/eslint-config/pull/233)) - This is breaking because `eslint` is a `peerDependency`. - Four new rules have been added: - [`no-loss-of-precision`](https://eslint.org/docs/latest/rules/no-loss-of-precision) - [`no-nonoctal-decimal-escape`](https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape) - [`no-unsafe-optional-chaining`](https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining) - [`no-useless-backreference`](https://eslint.org/docs/latest/rules/no-useless-backreference) -- **(BREAKING)** Update `@typescript-eslint` parser and plugin ([#230](https://github.com/MetaMask/eslint-config/pull/230)) +- **BREAKING:** Update `@typescript-eslint` parser and plugin ([#230](https://github.com/MetaMask/eslint-config/pull/230)) - This is breaking because these two packages are `peerDependencies` - There are two new rules: - [`@typescript-eslint/no-loss-of-precision`](https://typescript-eslint.io/rules/no-loss-of-precision) - [`@typescript-eslint/no-unnecessary-type-constraint`](https://typescript-eslint.io/rules/no-unnecessary-type-constraint). -- **(BREAKING)** Update minimium Node.js version to v14 ([#225](https://github.com/MetaMask/eslint-config/pull/225)) -- **(BREAKING)** Forbid TypeScript interfaces ([#216](https://github.com/MetaMask/eslint-config/pull/216)) +- **BREAKING:** Update minimium Node.js version to v14 ([#225](https://github.com/MetaMask/eslint-config/pull/225)) +- **BREAKING:** Forbid TypeScript interfaces ([#216](https://github.com/MetaMask/eslint-config/pull/216)) - Ignore rest siblings for `no-unused-vars` ([#213](https://github.com/MetaMask/eslint-config/pull/213)) - This makes the `no-unused-vars` rule more permissive @@ -32,16 +40,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [9.0.0] ### Added -- **BREAKING** Add JSDoc ESLint rules ([#203](https://github.com/MetaMask/eslint-config/pull/203)) +- **BREAKING:** Add JSDoc ESLint rules ([#203](https://github.com/MetaMask/eslint-config/pull/203)) ### Changed -- **BREAKING** Disable `no-throw-literal` and enable `@typescript-eslint/no-throw-literal` ([#201](https://github.com/MetaMask/eslint-config/pull/201)) +- **BREAKING:** Disable `no-throw-literal` and enable `@typescript-eslint/no-throw-literal` ([#201](https://github.com/MetaMask/eslint-config/pull/201)) - This rule requires type information, which requires [additional project setup](https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/TYPED_LINTING.md). - Note: This change has been undone in v9.0.1. You can ignore this change if you're updating to v9.0.1 or greater. ## [8.0.0] ### Changed -- ***BREAKING*** The peer dependency `@metamask/eslint-config` has been updated from v7 to v8. +- **BREAKING:** The peer dependency `@metamask/eslint-config` has been updated from v7 to v8. ## [7.0.1] ### Fixed @@ -51,7 +59,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [7.0.0] ### Changed -- **(BREAKING)** Update `@typescript/no-shadow` config ([#168](https://github.com/MetaMask/eslint-config/pull/168)) +- **BREAKING:** Update `@typescript/no-shadow` config ([#168](https://github.com/MetaMask/eslint-config/pull/168)) - Use recommended `eslint-plugin-import` rule sets ([#184](https://github.com/MetaMask/eslint-config/pull/184)) - This only removed or disabled rules, and is not breaking. - Update install instructions in readme ([#185](https://github.com/MetaMask/eslint-config/pull/185)) @@ -62,9 +70,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [6.0.0] - 2021-04-08 ### Changed -- **(BREAKING)** Set minimum Node.js version to `^12.0.0` ([#144](https://github.com/MetaMask/eslint-config/pull/144)) -- **(BREAKING)** Set ECMAScript version to `es2020`/`11` ([#150](https://github.com/MetaMask/eslint-config/pull/150)) -- **(BREAKING)** Enable all rules recommended by the `@typescript-eslint` plugin ([#156](https://github.com/MetaMask/eslint-config/pull/156)) +- **BREAKING:** Set minimum Node.js version to `^12.0.0` ([#144](https://github.com/MetaMask/eslint-config/pull/144)) +- **BREAKING:** Set ECMAScript version to `es2020`/`11` ([#150](https://github.com/MetaMask/eslint-config/pull/150)) +- **BREAKING:** Enable all rules recommended by the `@typescript-eslint` plugin ([#156](https://github.com/MetaMask/eslint-config/pull/156)) - This amounted to setting the following core ESLint rules to `error`: - [no-var](https://eslint.org/docs/7.0.0/rules/no-var) - [prefer-const](https://eslint.org/docs/7.0.0/rules/prefer-const) @@ -76,7 +84,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/v10.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/eslint-config/compare/v11.0.0...HEAD +[11.0.0]: https://github.com/MetaMask/eslint-config/compare/v10.0.0...v11.0.0 [10.0.0]: https://github.com/MetaMask/eslint-config/compare/v9.0.1...v10.0.0 [9.0.1]: https://github.com/MetaMask/eslint-config/compare/v9.0.0...v9.0.1 [9.0.0]: https://github.com/MetaMask/eslint-config/compare/v8.0.0...v9.0.0 diff --git a/packages/typescript/README.md b/packages/typescript/README.md index 9fcdc59f..134370a7 100644 --- a/packages/typescript/README.md +++ b/packages/typescript/README.md @@ -6,8 +6,8 @@ MetaMask's [TypeScript](https://www.typescriptlang.org) ESLint configuration. ```bash yarn add --dev \ - @metamask/eslint-config@^10.0.0 \ - @metamask/eslint-config-typescript@^10.0.0 \ + @metamask/eslint-config@^11.0.0 \ + @metamask/eslint-config-typescript@^11.0.0 \ @typescript-eslint/eslint-plugin@^5.42.1 \ @typescript-eslint/parser@^5.42.1 \ eslint@^8.27.0 \ diff --git a/packages/typescript/package.json b/packages/typescript/package.json index 928f64a1..2887ad2c 100644 --- a/packages/typescript/package.json +++ b/packages/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/eslint-config-typescript", - "version": "10.0.0", + "version": "11.0.0", "description": "Shareable MetaMask ESLint config for TypeScript.", "homepage": "https://github.com/MetaMask/eslint-config#readme", "bugs": { @@ -22,7 +22,7 @@ }, "devDependencies": { "@metamask/auto-changelog": "^3.0.0", - "@metamask/eslint-config": "^10.0.0", + "@metamask/eslint-config": "^11.0.0", "@typescript-eslint/eslint-plugin": "^5.42.1", "@typescript-eslint/parser": "^5.42.1", "eslint": "^8.27.0", @@ -34,7 +34,7 @@ "typescript": "~4.8.4" }, "peerDependencies": { - "@metamask/eslint-config": "^10.0.0", + "@metamask/eslint-config": "^11.0.0", "@typescript-eslint/eslint-plugin": "^5.42.1", "@typescript-eslint/parser": "^5.42.1", "eslint": "^8.27.0", diff --git a/yarn.lock b/yarn.lock index b604a083..dff3fa98 100644 --- a/yarn.lock +++ b/yarn.lock @@ -837,7 +837,7 @@ __metadata: eslint-plugin-prettier: ^4.2.1 prettier: ^2.7.1 peerDependencies: - "@metamask/eslint-config": ^10.0.0 + "@metamask/eslint-config": ^11.0.0 eslint: ^8.27.0 languageName: unknown linkType: soft @@ -847,7 +847,7 @@ __metadata: resolution: "@metamask/eslint-config-jest@workspace:packages/jest" dependencies: "@metamask/auto-changelog": ^3.0.0 - "@metamask/eslint-config": ^10.0.0 + "@metamask/eslint-config": ^11.0.0 eslint: ^8.27.0 eslint-config-prettier: ^8.5.0 eslint-plugin-import: ^2.26.0 @@ -856,7 +856,7 @@ __metadata: eslint-plugin-prettier: ^4.2.1 prettier: ^2.7.1 peerDependencies: - "@metamask/eslint-config": ^10.0.0 + "@metamask/eslint-config": ^11.0.0 eslint: ^8.27.0 eslint-plugin-jest: ^27.1.5 languageName: unknown @@ -867,7 +867,7 @@ __metadata: resolution: "@metamask/eslint-config-mocha@workspace:packages/mocha" dependencies: "@metamask/auto-changelog": ^3.0.0 - "@metamask/eslint-config": ^10.0.0 + "@metamask/eslint-config": ^11.0.0 eslint: ^8.27.0 eslint-config-prettier: ^8.5.0 eslint-plugin-import: ^2.26.0 @@ -876,18 +876,18 @@ __metadata: eslint-plugin-prettier: ^4.2.1 prettier: ^2.7.1 peerDependencies: - "@metamask/eslint-config": ^10.0.0 + "@metamask/eslint-config": ^11.0.0 eslint: ^8.27.0 eslint-plugin-mocha: ^10.1.0 languageName: unknown linkType: soft -"@metamask/eslint-config-nodejs@*, @metamask/eslint-config-nodejs@workspace:packages/nodejs": +"@metamask/eslint-config-nodejs@^11.0.0, @metamask/eslint-config-nodejs@workspace:packages/nodejs": version: 0.0.0-use.local resolution: "@metamask/eslint-config-nodejs@workspace:packages/nodejs" dependencies: "@metamask/auto-changelog": ^3.0.0 - "@metamask/eslint-config": ^10.0.0 + "@metamask/eslint-config": ^11.0.0 eslint: ^8.27.0 eslint-config-prettier: ^8.5.0 eslint-plugin-import: ^2.26.0 @@ -896,7 +896,7 @@ __metadata: eslint-plugin-prettier: ^4.2.1 prettier: ^2.7.1 peerDependencies: - "@metamask/eslint-config": ^10.0.0 + "@metamask/eslint-config": ^11.0.0 eslint: ^8.27.0 eslint-plugin-node: ^11.1.0 languageName: unknown @@ -907,7 +907,7 @@ __metadata: resolution: "@metamask/eslint-config-typescript@workspace:packages/typescript" dependencies: "@metamask/auto-changelog": ^3.0.0 - "@metamask/eslint-config": ^10.0.0 + "@metamask/eslint-config": ^11.0.0 "@typescript-eslint/eslint-plugin": ^5.42.1 "@typescript-eslint/parser": ^5.42.1 eslint: ^8.27.0 @@ -918,7 +918,7 @@ __metadata: prettier: ^2.7.1 typescript: ~4.8.4 peerDependencies: - "@metamask/eslint-config": ^10.0.0 + "@metamask/eslint-config": ^11.0.0 "@typescript-eslint/eslint-plugin": ^5.42.1 "@typescript-eslint/parser": ^5.42.1 eslint: ^8.27.0 @@ -926,7 +926,7 @@ __metadata: languageName: unknown linkType: soft -"@metamask/eslint-config@*, @metamask/eslint-config@^10.0.0, @metamask/eslint-config@workspace:packages/base": +"@metamask/eslint-config@^11.0.0, @metamask/eslint-config@workspace:packages/base": version: 0.0.0-use.local resolution: "@metamask/eslint-config@workspace:packages/base" dependencies: @@ -5372,8 +5372,8 @@ __metadata: "@eslint/eslintrc": ^1.3.0 "@lavamoat/allow-scripts": ^2.0.3 "@metamask/auto-changelog": ^3.0.0 - "@metamask/eslint-config": "*" - "@metamask/eslint-config-nodejs": "*" + "@metamask/eslint-config": ^11.0.0 + "@metamask/eslint-config-nodejs": ^11.0.0 "@metamask/utils": ^3.3.1 "@types/jest": ^29.2.2 eslint: ^8.27.0