This repository was archived by the owner on Jul 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
tests: add and follow most of eslint rules #237
Open
come-maiz
wants to merge
1
commit into
zeppelinos:master
Choose a base branch
from
come-maiz:tests/javascript-lint
base: master
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 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| { | ||
| "extends" : [ | ||
| "standard", | ||
| "plugin:promise/recommended", | ||
| ], | ||
| "plugins": [ | ||
| "promise" | ||
| ], | ||
| "env": { | ||
| "browser" : true, | ||
| "node" : true, | ||
| "mocha" : true, | ||
| "jest" : true | ||
| }, | ||
| "globals" : { | ||
| "artifacts": false, | ||
| "contract": false, | ||
| "assert": false, | ||
| "web3": false | ||
| }, | ||
| "rules": { | ||
|
|
||
| // Strict mode | ||
| "strict": [2, "global"], | ||
|
|
||
| // Code style | ||
| "indent": [2, 2], | ||
| "quotes": [2, "single"], | ||
| "semi": ["error", "always"], | ||
| "space-before-function-paren": ["error", "always"], | ||
| "no-use-before-define": 0, | ||
| "eqeqeq": [2, "smart"], | ||
| "dot-notation": [2, {"allowKeywords": true, "allowPattern": ""}], | ||
| "no-redeclare": [2, {"builtinGlobals": true}], | ||
| "no-trailing-spaces": [2, { "skipBlankLines": true }], | ||
| "eol-last": 1, | ||
| "comma-spacing": [2, {"before": false, "after": true}], | ||
| "camelcase": [2, {"properties": "always"}], | ||
| "no-mixed-spaces-and-tabs": [2, "smart-tabs"], | ||
| "comma-dangle": [1, "always-multiline"], | ||
| "no-dupe-args": 2, | ||
| "no-dupe-keys": 2, | ||
| "no-debugger": 0, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this are the kind of rules that I find useful
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For all the ones that you don't find useful and want to remove, please open an issue on the code-style repo. The idea is to progress step-by-step until we are all comfortable with the rules, hopefully without hating each other when we disagree :) |
||
| "no-undef": 2, | ||
| "object-curly-spacing": [2, "always"], | ||
| "max-len": [2, 120, 2], | ||
| "generator-star-spacing": ["error", "before"], | ||
| "promise/avoid-new": 0, | ||
| "promise/always-return": 0 | ||
| } | ||
| } | ||
Oops, something went wrong.
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.
Once again, I strongly disagree with adding rules that do not add value to our development process... using or not semicolons is one of those, I will feel like I'm wasting my time if the CI fails because I didn't add a semicolon, OTOH I would really love the CI to tell me that I forgot a debugger line for example
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.
@facuspagnuolo the discussion about this is here: OpenZeppelin/configs#1
I might have misunderstood your opinion there, sorry about that. Feel free to reopen it and we'll keep talking there.
Later, if we agree to not use the semicolons, I'll adjust the code. This one is super simple, because eslint can autoapply it.