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

Better "special rules" support in Prettier mode #628

Open
jonahsnider opened this issue Oct 28, 2021 · 1 comment
Open

Better "special rules" support in Prettier mode #628

jonahsnider opened this issue Oct 28, 2021 · 1 comment

Comments

@jonahsnider
Copy link
Contributor

eslint-config-prettier has several "special rules" that are still useful to have enabled in ESLint, even when using Prettier as your formatter.

https://github.com/prettier/eslint-config-prettier#special-rules

Specifically, the quotes rule is what I noticed was missing which allows unnecessary backticks to get through. https://github.com/prettier/eslint-config-prettier#forbid-unnecessary-backticks

Prettier's "special rules" list should be reviewed and XO should be updated to make better use of them.

@fregante
Copy link
Member

fregante commented Nov 4, 2021

+1 I've been using this too

https://github.com/fregante/eslint-config-pixiebrix/blob/60f5a8837066009757fc293faa65636ad57fde14/index.js#L77

The only "drawback" is that it brings back the quotes lint error even for non-backtick quotes. Until now they'd just be ignored by XO/ESLint because they're handled by Prettier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants