Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One config to rule them all #175

Merged
merged 4 commits into from Feb 21, 2021
Merged

One config to rule them all #175

merged 4 commits into from Feb 21, 2021

Conversation

lydell
Copy link
Member

@lydell lydell commented Feb 20, 2021

Fixes #173.

This PR combines all configs into one. This means you can just add "prettier" to "extends" and it’ll disable rules from all plugins without you having to think about which you use!

I’ve wanted this behavior from the start, but thought that it wasn’t possible. Turns out I have been wrong the whole time and disabling unknown rules is perfectly fine! There’s even a test for that in ESLint:

https://github.com/eslint/eslint/blob/9d6063add931f0803cae1676d5df307baf114360/tests/lib/linter/linter.js#L1738-L1742

I also check with nzakas on Discord, and got a 👍 about doing this change.


Fixes #174.

The "prettier/prettier" config is still separate, since only eslint-plugin-prettier users need it. Doing the above change, I either had to write special case code to keep the behavior for prettier/prettier. Instead of doing that, it felt easier to write special case code for #174 instead.

The CLI helper tool now only warns about the rules specific to eslint-plugin-prettier, instead of failing with a non-zero exit code. This is similar to how other “special rules” are handled (if only special rules are found, that’s printed but not considered an error). After all, the CLI tool cannot know your decision – if you want to disable the rules because of the potential problems, or if you’d rather live with occasional errors but cleaner code.

@lydell lydell merged commit 03c79b9 into main Feb 21, 2021
@lydell lydell deleted the one-config branch February 21, 2021 10:43
kodiakhq bot pushed a commit to vercel/next.js that referenced this pull request Mar 1, 2021
… errors (#22452)

Delete "prettier/@typescript-eslint" from .eslintrc.json. 

After update to the last version I getting this error on running lint: ESLint couldn't find the config "prettier/@typescript-eslint" to extend from. 
I explore this issue prettier/eslint-config-prettier#175 and I think those extensions aren't needed anymore.
This was referenced Mar 6, 2021
This was referenced Mar 16, 2021
kou029w added a commit to npocccties/chibichilo that referenced this pull request Mar 18, 2021
- [use\-debounce@v6.0](https://github.com/xnimorz/use-debounce/releases/tag/6.0) removed callback field, instead of this useDebouncedCallback and useThrottledCallback returns a callable function [make return result callable, get rid of useCallbacks · xnimorz/use\-debounce@045f960](xnimorz/use-debounce@045f960)
- https://github.com/prisma/prisma/releases/tag/2.17.0 [feat\(client\): improve transaction arg type by williamluke4 · Pull Request \#5558 · prisma/prisma](prisma/prisma#5558)
- https://github.com/prisma/prisma/releases/tag/2.19.0 [Hassle\-Free Database Migrations with Prisma Migrate](https://www.prisma.io/blog/prisma-migrate-ga-b5eno5g08d0b)
- https://github.com/kleydon/prisma-session-store/releases/tag/v3.0.0 [expires \-> expiresAt; min express\-session and prisma versions by kleydon · Pull Request \#36 · kleydon/prisma\-session\-store](kleydon/prisma-session-store#36)
- ["prettier/@typescript-eslint" has been merged into "prettier" in eslint-config-prettier 8.0.0.](https://github.com/prettier/eslint-config-prettier/blob/v8.1.0/CHANGELOG.md#version-800-2021-02-21) [One config to rule them all by lydell · Pull Request \#175 · prettier/eslint\-config\-prettier](prettier/eslint-config-prettier#175)
- [ts-jest@v26.5.3](https://github.com/kulshekhar/ts-jest/blob/v26.5.4/CHANGELOG.md#2653-2021-03-03) [fix: remove \`@types/jest\` from direct dep by ahnpnl · Pull Request \#2416 · kulshekhar/ts\-jest](kulshekhar/ts-jest#2416)
kou029w added a commit to npocccties/chibichilo that referenced this pull request Mar 18, 2021
- [use\-debounce@v6.0](https://github.com/xnimorz/use-debounce/releases/tag/6.0) removed callback field, instead of this useDebouncedCallback and useThrottledCallback returns a callable function [make return result callable, get rid of useCallbacks · xnimorz/use\-debounce@045f960](xnimorz/use-debounce@045f960)
- https://github.com/prisma/prisma/releases/tag/2.17.0 [feat\(client\): improve transaction arg type by williamluke4 · Pull Request \#5558 · prisma/prisma](prisma/prisma#5558)
- https://github.com/prisma/prisma/releases/tag/2.19.0 [Hassle\-Free Database Migrations with Prisma Migrate](https://www.prisma.io/blog/prisma-migrate-ga-b5eno5g08d0b)
- https://github.com/kleydon/prisma-session-store/releases/tag/v3.0.0 [expires \-> expiresAt; min express\-session and prisma versions by kleydon · Pull Request \#36 · kleydon/prisma\-session\-store](kleydon/prisma-session-store#36)
- ["prettier/@typescript-eslint" has been merged into "prettier" in eslint-config-prettier 8.0.0.](https://github.com/prettier/eslint-config-prettier/blob/v8.1.0/CHANGELOG.md#version-800-2021-02-21) [One config to rule them all by lydell · Pull Request \#175 · prettier/eslint\-config\-prettier](prettier/eslint-config-prettier#175)
- [ts-jest@v26.5.3](https://github.com/kulshekhar/ts-jest/blob/v26.5.4/CHANGELOG.md#2653-2021-03-03) [fix: remove \`@types/jest\` from direct dep by ahnpnl · Pull Request \#2416 · kulshekhar/ts\-jest](kulshekhar/ts-jest#2416)
saihaj added a commit to saihaj/graphql-js that referenced this pull request May 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant