-
Notifications
You must be signed in to change notification settings - Fork 825
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
feat: lint examples #649
feat: lint examples #649
Conversation
5c52795
to
cfb1c2b
Compare
Codecov Report
@@ Coverage Diff @@
## master #649 +/- ##
==========================================
+ Coverage 90.92% 92.67% +1.75%
==========================================
Files 224 227 +3
Lines 10256 10337 +81
Branches 962 940 -22
==========================================
+ Hits 9325 9580 +255
+ Misses 931 757 -174
|
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.
Each example has to have its own .eslintrc? is there no way to share a single one in the whole examples folder?
Sounds sensible, will look into that. |
I used the airbnb rules on a previous project and found them to be generally sensible, but one of the overrides we applied was to always use strict. The airbnb style guide assumes you are using the airbnb development toolchain which inserts |
@naseemkullah it looks like one of the rules is no-use-before-defined whose behavior I don't happen to like. JS has function hoisting which I find makes code a lot easier to understand. I like to have the "main" function at the top, with the utility functions it calls at the bottom, which reads much more naturally to me. With the airbnb rules you are required to scroll past all the utility functions before you get to the function that actually does the work. |
cfb1c2b
to
350ccf2
Compare
furthermore, override the strict rule that ships with airbnb
350ccf2
to
26a4036
Compare
Co-Authored-By: Daniel Dyla <[email protected]>
Can you add a yarn script Also add the dev dependencies. |
Sure sounds good, |
no convention afaik. just different people adding them |
67108f1
to
462a762
Compare
462a762
to
a88c683
Compare
@dyladan I've fixed conflicts and I've added many exceptions as there was too much non easily lintable code. Lets please get this in before more changes are made to examples to avoid fixing conflicts. |
bump |
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.
LGTM
I think this is good to go, right? /cc @dyladan |
@mayurkale22 yes I think so. I didn't want to merge without your ✅ |
Which problem is this PR solving?
Fixes #603
Short description of the changes
Adds .eslintrc at root of examples folder, lints said examples (WIP) and adds a step in pipeline to validate that the examples are linted.