-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 basic tooling for JS linting #3167
Conversation
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.
Some files could not be reviewed due to errors:
�[31mERROR�[0m: Can't find config file: airbnb-base
�[31mERROR�[0m: Can't find config file: airbnb-base
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.
Some files could not be reviewed due to errors:
�[31mERROR�[0m: Can't find config file: airbnb-base
�[31mERROR�[0m: Can't find config file: airbnb-base
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.
Some files could not be reviewed due to errors:
�[31mERROR�[0m: Can't find config file: airbnb-base
�[31mERROR�[0m: Can't find config file: airbnb-base
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.
Some files could not be reviewed due to errors:
�[31mERROR�[0m: Can't find config file: airbnb-base
�[31mERROR�[0m: Can't find config file: airbnb-base
e61d599
to
7d30172
Compare
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.
👍 Thanks!
But I think it should not close #2849, since it also expects other PR to re-introduce disabled rules. |
Correct, @kennyadsl —let me edit the description to avoid automatic closure of that issue. |
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.
💯
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.
This is really great. I have some suggestions regarding our globals
Added a new commit to comply with your suggestions, @tvdeyen 🙌 let me know what you think! |
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.
I like this, we should merge it pending @tvdeyen's approval.
Several files under `backend/` were raising ESLint errors when linted via `yarn lint`; this commit introduces the aforementioned change to supress these errors
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.
Awesome. Thanks 👏
Description
See #2849 for further discussion prior to this PR
This PR aims to add basic tooling for JS linting based on @airbnb's JavaScript Style Guide by doing the following:
Adds a
package.json
file with the bare minimum to work as expected —including a Yarn task to automatically check if the rules for all JS files on Solidus (minus those underguides
,sandbox
,node_modules
andvendor
) are being followed. The dependencies for this to work are based on this NPM package, which doesn't include linting specific to JS frameworks, such as ReactIgnores unnecessary newly-introduced files and folders (I'm looking at you,
node_modules
👀)Adds ESLint config file with all the warnings/errors raised when running
yarn lint
disabledAdds ESLint inline config comments on several files under
backend
, asyarn lint
was complaining even with the config fileEnable JS linting for Hound based on the newly-introduced
.eslintrc.json
fileWhitelist Solidus-specific global variables
This should allow for other future PRs to re-enable rules and fix its related issues.
Let me know what you think! 🙌
Checklist: