Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

chore(prettier): add prettier and prettierrc to template #50

Merged
merged 3 commits into from
Jun 6, 2018

Conversation

TheAmazingPT
Copy link
Collaborator

aemkei
aemkei previously approved these changes Jun 5, 2018
Copy link
Member

@aemkei aemkei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Nice! I like all decisions here!

Scarysize
Scarysize previously approved these changes Jun 5, 2018
@TheAmazingPT TheAmazingPT dismissed stale reviews from Scarysize and aemkei via 5554e4c June 5, 2018 13:29
@TheAmazingPT
Copy link
Collaborator Author

Shall I add a run script in the template/package.json?
The idea is now kinda that the editor can detect the .prettierrc and formats the current file on save. What do you think? There were some complaints on having this task in the build steps.

@Scarysize
Copy link
Contributor

I wouldn't add a run script. To migrate a project to prettier its often enough to do a find . | prettier run once and then rely on the editor picking up the .prettierrc file.

@aemkei
Copy link
Member

aemkei commented Jun 5, 2018

Is there a VSC extension that takes the prettierrc settings into account and let you do that using a command?

@pwambach
Copy link

pwambach commented Jun 5, 2018

yep https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode uses the config file.

I also activated the prettier.requireConfig setting, so that projects without a config file will not be formatted.

@pwambach
Copy link

pwambach commented Jun 5, 2018

One more thing, when prettier handles the 80 chars line length, can we switch off the eslint setting for this? Prettier sometimes cannot split the lines and then eslint complains. We should let prettier do it as good as it can...

pwambach
pwambach previously approved these changes Jun 5, 2018
@pwambach pwambach dismissed their stale review June 5, 2018 15:00

wrong checkbox...

@@ -0,0 +1,14 @@
{
"printWidth": 80,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disable eslint line width rule please

yfr
yfr previously approved these changes Jun 5, 2018
@TheAmazingPT TheAmazingPT merged commit 61dda14 into master Jun 6, 2018
@TheAmazingPT TheAmazingPT deleted the feat/prettierrc branch June 6, 2018 08:08
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.

5 participants