This repository has been archived by the owner on Jun 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
eslint: add eslint to nodereport #46
Open
gdams
wants to merge
1
commit into
nodejs:main
Choose a base branch
from
gdams:eslint
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
env: | ||
node: true | ||
es6: true | ||
|
||
rules: | ||
indent: [2, 2] | ||
quotes: [2, single] | ||
no-trailing-spaces: 2 | ||
comma-spacing: [2, { before: false, after: true }] | ||
eqeqeq: [2, always] | ||
linebreak-style: [2, unix] | ||
semi: [2, always] | ||
no-console: 0 | ||
no-inner-declarations: 0 | ||
no-constant-condition: 0 | ||
no-regex-spaces: 0 | ||
|
||
extends: eslint:recommended | ||
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
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.
this isn't the same as nodejs/node: https://github.com/nodejs/node/blob/master/.eslintrc.yaml
Pretty much everyone from Node in a recent thread (that I can't find at the moment, sorry) heavily favours explicit specification, its quite painful updating between eslint versions when using their builtins.
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.
Most of the other modules such as citgm don't currently hard code all the rules. The thread was a PR that I submitted the other day. I'm happy to define them all but is it really necessary for a module that isn't primarily javascript anyway? If we implement a CI such as travis we would very quickly pick up new rules that break things.
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.
Isn't the easy thing to just directly copy node's file? I've had horrendous times in the past when eslint bumps majors trying to update, and they used to bump majors or introduce incompatibilities pretty often. From what I saw, I'm not the only one. If its easy, I would just copy the file from nodejs, if that is more complex than it seems (perhaps it relies on some custom rules?), then I've no objection to this. Any eslint is better than none.
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.
Don't hold me to it, but I believe that the community uses several custom rules, i'll double check.
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.
They do, it's in tools/eslint-rules.
I don't think it makes a big difference whether we include the rules or not, it shouldn't be that hard to include them if it means possibly less work down the line.