Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Apply prettier formatting on codebase #1006

Conversation

stevenmusumeche
Copy link
Contributor

This PR upgrades prettier and adds a new npm run format command which runs it on the entire codebase. The rules are configured in .prettierrc, but I copied them from the eslint configuration to minimize the number of changes.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 94.737% when pulling 7c3ff4a on stevenmusumeche:task/add-format-command into 8a2f7d7 on FormidableLabs:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 94.737% when pulling 7c3ff4a on stevenmusumeche:task/add-format-command into 8a2f7d7 on FormidableLabs:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 94.737% when pulling 7c3ff4a on stevenmusumeche:task/add-format-command into 8a2f7d7 on FormidableLabs:master.

@ryan-roemer
Copy link
Member

I'm not reviewing as this is @kylecesmat 's game here, but in spectacle, we do our scripts this way:

// package.json
    "prettier": "prettier \"**/*.{js,json,css,md}\"",
    "prettier-fix": "npm run prettier -- --write",
    "prettier-check": "npm run prettier -- --list-different",

and run prettier-check in CI. It exits non-zero (failing the build) if prettier would change any files.

An alternative / additional way to do things is add the prettier plugins + rules to eslintrc.

All good approaches! Hope the tip helps :)

@blainekasten blainekasten mentioned this pull request Dec 5, 2018
@blainekasten
Copy link
Contributor

Closing in favor of #1012

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

Successfully merging this pull request may close these issues.

None yet

4 participants