-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix: use eslint linter instead of the cli engine #34
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.
One comment but LGTM!
src/tools/js/eslint.js
Outdated
allowInlineConfig: true, | ||
ignore: false, | ||
reportUnusedDisableDirectives: false, |
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.
What's the reason for this change?
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.
The ignore
prop is actually for the configuration object for CLIEngine
. The configuration property ignore
does not exist for Linter.verifyAndFix
as it ignores "external" configuration by default.
If we have reportUnusedDisableDirectives
set to true
in cli-style
, usages of the disable directives which are uneccessary according to the cli-style
config will be reported as an error and will not pass validation until it is removed.
That might trigger errors in the project-level ESLint configuration, which would have been the reason to use the disable directives in the first place.
edited for clarity
That self-test you put in the Travis file is a life-saver! |
## [3.1.1](v3.1.0...v3.1.1) (2019-04-24) ### Bug Fixes * use eslint linter instead of the cli engine ([#34](#34)) ([e9e9331](e9e9331))
🎉 This PR is included in version 3.1.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This has the primary benefit of letting this instance of ESLint run in isolation from the ESLint configuration cascade and hierarchy which can interfere with these standards.
Using only the linter and dealing with the output explicitly allows a project to have a local instance of ESLint for e.g. React 16.8 linting and cli-style for complying with DHIS2 code standards.
This has a secondary benefit of being faster. For maintenance app a full check went from 9.8 sec to 7.2 sec.