-
Notifications
You must be signed in to change notification settings - Fork 482
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
Convert jshint to eslint #143
Conversation
# under the License. | ||
|
||
env: | ||
jasmine: true |
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.
Any specific reason why move this to a new file instead of keeping it in the tests.js
?
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 was doing for the consistency across other repositories. For example, iOS, Android, Electron has a separate file. As well, it's a good idea to keep configurations global in a separate file, rather than inside a specific test file. Because otherwise, that would mean you would have to go to each test file and add it manually.
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.
Plugin tests only have one test file, all the existing eslint setups of the other core plugins have it in the tests.js
directly, I would greatly prefer to follow the same model to keep the plugin tests as simple as possible.
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 still believe it should be in a separate file. This does not add complexity to the tests. It just keeps the configuration in a separate file. And generally, we try to do that as much as possible. Otherwise, we could also to have an eslint
config entirely in the package.json
file.
I would like to hear other's opinion on this.
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.
@erisu has been working on building a eslint config module so that we can have a shared ruleset across all of our repos and when that is ready I think the eslint config file will be required to apply third-party configs.
But for the time being, I agree with janpio, we should try to keep things as consistent as possible, even though personally I would prefer eslint configs to be inside a .eslintrc.js
file, I feel consistency is often more important when we are talking about something trivial/non-breaking.
f438bd2
to
48f6e76
Compare
Motivation and Context
Resolves #141
Description
More info: apache/cordova#123
Testing
npm test
Checklist
(platform)
if this change only applies to one platform (e.g.(android)
) ~~