aws-node-recursive-function: enable eslint#78
Open
christophgysin wants to merge 1 commit intoserverless:masterfrom
Open
aws-node-recursive-function: enable eslint#78christophgysin wants to merge 1 commit intoserverless:masterfrom
christophgysin wants to merge 1 commit intoserverless:masterfrom
Conversation
Don't disable it globally. Fix issues, and suppress them where needed.
DavidWells
reviewed
Feb 10, 2017
| console.log('recursive call'); | ||
| /* decrement numberOfCalls so we don't infinitely loop */ | ||
| event.numberOfCalls = event.numberOfCalls - 1; | ||
| event.numberOfCalls -= 1; // eslint-disable-line no-param-reassign |
Contributor
There was a problem hiding this comment.
This is harder to read for me =)
Can we keep the original?
Contributor
Author
There was a problem hiding this comment.
serverless/examples/aws-node-recursive-function/handler.js
11:5 error Assignment can be replaced with operator assignment operator-assignment
This is coming from the airbnb coding style rules:
https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/style.js#L313-L315
I like the shorthand version better, but this is just personal preference.
If you prefer the long version, let's change the config to prevent this:
'operator-assignment': ['never']
Contributor
Author
There was a problem hiding this comment.
I just tried, and it seems that generate-readme.js is making use of the shorthand version in a couple of places, using md += '...' to concatenate strings.
We could of course also turn the rule off entirely.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Don't disable it globally. Fix issues, and suppress them where needed.