diff --git a/.changeset/angry-cheetahs-know.md b/.changeset/angry-cheetahs-know.md deleted file mode 100644 index b9f84cc..0000000 --- a/.changeset/angry-cheetahs-know.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@mels/eslint-config-base': major -'@mels/eslint-config-jest': major -'@mels/eslint-config-react': major -'@mels/eslint-config-typescript': major ---- - -Update package dependencies: - -- Drop support for ESLint v6 -- Add support for ESLint v8 -- Update and unlock dependencies diff --git a/.changeset/beige-moose-stare.md b/.changeset/beige-moose-stare.md deleted file mode 100644 index c54ce93..0000000 --- a/.changeset/beige-moose-stare.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -'@mels/prettier-config': major ---- - -First stable release! 🥳 - -### Features - -- Bump peer dependency to `2.6.0` for `singleAttributePerLine` support. -- The config now explicitly declares values for every rule, rather than implicitely relying on the defaults that Prettier sets. - - Promotes visibility for each rule (see at a glance everything that is set). - - No longer have to comb through Prettier docs to check what the defaults are for each rule. - - The rules in our config won't change randomly if the Prettier defaults suddenly change under the hood. - -### Rule change(s) - -- Switched to using trailing commas where valid in es5. [Info about this rule](https://prettier.io/docs/en/options.html#trailing-commas). - -```diff -- trailingComma: 'none' -+ trailingComma: 'es5' -``` diff --git a/.changeset/clever-wolves-sort.md b/.changeset/clever-wolves-sort.md deleted file mode 100644 index 4ed260b..0000000 --- a/.changeset/clever-wolves-sort.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@mels/eslint-config-base': minor ---- - -Update the import config: - -- Use `eslint-plugin-simple-import-sort` for autofixable sorting. -- Remove `import/no-extraneous-dependencies` rule because it's not working quite right with glob patterns. diff --git a/.changeset/cuddly-mayflies-fetch.md b/.changeset/cuddly-mayflies-fetch.md deleted file mode 100644 index d911469..0000000 --- a/.changeset/cuddly-mayflies-fetch.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -'@mels/eslint-config-jest': major ---- - -Improve and fix jest config - -- Add the `jest` env to the config -- Extend from `plugin:jest/style` -- Flip all severity from `warn` to `error` to be stricter -- Add additional `**/tests/**/*.[jt]s?(x)` file matcher - -Also turned on the following rules: - -- `jest/expect-expect` -- `jest/no-conditional-in-test` -- `jest/consistent-test-it` -- `jest/prefer-each` -- `jest/prefer-hooks-in-order` -- `jest/prefer-mock-promise-shorthand` -- `jest/prefer-spy-on` -- `jest/unbound-method` diff --git a/.changeset/flat-kids-taste.md b/.changeset/flat-kids-taste.md deleted file mode 100644 index 2012d2c..0000000 --- a/.changeset/flat-kids-taste.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@mels/eslint-config-prettier': major ---- - -Update package dependencies: - -- Drop support for ESLint v6 -- Add support for ESLint v8 -- Update and unlock dependencies -- Add Prettier v2 peer dependency diff --git a/.changeset/giant-wasps-doubt.md b/.changeset/giant-wasps-doubt.md deleted file mode 100644 index 00f1d71..0000000 --- a/.changeset/giant-wasps-doubt.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -'@mels/eslint-config-typescript': major ---- - -Remove project-specific defaults from the config: - -- `parserOptions.project` -- `parserOptions.tsconfigRootDir` -- `settings.'import/resolver'.typescript.project` - -The consumer will now need to provide them. `parserOptions.project` is required, but the other two are optional. - -```js -// .eslintrc.js -module.exports = { - extends: ['@mels/base', '@mels/typescript'], - - parserOptions: { - project: '...', // This is now required to consume `@mels/typescript` - tsconfigRootDir: '...', // Optional - }, - - settings: { - 'import/resolver': { - typescript: { - project: '...', // Optional - }, - }, - }, -}; -``` diff --git a/.changeset/great-peas-relate.md b/.changeset/great-peas-relate.md deleted file mode 100644 index 6bf84b0..0000000 --- a/.changeset/great-peas-relate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@mels/eslint-config-base': patch ---- - -Turn on the `camelcase` rule. diff --git a/.changeset/healthy-melons-argue.md b/.changeset/healthy-melons-argue.md deleted file mode 100644 index 8b8f3e4..0000000 --- a/.changeset/healthy-melons-argue.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@mels/eslint-config-jest': major ---- - -Move all Testing Library rules into this config. - -`eslint-config-jest` will check under the hood if `@testing-library/react` is installed by the consumer, and if so, then it will automatically enable the Testing Library rules. diff --git a/.changeset/hip-months-attack.md b/.changeset/hip-months-attack.md deleted file mode 100644 index 51c8a7f..0000000 --- a/.changeset/hip-months-attack.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'@mels/eslint-config-base': major ---- - -Changed these rules: - -- `no-use-before-define`: cannot use classes before defined - -Removed these rules: - -- `no-restricted-syntax` -- `no-script-url` -- `no-labels` diff --git a/.changeset/moody-bulldogs-shake.md b/.changeset/moody-bulldogs-shake.md deleted file mode 100644 index 5f3099c..0000000 --- a/.changeset/moody-bulldogs-shake.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@mels/eslint-config-jest': patch -'@mels/eslint-config-prettier': patch -'@mels/eslint-config-react': patch -'@mels/eslint-config-typescript': patch -'@mels/prettier-config': patch ---- - -Remove `engines.node` from package.json diff --git a/.changeset/nervous-lies-sin.md b/.changeset/nervous-lies-sin.md deleted file mode 100644 index 9c4773d..0000000 --- a/.changeset/nervous-lies-sin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@mels/eslint-config-typescript': patch ---- - -Turn off `@typescript-eslint/no-non-null-asserted-optional-chain` and `@typescript-eslint/no-non-null-assertion`. diff --git a/.changeset/ninety-colts-wonder.md b/.changeset/ninety-colts-wonder.md deleted file mode 100644 index fa7e04b..0000000 --- a/.changeset/ninety-colts-wonder.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@mels/eslint-config-typescript': patch ---- - -Allow TS comments, but only if a justification is provided. diff --git a/.changeset/old-beers-wave.md b/.changeset/old-beers-wave.md deleted file mode 100644 index 1e161c5..0000000 --- a/.changeset/old-beers-wave.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -'@mels/eslint-config-base': major -'@mels/eslint-config-jest': major -'@mels/eslint-config-react': major -'@mels/eslint-config-typescript': major ---- - -Fix the rule severity so `warn` and `error` are used more wisely. In general, try to stick to these principles: - -`warn`: - -- Anything stylistic or personal preference (ordering, naming, etc) - -`error`: - -- Anything that would cause a bug -- Bad coding practices in general -- Obsolete/deprecated language features, or just straight-up mistakes diff --git a/.changeset/plenty-parents-draw.md b/.changeset/plenty-parents-draw.md deleted file mode 100644 index 3467d7e..0000000 --- a/.changeset/plenty-parents-draw.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@mels/eslint-config-react': major ---- - -Turned on rules that were previously set to `off`: - -- `testing-library/no-render-in-setup` -- `react/no-array-index-key` diff --git a/.changeset/quiet-fans-deny.md b/.changeset/quiet-fans-deny.md deleted file mode 100644 index ee865bd..0000000 --- a/.changeset/quiet-fans-deny.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@mels/eslint-config-react': major ---- - -Remove all Testing Library rules from this config. It now lives in [eslint-plugin-jest](https://github.com/melanieseltzer/toolkit/tree/main/packages/eslint-config-jest). diff --git a/.changeset/rotten-oranges-kick.md b/.changeset/rotten-oranges-kick.md deleted file mode 100644 index 416a801..0000000 --- a/.changeset/rotten-oranges-kick.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -'@mels/eslint-config-typescript': patch ---- - -Fix the `@typescript-eslint/naming-convention` rule to allow for `PascalCase` in parameters, to support this React desctructuring convention: - -```js -const Component = ({ icon: Icon }) => { - return ; -}; -``` - -Also be more specific for variable rules in terms of function variables. - -Previously, `PascalCase` was allowed for all variables. But in reality, we only want to allow `PascalCase` for function variables (to allow for React uppercase component convention): - -```js -// valid -const SomeComponent = () => ... - -// not valid -const HiHello = 'hello'; -``` diff --git a/.changeset/silver-ghosts-own.md b/.changeset/silver-ghosts-own.md deleted file mode 100644 index 2fbb401..0000000 --- a/.changeset/silver-ghosts-own.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@mels/eslint-config-base': minor ---- - -Added the ESLint patch into the base config, so the consumer doesn't have to worry about it. diff --git a/.changeset/small-trees-compete.md b/.changeset/small-trees-compete.md deleted file mode 100644 index 0ef3826..0000000 --- a/.changeset/small-trees-compete.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@mels/eslint-config-typescript': minor ---- - -Update the import config: - -- Split import config internally for better organization. -- Fix bug with `import/extensions` rule - move it out of the overrides. -- Enable `@typescript-eslint/recommended-requiring-type-checking`. diff --git a/.changeset/tender-boxes-cheat.md b/.changeset/tender-boxes-cheat.md deleted file mode 100644 index 0d9e259..0000000 --- a/.changeset/tender-boxes-cheat.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@mels/eslint-patch': patch ---- - -Bump `@rushstack/eslint-patch` dependency and unlock it diff --git a/examples/mixed-js-typescript-project/package.json b/examples/mixed-js-typescript-project/package.json index 2b33277..aeac403 100644 --- a/examples/mixed-js-typescript-project/package.json +++ b/examples/mixed-js-typescript-project/package.json @@ -10,10 +10,10 @@ "keywords": [], "author": "", "devDependencies": { - "@mels/eslint-config-base": "0.2.0", - "@mels/eslint-config-prettier": "0.1.0", - "@mels/eslint-config-typescript": "0.1.1", - "@mels/prettier-config": "0.1.0", + "@mels/eslint-config-base": "1.0.0", + "@mels/eslint-config-prettier": "1.0.0", + "@mels/eslint-config-typescript": "1.0.0", + "@mels/prettier-config": "1.0.0", "eslint": "^8.23.0", "typescript": "^4.7.4" } diff --git a/examples/react-app/package.json b/examples/react-app/package.json index eb8d2af..90f8b8e 100644 --- a/examples/react-app/package.json +++ b/examples/react-app/package.json @@ -17,12 +17,12 @@ "web-vitals": "^2.1.0" }, "devDependencies": { - "@mels/eslint-config-base": "0.2.0", - "@mels/eslint-config-jest": "0.1.0", - "@mels/eslint-config-prettier": "0.1.0", - "@mels/eslint-config-react": "0.1.0", - "@mels/eslint-config-typescript": "0.1.1", - "@mels/prettier-config": "0.1.0" + "@mels/eslint-config-base": "1.0.0", + "@mels/eslint-config-jest": "1.0.0", + "@mels/eslint-config-prettier": "1.0.0", + "@mels/eslint-config-react": "1.0.0", + "@mels/eslint-config-typescript": "1.0.0", + "@mels/prettier-config": "1.0.0" }, "scripts": { "start": "react-scripts start", diff --git a/packages/eslint-config-base/CHANGELOG.md b/packages/eslint-config-base/CHANGELOG.md index 1670986..3253704 100644 --- a/packages/eslint-config-base/CHANGELOG.md +++ b/packages/eslint-config-base/CHANGELOG.md @@ -1,5 +1,53 @@ # @mels/eslint-config-base +## 1.0.0 + +### Major Changes + +- [#26](https://github.com/melanieseltzer/toolkit/pull/26) [`b90a8d3`](https://github.com/melanieseltzer/toolkit/commit/b90a8d354a2ad804dd326406c2127f769a271354) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Update package dependencies: + + - Drop support for ESLint v6 + - Add support for ESLint v8 + - Update and unlock dependencies + +* [#38](https://github.com/melanieseltzer/toolkit/pull/38) [`08bfefb`](https://github.com/melanieseltzer/toolkit/commit/08bfefb33ad3c71734da8dd2980797683c9cc46e) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Changed these rules: + + - `no-use-before-define`: cannot use classes before defined + + Removed these rules: + + - `no-restricted-syntax` + - `no-script-url` + - `no-labels` + +- [#38](https://github.com/melanieseltzer/toolkit/pull/38) [`08bfefb`](https://github.com/melanieseltzer/toolkit/commit/08bfefb33ad3c71734da8dd2980797683c9cc46e) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Fix the rule severity so `warn` and `error` are used more wisely. In general, try to stick to these principles: + + `warn`: + + - Anything stylistic or personal preference (ordering, naming, etc) + + `error`: + + - Anything that would cause a bug + - Bad coding practices in general + - Obsolete/deprecated language features, or just straight-up mistakes + +### Minor Changes + +- [#30](https://github.com/melanieseltzer/toolkit/pull/30) [`7642d43`](https://github.com/melanieseltzer/toolkit/commit/7642d43f6d8d10d0b8cbf31d52fed04860f3b6d4) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Update the import config: + + - Use `eslint-plugin-simple-import-sort` for autofixable sorting. + - Remove `import/no-extraneous-dependencies` rule because it's not working quite right with glob patterns. + +* [#28](https://github.com/melanieseltzer/toolkit/pull/28) [`9f3ceb6`](https://github.com/melanieseltzer/toolkit/commit/9f3ceb6d55cacc389011a0c6c961d654accfc8ab) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Added the ESLint patch into the base config, so the consumer doesn't have to worry about it. + +### Patch Changes + +- [#34](https://github.com/melanieseltzer/toolkit/pull/34) [`d3ea3d4`](https://github.com/melanieseltzer/toolkit/commit/d3ea3d468a26301e222a00252243dacd741f2660) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Turn on the `camelcase` rule. + +- Updated dependencies [[`b90a8d3`](https://github.com/melanieseltzer/toolkit/commit/b90a8d354a2ad804dd326406c2127f769a271354)]: + - @mels/eslint-patch@1.0.3 + ## 0.2.0 ### Minor Changes diff --git a/packages/eslint-config-base/package.json b/packages/eslint-config-base/package.json index db9ba7a..68b28ed 100644 --- a/packages/eslint-config-base/package.json +++ b/packages/eslint-config-base/package.json @@ -1,6 +1,6 @@ { "name": "@mels/eslint-config-base", - "version": "0.2.0", + "version": "1.0.0", "description": "Shareable base JS ESLint config.", "main": "./index.js", "files": [ @@ -21,7 +21,7 @@ "lint": "eslint ." }, "dependencies": { - "@mels/eslint-patch": "^1.0.2", + "@mels/eslint-patch": "^1.0.3", "confusing-browser-globals": "^1.0.11", "eslint-plugin-import": "^2.26.0", "eslint-plugin-simple-import-sort": "^7.0.0" diff --git a/packages/eslint-config-jest/CHANGELOG.md b/packages/eslint-config-jest/CHANGELOG.md index 2bc9b8f..c601651 100644 --- a/packages/eslint-config-jest/CHANGELOG.md +++ b/packages/eslint-config-jest/CHANGELOG.md @@ -1,5 +1,53 @@ # @mels/eslint-config-jest +## 1.0.0 + +### Major Changes + +- [#26](https://github.com/melanieseltzer/toolkit/pull/26) [`b90a8d3`](https://github.com/melanieseltzer/toolkit/commit/b90a8d354a2ad804dd326406c2127f769a271354) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Update package dependencies: + + - Drop support for ESLint v6 + - Add support for ESLint v8 + - Update and unlock dependencies + +* [#33](https://github.com/melanieseltzer/toolkit/pull/33) [`e08d4b5`](https://github.com/melanieseltzer/toolkit/commit/e08d4b56346b95014ec2a9a5398fd22507f55cbd) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Improve and fix jest config + + - Add the `jest` env to the config + - Extend from `plugin:jest/style` + - Flip all severity from `warn` to `error` to be stricter + - Add additional `**/tests/**/*.[jt]s?(x)` file matcher + + Also turned on the following rules: + + - `jest/expect-expect` + - `jest/no-conditional-in-test` + - `jest/consistent-test-it` + - `jest/prefer-each` + - `jest/prefer-hooks-in-order` + - `jest/prefer-mock-promise-shorthand` + - `jest/prefer-spy-on` + - `jest/unbound-method` + +- [#39](https://github.com/melanieseltzer/toolkit/pull/39) [`02506cf`](https://github.com/melanieseltzer/toolkit/commit/02506cf7f16632dba96f874d6766d9f223d96af1) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Move all Testing Library rules into this config. + + `eslint-config-jest` will check under the hood if `@testing-library/react` is installed by the consumer, and if so, then it will automatically enable the Testing Library rules. + +* [#38](https://github.com/melanieseltzer/toolkit/pull/38) [`08bfefb`](https://github.com/melanieseltzer/toolkit/commit/08bfefb33ad3c71734da8dd2980797683c9cc46e) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Fix the rule severity so `warn` and `error` are used more wisely. In general, try to stick to these principles: + + `warn`: + + - Anything stylistic or personal preference (ordering, naming, etc) + + `error`: + + - Anything that would cause a bug + - Bad coding practices in general + - Obsolete/deprecated language features, or just straight-up mistakes + +### Patch Changes + +- [#24](https://github.com/melanieseltzer/toolkit/pull/24) [`4b1a7fa`](https://github.com/melanieseltzer/toolkit/commit/4b1a7fae4bca28c64684a75234634d956be3bacb) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Remove `engines.node` from package.json + ## 0.1.0 ### Minor Changes diff --git a/packages/eslint-config-jest/package.json b/packages/eslint-config-jest/package.json index 7255efa..08d5db4 100644 --- a/packages/eslint-config-jest/package.json +++ b/packages/eslint-config-jest/package.json @@ -1,6 +1,6 @@ { "name": "@mels/eslint-config-jest", - "version": "0.1.0", + "version": "1.0.0", "description": "Shareable Jest ESLint config.", "main": "./index.js", "files": [ diff --git a/packages/eslint-config-prettier/CHANGELOG.md b/packages/eslint-config-prettier/CHANGELOG.md index dfda612..9acfd38 100644 --- a/packages/eslint-config-prettier/CHANGELOG.md +++ b/packages/eslint-config-prettier/CHANGELOG.md @@ -1,5 +1,20 @@ # @mels/eslint-config-prettier +## 1.0.0 + +### Major Changes + +- [#26](https://github.com/melanieseltzer/toolkit/pull/26) [`b90a8d3`](https://github.com/melanieseltzer/toolkit/commit/b90a8d354a2ad804dd326406c2127f769a271354) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Update package dependencies: + + - Drop support for ESLint v6 + - Add support for ESLint v8 + - Update and unlock dependencies + - Add Prettier v2 peer dependency + +### Patch Changes + +- [#24](https://github.com/melanieseltzer/toolkit/pull/24) [`4b1a7fa`](https://github.com/melanieseltzer/toolkit/commit/4b1a7fae4bca28c64684a75234634d956be3bacb) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Remove `engines.node` from package.json + ## 0.1.0 ### Minor Changes diff --git a/packages/eslint-config-prettier/package.json b/packages/eslint-config-prettier/package.json index ec7c795..c00d763 100644 --- a/packages/eslint-config-prettier/package.json +++ b/packages/eslint-config-prettier/package.json @@ -1,6 +1,6 @@ { "name": "@mels/eslint-config-prettier", - "version": "0.1.0", + "version": "1.0.0", "description": "Shareable ESLint config for Prettier.", "main": "./index.js", "files": [ diff --git a/packages/eslint-config-react/CHANGELOG.md b/packages/eslint-config-react/CHANGELOG.md index d4bc36e..1ff79b0 100644 --- a/packages/eslint-config-react/CHANGELOG.md +++ b/packages/eslint-config-react/CHANGELOG.md @@ -1,5 +1,38 @@ # @mels/eslint-config-react +## 1.0.0 + +### Major Changes + +- [#26](https://github.com/melanieseltzer/toolkit/pull/26) [`b90a8d3`](https://github.com/melanieseltzer/toolkit/commit/b90a8d354a2ad804dd326406c2127f769a271354) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Update package dependencies: + + - Drop support for ESLint v6 + - Add support for ESLint v8 + - Update and unlock dependencies + +* [#38](https://github.com/melanieseltzer/toolkit/pull/38) [`08bfefb`](https://github.com/melanieseltzer/toolkit/commit/08bfefb33ad3c71734da8dd2980797683c9cc46e) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Fix the rule severity so `warn` and `error` are used more wisely. In general, try to stick to these principles: + + `warn`: + + - Anything stylistic or personal preference (ordering, naming, etc) + + `error`: + + - Anything that would cause a bug + - Bad coding practices in general + - Obsolete/deprecated language features, or just straight-up mistakes + +- [#38](https://github.com/melanieseltzer/toolkit/pull/38) [`08bfefb`](https://github.com/melanieseltzer/toolkit/commit/08bfefb33ad3c71734da8dd2980797683c9cc46e) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Turned on rules that were previously set to `off`: + + - `testing-library/no-render-in-setup` + - `react/no-array-index-key` + +* [#39](https://github.com/melanieseltzer/toolkit/pull/39) [`02506cf`](https://github.com/melanieseltzer/toolkit/commit/02506cf7f16632dba96f874d6766d9f223d96af1) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Remove all Testing Library rules from this config. It now lives in [eslint-plugin-jest](https://github.com/melanieseltzer/toolkit/tree/main/packages/eslint-config-jest). + +### Patch Changes + +- [#24](https://github.com/melanieseltzer/toolkit/pull/24) [`4b1a7fa`](https://github.com/melanieseltzer/toolkit/commit/4b1a7fae4bca28c64684a75234634d956be3bacb) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Remove `engines.node` from package.json + ## 0.1.0 ### Minor Changes diff --git a/packages/eslint-config-react/package.json b/packages/eslint-config-react/package.json index 98c677f..c872252 100644 --- a/packages/eslint-config-react/package.json +++ b/packages/eslint-config-react/package.json @@ -1,6 +1,6 @@ { "name": "@mels/eslint-config-react", - "version": "0.1.0", + "version": "1.0.0", "description": "Shareable React ESLint config.", "main": "./index.js", "exports": { diff --git a/packages/eslint-config-typescript/CHANGELOG.md b/packages/eslint-config-typescript/CHANGELOG.md index 566ee46..c0fbfef 100644 --- a/packages/eslint-config-typescript/CHANGELOG.md +++ b/packages/eslint-config-typescript/CHANGELOG.md @@ -1,5 +1,91 @@ # @mels/eslint-config-typescript +## 1.0.0 + +### Major Changes + +- [#26](https://github.com/melanieseltzer/toolkit/pull/26) [`b90a8d3`](https://github.com/melanieseltzer/toolkit/commit/b90a8d354a2ad804dd326406c2127f769a271354) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Update package dependencies: + + - Drop support for ESLint v6 + - Add support for ESLint v8 + - Update and unlock dependencies + +* [#29](https://github.com/melanieseltzer/toolkit/pull/29) [`6a749c7`](https://github.com/melanieseltzer/toolkit/commit/6a749c739d5eaa28dbeb8dda45f4fc0aee998a05) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Remove project-specific defaults from the config: + + - `parserOptions.project` + - `parserOptions.tsconfigRootDir` + - `settings.'import/resolver'.typescript.project` + + The consumer will now need to provide them. `parserOptions.project` is required, but the other two are optional. + + ```js + // .eslintrc.js + module.exports = { + extends: ['@mels/base', '@mels/typescript'], + + parserOptions: { + project: '...', // This is now required to consume `@mels/typescript` + tsconfigRootDir: '...', // Optional + }, + + settings: { + 'import/resolver': { + typescript: { + project: '...', // Optional + }, + }, + }, + }; + ``` + +- [#38](https://github.com/melanieseltzer/toolkit/pull/38) [`08bfefb`](https://github.com/melanieseltzer/toolkit/commit/08bfefb33ad3c71734da8dd2980797683c9cc46e) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Fix the rule severity so `warn` and `error` are used more wisely. In general, try to stick to these principles: + + `warn`: + + - Anything stylistic or personal preference (ordering, naming, etc) + + `error`: + + - Anything that would cause a bug + - Bad coding practices in general + - Obsolete/deprecated language features, or just straight-up mistakes + +### Minor Changes + +- [#30](https://github.com/melanieseltzer/toolkit/pull/30) [`7642d43`](https://github.com/melanieseltzer/toolkit/commit/7642d43f6d8d10d0b8cbf31d52fed04860f3b6d4) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Update the import config: + + - Split import config internally for better organization. + - Fix bug with `import/extensions` rule - move it out of the overrides. + - Enable `@typescript-eslint/recommended-requiring-type-checking`. + +### Patch Changes + +- [#24](https://github.com/melanieseltzer/toolkit/pull/24) [`4b1a7fa`](https://github.com/melanieseltzer/toolkit/commit/4b1a7fae4bca28c64684a75234634d956be3bacb) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Remove `engines.node` from package.json + +* [#36](https://github.com/melanieseltzer/toolkit/pull/36) [`ee63bad`](https://github.com/melanieseltzer/toolkit/commit/ee63badcf1c676e72b20d7e29b04f501d0ed98f8) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Turn off `@typescript-eslint/no-non-null-asserted-optional-chain` and `@typescript-eslint/no-non-null-assertion`. + +- [#35](https://github.com/melanieseltzer/toolkit/pull/35) [`dc458e8`](https://github.com/melanieseltzer/toolkit/commit/dc458e81f33088677e306489a02de125c3edcb89) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Allow TS comments, but only if a justification is provided. + +* [#34](https://github.com/melanieseltzer/toolkit/pull/34) [`d3ea3d4`](https://github.com/melanieseltzer/toolkit/commit/d3ea3d468a26301e222a00252243dacd741f2660) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Fix the `@typescript-eslint/naming-convention` rule to allow for `PascalCase` in parameters, to support this React desctructuring convention: + + ```js + const Component = ({ icon: Icon }) => { + return ; + }; + ``` + + Also be more specific for variable rules in terms of function variables. + + Previously, `PascalCase` was allowed for all variables. But in reality, we only want to allow `PascalCase` for function variables (to allow for React uppercase component convention): + + ```js + // valid + const SomeComponent = () => ... + + // not valid + const HiHello = 'hello'; + ``` + ## 0.1.1 ### Patch Changes diff --git a/packages/eslint-config-typescript/package.json b/packages/eslint-config-typescript/package.json index 9253139..807cbbe 100644 --- a/packages/eslint-config-typescript/package.json +++ b/packages/eslint-config-typescript/package.json @@ -1,6 +1,6 @@ { "name": "@mels/eslint-config-typescript", - "version": "0.1.1", + "version": "1.0.0", "description": "Shareable TypeScript ESLint config.", "main": "./index.js", "files": [ diff --git a/packages/eslint-patch/CHANGELOG.md b/packages/eslint-patch/CHANGELOG.md index c88bc08..6d9bc12 100644 --- a/packages/eslint-patch/CHANGELOG.md +++ b/packages/eslint-patch/CHANGELOG.md @@ -1,5 +1,11 @@ # @mels/eslint-patch +## 1.0.3 + +### Patch Changes + +- [#26](https://github.com/melanieseltzer/toolkit/pull/26) [`b90a8d3`](https://github.com/melanieseltzer/toolkit/commit/b90a8d354a2ad804dd326406c2127f769a271354) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Bump `@rushstack/eslint-patch` dependency and unlock it + ## 1.0.2 ### Patch Changes diff --git a/packages/eslint-patch/package.json b/packages/eslint-patch/package.json index 538c932..5a86cf0 100644 --- a/packages/eslint-patch/package.json +++ b/packages/eslint-patch/package.json @@ -1,6 +1,6 @@ { "name": "@mels/eslint-patch", - "version": "1.0.2", + "version": "1.0.3", "description": "Allow shared ESLint configs to bring along their own plugins.", "main": "./index.js", "files": [ diff --git a/packages/prettier-config/CHANGELOG.md b/packages/prettier-config/CHANGELOG.md index faa29d3..92e2207 100644 --- a/packages/prettier-config/CHANGELOG.md +++ b/packages/prettier-config/CHANGELOG.md @@ -1,5 +1,32 @@ # @mels/prettier-config +## 1.0.0 + +### Major Changes + +- [#27](https://github.com/melanieseltzer/toolkit/pull/27) [`b995a77`](https://github.com/melanieseltzer/toolkit/commit/b995a77e975d95e752ac9e974107714bd7c08b61) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - First stable release! 🥳 + + ### Features + + - Bump peer dependency to `2.6.0` for `singleAttributePerLine` support. + - The config now explicitly declares values for every rule, rather than implicitely relying on the defaults that Prettier sets. + - Promotes visibility for each rule (see at a glance everything that is set). + - No longer have to comb through Prettier docs to check what the defaults are for each rule. + - The rules in our config won't change randomly if the Prettier defaults suddenly change under the hood. + + ### Rule change(s) + + - Switched to using trailing commas where valid in es5. [Info about this rule](https://prettier.io/docs/en/options.html#trailing-commas). + + ```diff + - trailingComma: 'none' + + trailingComma: 'es5' + ``` + +### Patch Changes + +- [#24](https://github.com/melanieseltzer/toolkit/pull/24) [`4b1a7fa`](https://github.com/melanieseltzer/toolkit/commit/4b1a7fae4bca28c64684a75234634d956be3bacb) Thanks [@melanieseltzer](https://github.com/melanieseltzer)! - Remove `engines.node` from package.json + ## 0.1.0 ### Minor Changes diff --git a/packages/prettier-config/package.json b/packages/prettier-config/package.json index a437ade..257d0bf 100644 --- a/packages/prettier-config/package.json +++ b/packages/prettier-config/package.json @@ -1,6 +1,6 @@ { "name": "@mels/prettier-config", - "version": "0.1.0", + "version": "1.0.0", "description": "Prettier rules as a shareable configuration.", "main": "./prettier.config.js", "files": [