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

Enforce code style and code conventions #205

Closed
cangoektas opened this issue Jul 26, 2016 · 3 comments
Closed

Enforce code style and code conventions #205

cangoektas opened this issue Jul 26, 2016 · 3 comments

Comments

@cangoektas
Copy link
Contributor

cangoektas commented Jul 26, 2016

I noticed that linting is very loose. Personally I like to be forced to use a specific codestyle and follow certain coding conventions but it's also necessary when working in a team. A lot of beginners copy code snippets from all over the web too so it's very likely that their code get's inconsistent. But even for the experienced folks as the project gets bigger it's hard to manually stick to a certain style.

I also feel like this project has the potential to establish style and conventions for the entire React community. What do you guys think?

@gaearon
Copy link
Contributor

gaearon commented Jul 26, 2016

Hi, we made a decision not to enforce any style. There are a couple of reasons: people have different preferences, some have styles mandated by their companies, and beginners will often copy and paste examples from the web which will be frustrating to adjust to a specific style.

We might allow adding custom lint rules in the future but this is not currently on the table.

@gaearon gaearon closed this as completed Jul 26, 2016
@pjm17971
Copy link

pjm17971 commented Aug 4, 2016

@gaearon: That is a completely reasonable position, but I'm wondering if there's a recommended approach to develop with some organization mandated styling, without ejecting? Also, if there was someway to specify "lint strict" and have it use airbnb rules, that would work. Other than that, we just built our first app on this and it's going great! Thanks!!

@gaearon
Copy link
Contributor

gaearon commented Aug 4, 2016

I think your best bet would be creating a separate ESLint config that extends the one in react-scripts/config/eslint, and running eslint explicitly pointing to that config. This would not work for the npm start-integrated linting, but you could add your own lint command. Note that we reserve the right rename/move/change ESLint config between minor versions because technically it’s private.

@lock lock bot locked and limited conversation to collaborators Jan 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants