-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Prefer const in test files #1117
Conversation
Many uses of |
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.
🎉
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.
@nventuro <3 awesome!
+1, with a PITA remark for following branches :)
"promise/always-return": 0 | ||
|
||
"promise/always-return": "off", | ||
"promise/avoid-new": "off", |
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.
I wouldn't like to delay this branch, and I love what you are doing with style.
But, this changes are not related to const
. For the future branches, please split the things that are not related into small focused PRs.
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.
Forgive me father for I have sinned :(
I know I shouldn't have, but I couldn't stand the ugly and unsorted eslint file. Didn't add any new rules other than the const
related ones though.
|
||
beforeEach(async function () { | ||
lb = await LimitBalanceMock.new(); | ||
limitBalance = await LimitBalanceMock.new(); |
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.
💯
var
is removed and unallowedlet
can only be used when the variable is re-assignedconst
is used on all other casesCovers part of #1091.