-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Investigate style enforcement tools #734
Comments
I've used a combination of typescript-formatter for basic formatting of JavaScript source files followed by I think ESLint is a good fit for basic style fixups since you're already using it. For the initial code formatting part you probably want something based on the Babel toolchain however. |
Sounds like ESLint's |
https://github.com/sindresorhus/xo some config might work. |
@okonet might be interested in this. His |
Thanks @mxstbr for bringing this up. I'm definitely interested in this. I'm using lint-staged for all my projects and I can't recommend it enough especially along with |
Since there are already tons of eslint rules and plugins that do enforce style, it seems like leveraging |
This is more or less what I wanted (from @jlongster). |
Can we consider this issue a duplicate of #451 ? |
Yep. |
I 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:
npm run format
which could be likereact-scripts format semi
Desired outcomes:
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.
The text was updated successfully, but these errors were encountered: