This repository was archived by the owner on Jul 31, 2019. It is now read-only.
Fix#1921: Extended the Gruntfile to include eslint #1971
Closed
badrmodoukh wants to merge 7 commits intomozilla:masterfrom
Closed
Fix#1921: Extended the Gruntfile to include eslint #1971badrmodoukh wants to merge 7 commits intomozilla:masterfrom
badrmodoukh wants to merge 7 commits intomozilla:masterfrom
Conversation
Contributor
Author
|
I fixed the above errors |
humphd
approved these changes
Apr 13, 2017
Contributor
humphd
left a comment
There was a problem hiding this comment.
I think this looks good. Any objections? We can extend the rules as we go.
Contributor
|
cc @dsych. Let's build on this PR to also add prettier fix like we are doing in Brackets. mozilla/brackets#703 |
Contributor
|
Can we merge this @humphd - seems like the problems were addressed. |
Contributor
|
Tested this again today, and it needs a few things:
|
Contributor
|
Since we're switching to webpack, we would need to run eslint there. Feel free to take on that issue once the webpack code is merged in. Closing, in favor of that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@Pomax I installed eslint for grunt and modified the Gruntfile.js file to include the eslint task.

The only rule I can think of to enable and check for is the indent rule. I added it in the .eslintrc.json file and specified that the indent needs to be 2 spaces. If there are any other rules I need to add please let me know.
I also specified the ecmaVersion for the parser to be 6 because if I don't it will give many parsing errors like the keyword
letis reserved andconstis reserved.Currently when I run
npm testI get 7 errors because some files don't use 2 spaces. This is how the errors look: