-
Notifications
You must be signed in to change notification settings - Fork 94
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
Conversation
package.json
Outdated
} | ||
}, | ||
"lint-staged": { | ||
"*.{js,ts}": [ |
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.
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}'", |
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.
Same problem with extensions as here
package.json
Outdated
}, | ||
"lint-staged": { | ||
"*.{js,ts,tsx}": [ | ||
"prettier --no-semi --single-quote --write", |
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.
Prettier can be configured via prettier
key in the package.json
, so let's move prettier config there to reduce duplication (see line 15)
Should we format Markdown files with Prettier? |
Might also make sense to use |
@andywer ESLint has more linting options than Standard, but for now we can use Standard. |
@dmitmel Of course, but I wouldn't change everything at once. Incremental changes are way easier to handle 😉 |
Changed it to use |
It looks like prettier-standard does not fix all its issues, which kinda defeats the point of prettier |
Superseded by #275. |
Related to #262
with this the formatter runs on
npm test
(in the root) and on any modified file (via pre-commit hook)