Investigate style enforcement tools
See original GitHub issueI don’t think style enforcement should be part of our linting process. It’s too annoying to see formatting messages in console and browser warnings as you write code.
Nevertheless I think it’s a good idea to enforce style automatically. For example, before pushing your changes.
We don’t want to enforce any particular style in CRA projects but I want to either document or integrate with popular automatic code formatting tools.
I don’t plan to look into this personally but I’d love somebody to help us out and investigate what’s out there in the ecosystem, and how we could use that in CRA.
Constraints:
- Should offer different styles (at least semi / no-semi)
- Fixing violations should be automatic and as easy as
npm run format
which could be likereact-scripts format semi
- The tool should understand all of the syntax we use (ES6, JSX, class properties, async await)
Desired outcomes:
- We know which style enforcement tools exist and how they differ from each other
- If there is one fitting our workflow, we have documentation on integrating it into CRA project
- If it’s really good we might even include it into CRA
If you’d like to help, please write in this issue! I think it’s fine if several people look into this at the same time so this task is open to everyone.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:9 (4 by maintainers)
This is more or less what I wanted (from @jlongster). I’d like to investigate integrating it by default.
http://jlongster.com/A-Prettier-Formatter
Yep.