-
Notifications
You must be signed in to change notification settings - Fork 236
chore: switch from standard to eslint #2579
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
Conversation
This switches from using standard to eslint for linting/formatting. It is currently setup to use the same "standard" rules. This change allows us to add custom rules, should we want to, or eventually to diverge on style. The config setup was helped by: standard/standard#1016 (comment)
This fails with node 8.6 at least, so we'll need to cope with that:
|
@astorm Thoughts on doing this? No rush at all. |
I'm all for it. |
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.
Looks great and should let us evolve out coding standards as time goes on (i.e. I'll never forget a use strict
again)
I'd be fine with this going in as is.
One improvement we might make is having it ignore javascript from builds. Specifically, our .gitignore includes the following lines
/test/babel/out.js
/test/types/transpile/index.js
/test/types/transpile-default/index.js
//...
/test/babel/out.js
/test/types/transpile/index.js
/test/types/transpile-default/index.js
These files produce javascript that eslint's unhappy with. If we could get the make check
/npm run lint
commands to ignore these entries that'd be great. Put another way, the first time I ran the linter it complained hard about all these build files :)
Hrm. I guess I don't have local builds of those files in my working copy. Did the existing |
Well that is a "fun" pickle. One recommended way to do this is to use the However, adding that makes
so we then get linter errors on those files that are in git. |
…g to ignore (this is some duplication from .gitignore, but necessary for some ignoring of files that are in git)
^ @astorm I've switched to having a .eslintrc.json file that explicitly lists the ignore patterns. Please give that a try. |
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.
^ @astorm I've switched to having a .eslintrc.json file that explicitly lists the ignore patterns. Please give that a try.
💥 that did it -- the 5000 or so linting errors in the built javascript are no longer reported. We appear to be only linting the files that we edit 👍
This switches from using standard to eslint for linting/formatting.
It is currently setup to use the same "standard" rules. This change
allows us to add/try custom rules, should we want to, or eventually to
diverge on style. The config setup was helped by:
standard/standard#1016 (comment)
Checklist