Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Conversation

GedasGa
Copy link

@GedasGa GedasGa commented Jun 18, 2019

Motivation and Context

Resolves #141

Description

More info: apache/cordova#123

Testing

npm test

Checklist

  • I've run the tests to see all new and existing tests pass
  • ~~ I added automated test coverage as appropriate for this change ~~
  • ~~ Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android)) ~~
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • ~~ I've updated the documentation if necessary~~

# under the License.

env:
jasmine: true
Copy link
Member

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?

Copy link
Author

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.

Copy link
Member

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.

Copy link
Author

@GedasGa GedasGa Jun 18, 2019

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.

Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert to eslint
3 participants