-
Notifications
You must be signed in to change notification settings - Fork 90
Non-Breaking Unit Test Formatting Updates #660
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
Conversation
$scope.nodes = {}; | ||
for(var kind in nodeKinds) { | ||
|
||
Object.keys(nodeKinds).forEach(function (kind) { |
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.
Altered this loop since it was linting towards something like.... Can alter it back towards this if we vote this direction
for(var kind in nodeKinds) {
if (nodeKinds.hasOwnProperty(kind)) {
...
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 don't have any particular preference. I'm fine with either.
8fdb855
to
b9a7430
Compare
no-else-return: 2 | ||
no-loop-func: 2 | ||
vars-on-top: 2 | ||
vars-on-top: 1 |
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 looks it's being relaxed. Was that intentional?
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.
Good catch, was unintentional but if we're good with it, which it sounds like we may be I can leave it be
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.
Sounds good to me!
no-else-return: 2 | ||
no-loop-func: 2 | ||
vars-on-top: 2 | ||
vars-on-top: 1 |
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 eUnFocused2 = page.find("#i2")[0]; | ||
|
||
$scope.$apply(function(){ | ||
$scope.$apply(function () { |
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 mind removing this rule as well.
eslint.yaml
Outdated
space-after-keywords: 2 | ||
space-before-blocks: 2 | ||
space-before-function-paren: 2 | ||
space-before-function-paren: 1 |
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.
Relaxed this to a warning on the main, and turned it off for tests.
But we can go all the way with it @jeff-phillips-18 @dtaylor113 @amarie401 ?
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 say remove it completely.
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.
cannnnn do!
eslint.yaml
Outdated
vars-on-top: 1 | ||
no-debugger: 2 | ||
no-cond-assign: 2 | ||
no-console: 2 |
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.
Can we change this to a 1? I'd like to see a warning about consoles, not an error.
Update code format for unit tests.
7bdaa9b
Description
Related to PR #644 and issue #620
Closes #646
PR Checklist
Unit tests are includedScreenshots are attached (if there are visual changes in the UI)A Designer is assigned as a reviewer (if there are visual changes in the UI)A CSS rep is assigned as a reviewer (if there are visual changes in the UI)@beanh66