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

qa(formatting): Create a prettier config file to allow IDE to guess the used configurations #251

Merged
merged 1 commit into from
Dec 14, 2017

Conversation

armandabric
Copy link
Collaborator

No description provided.

@vvo
Copy link
Contributor

vvo commented Nov 16, 2017

In the last eslint-config-algolia, prettier is bundled inside our eslint configuration. So when eslint passes, prettier passes too, in command line or even in IDEs.

The issue is then that if you have a prettier integration in your IDE, it will fail because the IDE has no way to know there's prettier bundled in eslint. So usually I only have the eslint plugin in IDEs, set with autofix.

If there are new ways to have both prettier and eslint that could be great. Let use know!

@armandabric
Copy link
Collaborator Author

I see a lot project separating prettier from eslint and using them separately. Not sure is better on a daily usage but it's a simpler installation.

For this PR I have only move the CLI arguments "prettier:fix": "prettier --write --single-quote --trailing-comma es5 \"{src/**/*.js,package.json}\" into a prettier config file. If these argument where fine there it should change nothing. But with the prettier/eslint integration maybe this script prettier:fix is not mandatory and a "lint:fix": "eslint --fix ." could be enough

@armandabric armandabric merged commit 092e4c4 into algolia:master Dec 14, 2017
@armandabric armandabric deleted the prettier-config branch December 14, 2017 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants