square / eslint-plugin-square

An ESLint plugin containing custom JavaScript, Ember, React, TypeScript rules and configurations tailored to Square's needs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Conflicting prettier configs for quotes

bmish opened this issue · comments

@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

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.