-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add eslint script (extends airbnb + react + react-native) #317
Conversation
@cooperka shouldn't we only have |
Yeah, good point that would be easier. I guess I was going for flexibility over usability but I agree it should just take care of that itself. I'll update soon. Should we fix lints in this PR, or make a new one? |
New one i think, it might not be so friendly |
Currently 506 errors, 7 warnings :D
@kfiroo apparently npm doesn't work that way... here's my attempt. Do you have a different suggestion for how we could use Attempting to run |
Removed a few unnecessarily strict rules, so we're down to 486 errors now.
@cooperka Which version of npm are you using? We can keep the dependencies in devDeps, just feels strange that it might fall out of sync with your code who uses it. |
@kfiroo I tried with npm |
@cooperka sorry I haven't tried it yet :( So, I'm merging? |
Sure! Assuming you're happy with the rules (but we can always change / override them later as we fix lints). |
Currently 486 errors, 7 warnings!
We'll have to go through and iteratively fix all of them. Most popular IDEs have an ESLint plugin where the lints will show up as red underlines, so that makes things much easier. There's also an automatic cleanup with
eslint --fix
that I haven't tried yet.Some issues should be ignored, and that can be done line-by-line with
// eslint-disable-line rule-name
or for blocks with/* eslint-disable rule-name */ ...code... /* eslint-enable */
The README for eslint-config-cooperka has also been updated with config steps in case you want to have a look.
As suggested in #314.