-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add empty prettier
config
#283
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine. Note that I'm using ESLint to run prettier currently (configured by eslint-plugin-square).
Yeah, this happens regardless of how
😅 |
@bmish so it seems that there is some contention between tools because you're actually at least using single-quotes in most of the codebase and that is what is being enforced by Prettier via ESLint, but not by the Prettier CLI (because it's not set in the config). What I can't find out is where the Prettier plugin for ESLint is being configured to use single-quotes - all I can find is this, and even then that seems wrong because you switched to double quotes a few months ago. I think I missed this because of ESLint caching, which generally is considered broken due to this sort of thing. I'm happy to do a PR adding in the single quotes option which seems like the immediate right thing to do, but wanted to run that by you first since you've got a better understanding of all the configs :) |
Prettier is being set to single quotes here. The goal is definitely to use single quotes and have eslint-plugin-square control that for us. It may have been a mistake for @square/prettier-config to switch to double quotes while the rest of eslint-plugin-square was intending to specify single quotes. |
🤦 no idea how I missed that - I'd really recommend though having a prettier config at the project level, even if it's just pulling in fwiw my use-case is that I use |
Fair points. I may rework this setup soon. |
By not having a config file,
prettier
(reallycosmiconfig
) will look upwards and in home directories, which can result in linting errors if there is a config there (such as I have).Adding an empty config file ensures that
prettier
will always use the right config.