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

Replace standard with prettier #263

Closed
wants to merge 2 commits into from

Conversation

jvanbruegge
Copy link
Contributor

Related to #262

with this the formatter runs on npm test (in the root) and on any modified file (via pre-commit hook)

package.json Outdated
}
},
"lint-staged": {
"*.{js,ts}": [
Copy link
Contributor

@dmitmel dmitmel Apr 1, 2018

Choose a reason for hiding this comment

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

There is a file called packages/sample-app/src/App.tsx, so the .tsx extension should also be added here

package.json Outdated
"scripts": {
"test": "lerna run test",
"test": "npm run format && lerna run test",
"format": "prettier --no-semi --single-quote --write 'packages/**/*.{js,ts}'",
Copy link
Contributor

@dmitmel dmitmel Apr 1, 2018

Choose a reason for hiding this comment

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

Same problem with extensions as here

package.json Outdated
},
"lint-staged": {
"*.{js,ts,tsx}": [
"prettier --no-semi --single-quote --write",
Copy link
Contributor

@dmitmel dmitmel Apr 2, 2018

Choose a reason for hiding this comment

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

Prettier can be configured via prettier key in the package.json, so let's move prettier config there to reduce duplication (see line 15)

@dmitmel
Copy link
Contributor

dmitmel commented Apr 3, 2018

Should we format Markdown files with Prettier?

@andywer
Copy link
Owner

andywer commented Apr 3, 2018

Might also make sense to use prettier-standard?

@dmitmel
Copy link
Contributor

dmitmel commented Apr 3, 2018

@andywer ESLint has more linting options than Standard, but for now we can use Standard.

@andywer
Copy link
Owner

andywer commented Apr 3, 2018

@dmitmel Of course, but I wouldn't change everything at once. Incremental changes are way easier to handle 😉

@jvanbruegge
Copy link
Contributor Author

Changed it to use prettier-standard

@jvanbruegge
Copy link
Contributor Author

It looks like prettier-standard does not fix all its issues, which kinda defeats the point of prettier

@vlad-zhukov vlad-zhukov mentioned this pull request Apr 21, 2018
17 tasks
@vlad-zhukov vlad-zhukov added this to the 2.0.0 milestone Apr 21, 2018
@vlad-zhukov vlad-zhukov mentioned this pull request May 2, 2018
@vlad-zhukov
Copy link
Collaborator

Superseded by #275.

@vlad-zhukov vlad-zhukov closed this May 8, 2018
@jvanbruegge jvanbruegge deleted the prettier branch May 9, 2018 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants