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

Conflicting prettier configs for quotes #798

Closed
bmish opened this issue Nov 30, 2022 · 1 comment · Fixed by #799
Closed

Conflicting prettier configs for quotes #798

bmish opened this issue Nov 30, 2022 · 1 comment · Fixed by #799
Labels
bug Something isn't working

Comments

@bmish
Copy link
Collaborator

bmish commented Nov 30, 2022

@square/prettier-config reverted to using the prettier default of double quotes in v2.0.0.

This conflicts with our configuration of prettier to use single quote:

'prettier/prettier': [
'error',
{
singleQuote: true,
},
],

and

quotes: [
'error',
'single', // Must match quote style enforced by prettier.
// Disallow unnecessary template literals.
{ avoidEscape: true, allowTemplateLiterals: false },
],

Having this conflict between our ESLint config of prettier and our non-ESLint config of prettier can cause confusion and problems as occurred here: bmish/eslint-doc-generator#283 (comment)

I'm in favor of keeping single quotes to avoid churn, so I think we need to remove or override the setting for @square/prettier-config.

@maxbeatty

@bmish bmish added the bug Something isn't working label Nov 30, 2022
@maxbeatty
Copy link
Contributor

easiest thing to do is pin to v1 of @square/prettier-config and keep using single quotes. the shared configs rarely ever change and are so minimal they should continue to work with prettier (🤞🏼). if something does come up, it wouldn't be too much trouble to maintain both majors similar to Node's strategy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants