Skip to content
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

Update to newer eslint #3643

Merged
merged 14 commits into from
Aug 12, 2019
Merged

Update to newer eslint #3643

merged 14 commits into from
Aug 12, 2019

Conversation

dholbach
Copy link
Contributor

@dholbach dholbach commented Jul 1, 2019

I started work on updating eslint for a security update. Some issues I was able to resolve by running eslint --fix, these still need work and I'd need help:

yarn run v1.15.2
$ eslint app server.js && stylelint app/scripts && sass-lint -v

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/actions/app-actions.js
  6:1  error  Dependency cycle detected  import/no-cycle
  7:1  error  Dependency cycle detected  import/no-cycle

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/charts/edge-container.js
  62:30  error  Must use destructuring props assignment  react/destructuring-assignment
  63:30  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/charts/edge.js
  65:5  error  Must use destructuring props assignment  react/destructuring-assignment
  69:5  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/charts/node-container.js
  27:25  error  Must use destructuring props assignment  react/destructuring-assignment
  28:19  error  Must use destructuring props assignment  react/destructuring-assignment
  30:5   error  Must use destructuring props assignment  react/destructuring-assignment
  30:34  error  Must use destructuring props assignment  react/destructuring-assignment
  43:29  error  Must use destructuring props assignment  react/destructuring-assignment
  44:28  error  Must use destructuring props assignment  react/destructuring-assignment
  47:61  error  Must use destructuring props assignment  react/destructuring-assignment
  61:13  error  Must use destructuring props assignment  react/destructuring-assignment
  62:16  error  Must use destructuring props assignment  react/destructuring-assignment
  63:14  error  Must use destructuring props assignment  react/destructuring-assignment
  64:16  error  Must use destructuring props assignment  react/destructuring-assignment
  65:21  error  Must use destructuring props assignment  react/destructuring-assignment
  67:18  error  Must use destructuring props assignment  react/destructuring-assignment
  68:22  error  Must use destructuring props assignment  react/destructuring-assignment
  70:15  error  Must use destructuring props assignment  react/destructuring-assignment
  71:21  error  Must use destructuring props assignment  react/destructuring-assignment
  72:23  error  Must use destructuring props assignment  react/destructuring-assignment
  73:19  error  Must use destructuring props assignment  react/destructuring-assignment
  74:22  error  Must use destructuring props assignment  react/destructuring-assignment
  80:23  error  Must use destructuring props assignment  react/destructuring-assignment
  81:23  error  Must use destructuring props assignment  react/destructuring-assignment
  84:12  error  Must use destructuring props assignment  react/destructuring-assignment
  85:12  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/charts/nodes-chart-elements.js
   64:28  error  Must use destructuring props assignment  react/destructuring-assignment
   75:28  error  Must use destructuring props assignment  react/destructuring-assignment
   86:27  error  Must use destructuring props assignment  react/destructuring-assignment
   87:29  error  Must use destructuring props assignment  react/destructuring-assignment
   92:27  error  Must use destructuring props assignment  react/destructuring-assignment
   93:34  error  Must use destructuring props assignment  react/destructuring-assignment
   98:30  error  Must use destructuring props assignment  react/destructuring-assignment
   99:23  error  Must use destructuring props assignment  react/destructuring-assignment
  100:25  error  Must use destructuring props assignment  react/destructuring-assignment
  101:25  error  Must use destructuring props assignment  react/destructuring-assignment
  102:27  error  Must use destructuring props assignment  react/destructuring-assignment
  107:32  error  Must use destructuring props assignment  react/destructuring-assignment
  111:33  error  Must use destructuring props assignment  react/destructuring-assignment
  115:31  error  Must use destructuring props assignment  react/destructuring-assignment
  119:52  error  Must use destructuring props assignment  react/destructuring-assignment
  123:36  error  Must use destructuring props assignment  react/destructuring-assignment
  127:29  error  Must use destructuring props assignment  react/destructuring-assignment
  128:29  error  Must use destructuring props assignment  react/destructuring-assignment
  129:32  error  Must use destructuring props assignment  react/destructuring-assignment
  136:32  error  Must use destructuring props assignment  react/destructuring-assignment
  139:24  error  Must use destructuring props assignment  react/destructuring-assignment
  142:26  error  Must use destructuring props assignment  react/destructuring-assignment
  148:52  error  Must use destructuring props assignment  react/destructuring-assignment
  202:20  error  Must use destructuring props assignment  react/destructuring-assignment
  226:19  error  Must use destructuring props assignment  react/destructuring-assignment
  236:19  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/charts/nodes-chart.js
  44:9   error  Must use destructuring props assignment  react/destructuring-assignment
  45:7   error  Must use destructuring props assignment  react/destructuring-assignment
  52:47  error  Must use destructuring props assignment  react/destructuring-assignment
  66:21  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/charts/nodes-grid.js
    1:1   error  Definition for rule 'no-multi-comp' was not found      no-multi-comp
  113:25  error  Must use destructuring props assignment                react/destructuring-assignment
  114:19  error  Must use destructuring props assignment                react/destructuring-assignment
  116:5   error  Must use destructuring props assignment                react/destructuring-assignment
  120:5   error  Must use destructuring props assignment                react/destructuring-assignment
  131:1   error  This line has a length of 101. Maximum allowed is 100  max-len
  147:14  error  Must use destructuring props assignment                react/destructuring-assignment
  147:44  error  Must use destructuring props assignment                react/destructuring-assignment
  162:23  error  Must use destructuring props assignment                react/destructuring-assignment
  167:27  error  Must use destructuring props assignment                react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/app.js
   65:5   error  Must use destructuring props assignment  react/destructuring-assignment
   65:41  error  Must use destructuring props assignment  react/destructuring-assignment
   66:5   error  Must use destructuring props assignment  react/destructuring-assignment
   66:44  error  Must use destructuring props assignment  react/destructuring-assignment
   83:19  error  Must use destructuring props assignment  react/destructuring-assignment
   83:49  error  Must use destructuring props assignment  react/destructuring-assignment
   86:10  error  Must use destructuring props assignment  react/destructuring-assignment
   89:7   error  Must use destructuring props assignment  react/destructuring-assignment
   91:19  error  Must use destructuring props assignment  react/destructuring-assignment
   98:5   error  Must use destructuring props assignment  react/destructuring-assignment
  103:31  error  Must use destructuring props assignment  react/destructuring-assignment
  104:7   error  Must use destructuring props assignment  react/destructuring-assignment
  106:45  error  Must use destructuring props assignment  react/destructuring-assignment
  107:7   error  Must use destructuring props assignment  react/destructuring-assignment
  110:38  error  Must use destructuring props assignment  react/destructuring-assignment
  121:7   error  Must use destructuring props assignment  react/destructuring-assignment
  141:23  error  Must use destructuring props assignment  react/destructuring-assignment
  146:23  error  Must use destructuring props assignment  react/destructuring-assignment
  159:23  error  Must use destructuring props assignment  react/destructuring-assignment
  173:15  error  Must use destructuring props assignment  react/destructuring-assignment
  174:25  error  Must use destructuring props assignment  react/destructuring-assignment
  175:19  error  Must use destructuring props assignment  react/destructuring-assignment
  183:7   error  Must use destructuring props assignment  react/destructuring-assignment
  215:38  error  Must use destructuring props assignment  react/destructuring-assignment
  220:37  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/cloud-feature.js
   8:14  error  Must use destructuring context assignment  react/destructuring-assignment
   8:43  error  Must use destructuring context assignment  react/destructuring-assignment
  14:53  error  Must use destructuring props assignment    react/destructuring-assignment
  15:17  error  Must use destructuring context assignment  react/destructuring-assignment
  16:17  error  Must use destructuring context assignment  react/destructuring-assignment
  21:9   error  Must use destructuring props assignment    react/destructuring-assignment
  22:53  error  Must use destructuring props assignment    react/destructuring-assignment
  30:3   error  Prop type `object` is forbidden            react/forbid-prop-types
  31:3   error  Prop type `object` is forbidden            react/forbid-prop-types
  32:3   error  Prop type `object` is forbidden            react/forbid-prop-types
  36:3   error  Prop type `object` is forbidden            react/forbid-prop-types
  37:3   error  Prop type `object` is forbidden            react/forbid-prop-types

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/debug-toolbar.js
  161:20  error  Must use destructuring state assignment                       react/destructuring-assignment
  161:20  error  Use callback in setState when referencing the previous state  react/no-access-state-in-setstate
  166:22  error  Must use destructuring props assignment                       react/destructuring-assignment
  184:20  error  Must use destructuring props assignment                       react/destructuring-assignment
  202:20  error  Must use destructuring props assignment                       react/destructuring-assignment
  221:16  error  Must use destructuring props assignment                       react/destructuring-assignment
  234:16  error  Must use destructuring props assignment                       react/destructuring-assignment
  270:16  error  Must use destructuring props assignment                       react/destructuring-assignment
  288:11  error  Missing an explicit type attribute for button                 react/button-has-type
  289:11  error  Missing an explicit type attribute for button                 react/button-has-type
  290:64  error  Must use destructuring state assignment                       react/destructuring-assignment
  291:11  error  Missing an explicit type attribute for button                 react/button-has-type
  291:48  error  Must use destructuring state assignment                       react/destructuring-assignment
  292:11  error  Missing an explicit type attribute for button                 react/button-has-type
  293:11  error  Missing an explicit type attribute for button                 react/button-has-type
  296:11  error  Missing an explicit type attribute for button                 react/button-has-type
  297:11  error  Missing an explicit type attribute for button                 react/button-has-type
  298:11  error  Missing an explicit type attribute for button                 react/button-has-type
  299:11  error  Missing an explicit type attribute for button                 react/button-has-type
  304:11  error  Missing an explicit type attribute for button                 react/button-has-type
  305:11  error  Missing an explicit type attribute for button                 react/button-has-type
  306:11  error  Missing an explicit type attribute for button                 react/button-has-type
  307:11  error  Missing an explicit type attribute for button                 react/button-has-type
  308:11  error  Missing an explicit type attribute for button                 react/button-has-type
  313:11  error  Missing an explicit type attribute for button                 react/button-has-type
  316:10  error  Must use destructuring state assignment                       react/destructuring-assignment
  331:10  error  Must use destructuring state assignment                       react/destructuring-assignment
  347:11  error  Missing an explicit type attribute for button                 react/button-has-type
  348:11  error  Missing an explicit type attribute for button                 react/button-has-type
  353:11  error  Missing an explicit type attribute for button                 react/button-has-type
  354:11  error  Missing an explicit type attribute for button                 react/button-has-type

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/details-card.js
  30:20  error  Must use destructuring state assignment  react/destructuring-assignment
  41:27  error  Must use destructuring props assignment  react/destructuring-assignment
  42:24  error  Must use destructuring props assignment  react/destructuring-assignment
  42:47  error  Must use destructuring props assignment  react/destructuring-assignment
  60:16  error  Must use destructuring props assignment  react/destructuring-assignment
  61:19  error  Must use destructuring props assignment  react/destructuring-assignment
  62:20  error  Must use destructuring state assignment  react/destructuring-assignment
  63:36  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/details.js
  18:38  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/embedded-terminal.js
  34:16  error  Must use destructuring state assignment  react/destructuring-assignment
  63:22  error  Must use destructuring state assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/footer.js
  18:5   error  Must use destructuring props assignment        react/destructuring-assignment
  18:33  error  Must use destructuring props assignment        react/destructuring-assignment
  24:15  error  Must use destructuring props assignment        react/destructuring-assignment
  26:5   error  Must use destructuring props assignment        react/destructuring-assignment
  70:11  error  Missing an explicit type attribute for button  react/button-has-type
  76:11  error  Missing an explicit type attribute for button  react/button-has-type
  79:11  error  Missing an explicit type attribute for button  react/button-has-type
  80:22  error  Must use destructuring props assignment        react/destructuring-assignment
  87:11  error  Missing an explicit type attribute for button  react/button-has-type
  87:52  error  Must use destructuring props assignment        react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/help-panel.js
  61:5   error  Expected closing tag to match indentation of opening     react/jsx-closing-tag-location
  77:5   error  Expected closing tag to match indentation of opening     react/jsx-closing-tag-location
  89:12  error  Expected indentation of 4 space characters but found 11  react/jsx-indent
  97:12  error  Expected indentation of 4 space characters but found 11  react/jsx-indent

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/loading.js
  49:46  error  Must use destructuring state assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/metric-selector-item.js
  20:15  error  Must use destructuring props assignment  react/destructuring-assignment
  21:19  error  Must use destructuring props assignment  react/destructuring-assignment
  22:25  error  Must use destructuring props assignment  react/destructuring-assignment
  23:19  error  Must use destructuring props assignment  react/destructuring-assignment
  28:24  error  Must use destructuring props assignment  react/destructuring-assignment
  29:5   error  Must use destructuring props assignment  react/destructuring-assignment
  33:24  error  Must use destructuring props assignment  react/destructuring-assignment
  38:7   error  Must use destructuring props assignment  react/destructuring-assignment
  41:7   error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/metric-selector.js
  16:5  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/network-selector-item.js
  17:15  error  Must use destructuring props assignment  react/destructuring-assignment
  18:5   error  Must use destructuring props assignment  react/destructuring-assignment
  22:15  error  Must use destructuring props assignment  react/destructuring-assignment
  26:7   error  Must use destructuring props assignment  react/destructuring-assignment
  28:7   error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/networks-selector.js
  17:12  error  Must use destructuring props assignment  react/destructuring-assignment
  17:37  error  Must use destructuring props assignment  react/destructuring-assignment
  21:5   error  Must use destructuring props assignment  react/destructuring-assignment
  21:30  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/__tests__/node-details-table-test.js
  73:1  error  This line has a length of 101. Maximum allowed is 100  max-len

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-control-button.js
  16:33  error  Must use destructuring props assignment  react/destructuring-assignment
  20:38  error  Must use destructuring props assignment  react/destructuring-assignment
  29:41  error  Must use destructuring props assignment  react/destructuring-assignment
  32:7   error  Must use destructuring props assignment  react/destructuring-assignment
  32:37  error  Must use destructuring props assignment  react/destructuring-assignment
  32:56  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-generic-table.js
   50:14  error  Must use destructuring state assignment                       react/destructuring-assignment
   50:14  error  Use callback in setState when referencing the previous state  react/no-access-state-in-setstate
   57:22  error  Must use destructuring state assignment                       react/destructuring-assignment
   59:16  error  Must use destructuring props assignment                       react/destructuring-assignment
   64:9   error  Must use destructuring state assignment                       react/destructuring-assignment
   64:47  error  Must use destructuring state assignment                       react/destructuring-assignment
   65:1   error  This line has a length of 142. Maximum allowed is 100         max-len
   65:41  error  Must use destructuring state assignment                       react/destructuring-assignment
   68:30  error  Must use destructuring state assignment                       react/destructuring-assignment
  117:23  error  Must use destructuring props assignment                       react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-health-item.js
   7:31   error  Must use destructuring props assignment  react/destructuring-assignment
  10:9    error  Must use destructuring props assignment  react/destructuring-assignment
  10:110  error  Must use destructuring props assignment  react/destructuring-assignment
  13:17   error  Must use destructuring props assignment  react/destructuring-assignment
  14:16   error  Must use destructuring props assignment  react/destructuring-assignment
  15:19   error  Must use destructuring props assignment  react/destructuring-assignment
  16:18   error  Must use destructuring props assignment  react/destructuring-assignment
  17:17   error  Must use destructuring props assignment  react/destructuring-assignment
  18:23   error  Must use destructuring props assignment  react/destructuring-assignment
  19:20   error  Must use destructuring props assignment  react/destructuring-assignment
  23:10   error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-health-link-item.js
  63:66  error  Must use destructuring props assignment  react/destructuring-assignment
  71:24  error  Must use destructuring state assignment  react/destructuring-assignment
  86:20  error  Must use destructuring state assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-health.js
  16:23  error  Must use destructuring state assignment                       react/destructuring-assignment
  16:23  error  Use callback in setState when referencing the previous state  react/no-access-state-in-setstate
  34:27  error  Must use destructuring state assignment                       react/destructuring-assignment
  35:24  error  Must use destructuring state assignment                       react/destructuring-assignment
  61:21  error  Must use destructuring state assignment                       react/destructuring-assignment
  63:23  error  Must use destructuring state assignment                       react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-info.js
  20:23  error  Must use destructuring state assignment                       react/destructuring-assignment
  20:23  error  Use callback in setState when referencing the previous state  react/no-access-state-in-setstate
  26:17  error  Must use destructuring props assignment                       react/destructuring-assignment
  30:10  error  Must use destructuring state assignment                       react/destructuring-assignment
  73:23  error  Must use destructuring props assignment                       react/destructuring-assignment
  74:21  error  Must use destructuring state assignment                       react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-property-list.js
  31:19  error  Must use destructuring state assignment                       react/destructuring-assignment
  31:19  error  Use callback in setState when referencing the previous state  react/no-access-state-in-setstate
  39:29  error  Must use destructuring state assignment                       react/destructuring-assignment
  39:67  error  Must use destructuring state assignment                       react/destructuring-assignment
  40:22  error  Must use destructuring state assignment                       react/destructuring-assignment
  42:69  error  Must use destructuring state assignment                       react/destructuring-assignment
  46:30  error  Must use destructuring state assignment                       react/destructuring-assignment
  70:23  error  Must use destructuring props assignment                       react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-relatives-link.js
  20:19  error  Must use destructuring props assignment  react/destructuring-assignment
  22:5   error  Must use destructuring props assignment  react/destructuring-assignment
  23:7   error  Must use destructuring props assignment  react/destructuring-assignment
  24:7   error  Must use destructuring props assignment  react/destructuring-assignment
  25:7   error  Must use destructuring props assignment  react/destructuring-assignment
  35:30  error  Must use destructuring props assignment  react/destructuring-assignment
  35:56  error  Must use destructuring props assignment  react/destructuring-assignment
  42:28  error  Must use destructuring props assignment  react/destructuring-assignment
  42:53  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-relatives.js
  18:19  error  Must use destructuring state assignment                       react/destructuring-assignment
  18:19  error  Use callback in setState when referencing the previous state  react/no-access-state-in-setstate
  26:21  error  Must use destructuring state assignment                       react/destructuring-assignment
  26:64  error  Must use destructuring state assignment                       react/destructuring-assignment
  27:41  error  Must use destructuring state assignment                       react/destructuring-assignment
  31:38  error  Must use destructuring state assignment                       react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-table-headers.js
   9:20  error  Must use destructuring props assignment                react/destructuring-assignment
  13:5   error  Must use destructuring props assignment                react/destructuring-assignment
  36:1   error  This line has a length of 108. Maximum allowed is 100  max-len

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-table-node-link.js
   6:1   error  Dependency cycle detected                import/no-cycle
  20:19  error  Must use destructuring props assignment  react/destructuring-assignment
  22:5   error  Must use destructuring props assignment  react/destructuring-assignment
  23:7   error  Must use destructuring props assignment  react/destructuring-assignment
  24:7   error  Must use destructuring props assignment  react/destructuring-assignment
  25:7   error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-table-node-metric-link.js
   6:1   error  Dependency cycle detected                import/no-cycle
  16:66  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-table-row.js
    7:1   error  Dependency cycle detected                import/no-cycle
    8:1   error  Dependency cycle detected                import/no-cycle
  133:9   error  Must use destructuring props assignment  react/destructuring-assignment
  134:7   error  Must use destructuring props assignment  react/destructuring-assignment
  134:31  error  Must use destructuring props assignment  react/destructuring-assignment
  134:49  error  Must use destructuring props assignment  react/destructuring-assignment
  140:9   error  Must use destructuring props assignment  react/destructuring-assignment
  141:7   error  Must use destructuring props assignment  react/destructuring-assignment
  164:5   error  Must use destructuring props assignment  react/destructuring-assignment
  164:28  error  Must use destructuring props assignment  react/destructuring-assignment
  177:16  error  Must use destructuring state assignment  react/destructuring-assignment
  178:17  error  Must use destructuring props assignment  react/destructuring-assignment
  189:12  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-table.js
  140:17  error  Must use destructuring props assignment                       react/destructuring-assignment
  141:19  error  Must use destructuring props assignment                       react/destructuring-assignment
  159:5   error  Must use destructuring props assignment                       react/destructuring-assignment
  163:19  error  Must use destructuring state assignment                       react/destructuring-assignment
  163:19  error  Use callback in setState when referencing the previous state  react/no-access-state-in-setstate
  163:42  error  Must use destructuring props assignment                       react/destructuring-assignment
  206:21  error  Must use destructuring props assignment                       react/destructuring-assignment
  207:34  error  Must use destructuring props assignment                       react/destructuring-assignment
  221:22  error  Must use destructuring state assignment                       react/destructuring-assignment
  221:73  error  Must use destructuring props assignment                       react/destructuring-assignment
  223:25  error  Must use destructuring state assignment                       react/destructuring-assignment
  224:43  error  Must use destructuring state assignment                       react/destructuring-assignment
  226:32  error  Must use destructuring props assignment                       react/destructuring-assignment
  247:19  error  Must use destructuring state assignment                       react/destructuring-assignment
  247:60  error  Must use destructuring state assignment                       react/destructuring-assignment
  249:9   error  Must use destructuring state assignment                       react/destructuring-assignment
  257:72  error  Must use destructuring props assignment                       react/destructuring-assignment
  262:41  error  Must use destructuring props assignment                       react/destructuring-assignment
  266:16  error  Must use destructuring props assignment                       react/destructuring-assignment
  266:36  error  Must use destructuring props assignment                       react/destructuring-assignment
  276:22  error  Must use destructuring props assignment                       react/destructuring-assignment
  283:33  error  Must use destructuring props assignment                       react/destructuring-assignment
  284:29  error  Must use destructuring props assignment                       react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details.js
   36:5   error  Must use destructuring props assignment  react/destructuring-assignment
   36:34  error  Must use destructuring props assignment  react/destructuring-assignment
   41:5   error  Must use destructuring props assignment  react/destructuring-assignment
   41:41  error  Must use destructuring props assignment  react/destructuring-assignment
   41:64  error  Must use destructuring props assignment  react/destructuring-assignment
   53:32  error  Must use destructuring props assignment  react/destructuring-assignment
   53:54  error  Must use destructuring props assignment  react/destructuring-assignment
   54:35  error  Must use destructuring props assignment  react/destructuring-assignment
   54:58  error  Must use destructuring props assignment  react/destructuring-assignment
   67:24  error  Must use destructuring props assignment  react/destructuring-assignment
   83:18  error  Must use destructuring props assignment  react/destructuring-assignment
   83:39  error  Must use destructuring props assignment  react/destructuring-assignment
   84:46  error  Must use destructuring props assignment  react/destructuring-assignment
   88:76  error  Must use destructuring props assignment  react/destructuring-assignment
  129:16  error  Must use destructuring props assignment  react/destructuring-assignment
  138:22  error  Must use destructuring props assignment  react/destructuring-assignment
  143:25  error  Must use destructuring props assignment  react/destructuring-assignment
  149:9   error  Must use destructuring props assignment  react/destructuring-assignment
  153:9   error  Must use destructuring props assignment  react/destructuring-assignment
  199:23  error  Must use destructuring props assignment  react/destructuring-assignment
  267:12  error  Must use destructuring props assignment  react/destructuring-assignment
  270:25  error  Must use destructuring props assignment  react/destructuring-assignment
  305:22  error  Must use destructuring props assignment  react/destructuring-assignment
  305:44  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/nodes-resources/node-resources-layer-topology.js
  16:36  error  Must use destructuring props assignment  react/destructuring-assignment
  20:10  error  Must use destructuring props assignment  react/destructuring-assignment
  26:12  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/nodes-resources/node-resources-metric-box-info.js
   9:9   error  Must use destructuring props assignment  react/destructuring-assignment
  41:53  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/nodes-resources/node-resources-metric-box.js
  70:19  error  Must use destructuring props assignment  react/destructuring-assignment
  72:5   error  Must use destructuring props assignment  react/destructuring-assignment
  73:7   error  Must use destructuring props assignment  react/destructuring-assignment
  74:7   error  Must use destructuring props assignment  react/destructuring-assignment
  76:7   error  Must use destructuring props assignment  react/destructuring-assignment
  91:16  error  Must use destructuring props assignment  react/destructuring-assignment
  92:15  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/nodes-resources.js
  24:9   error  Must use destructuring props assignment  react/destructuring-assignment
  25:7   error  Must use destructuring props assignment  react/destructuring-assignment
  30:12  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/overlay.js
  7:54  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/plugins.js
  39:24  error  Must use destructuring props assignment  react/destructuring-assignment
  39:46  error  Must use destructuring props assignment  react/destructuring-assignment
  45:24  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/search.js
   86:15  error  Must use destructuring props assignment  react/destructuring-assignment
   87:25  error  Must use destructuring props assignment  react/destructuring-assignment
   88:19  error  Must use destructuring props assignment  react/destructuring-assignment
   90:5   error  Must use destructuring props assignment  react/destructuring-assignment
  108:22  error  Must use destructuring props assignment  react/destructuring-assignment
  109:21  error  Must use destructuring props assignment  react/destructuring-assignment
  111:31  error  Must use destructuring props assignment  react/destructuring-assignment
  116:28  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/show-more.js
  11:5  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/sparkline.js
   31:32  error  Must use destructuring props assignment  react/destructuring-assignment
   34:27  error  Must use destructuring props assignment  react/destructuring-assignment
   35:19  error  Must use destructuring props assignment  react/destructuring-assignment
   52:21  error  Must use destructuring props assignment  react/destructuring-assignment
   52:50  error  Must use destructuring props assignment  react/destructuring-assignment
   53:20  error  Must use destructuring props assignment  react/destructuring-assignment
   53:48  error  Must use destructuring props assignment  react/destructuring-assignment
   64:22  error  Must use destructuring props assignment  react/destructuring-assignment
   64:53  error  Must use destructuring props assignment  react/destructuring-assignment
   65:22  error  Must use destructuring props assignment  react/destructuring-assignment
   66:18  error  Must use destructuring props assignment  react/destructuring-assignment
  103:21  error  Must use destructuring props assignment  react/destructuring-assignment
  103:40  error  Must use destructuring props assignment  react/destructuring-assignment
  104:25  error  Must use destructuring props assignment  react/destructuring-assignment
  105:9   error  Must use destructuring props assignment  react/destructuring-assignment
  106:9   error  Must use destructuring props assignment  react/destructuring-assignment
  107:25  error  Must use destructuring props assignment  react/destructuring-assignment
  107:51  error  Must use destructuring props assignment  react/destructuring-assignment
  109:20  error  Must use destructuring props assignment  react/destructuring-assignment
  109:47  error  Must use destructuring props assignment  react/destructuring-assignment
  110:25  error  Must use destructuring props assignment  react/destructuring-assignment
  111:36  error  Must use destructuring props assignment  react/destructuring-assignment
  116:21  error  Must use destructuring props assignment  react/destructuring-assignment
  116:47  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/terminal-app.js
  15:5   error  Must use destructuring props assignment  react/destructuring-assignment
  39:7   error  Must use destructuring props assignment  react/destructuring-assignment
  50:44  error  Must use destructuring state assignment  react/destructuring-assignment
  54:10  error  Must use destructuring props assignment  react/destructuring-assignment
  56:17  error  Must use destructuring props assignment  react/destructuring-assignment
  57:26  error  Must use destructuring state assignment  react/destructuring-assignment
  58:27  error  Must use destructuring state assignment  react/destructuring-assignment
  59:18  error  Must use destructuring state assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/terminal.js
   83:37  error  Must use destructuring props assignment  react/destructuring-assignment
  100:29  error  Must use destructuring state assignment  react/destructuring-assignment
  106:24  error  Must use destructuring props assignment  react/destructuring-assignment
  132:9   error  Must use destructuring props assignment  react/destructuring-assignment
  137:7   error  Must use destructuring props assignment  react/destructuring-assignment
  143:9   error  Must use destructuring props assignment  react/destructuring-assignment
  151:20  error  Must use destructuring props assignment  react/destructuring-assignment
  175:32  error  Must use destructuring props assignment  react/destructuring-assignment
  208:10  error  Must use destructuring state assignment  react/destructuring-assignment
  227:5   error  Must use destructuring props assignment  react/destructuring-assignment
  233:5   error  Must use destructuring props assignment  react/destructuring-assignment
  245:13  error  Must use destructuring props assignment  react/destructuring-assignment
  249:12  error  Must use destructuring props assignment  react/destructuring-assignment
  253:22  error  Must use destructuring props assignment  react/destructuring-assignment
  255:9   error  Must use destructuring state assignment  react/destructuring-assignment
  255:35  error  Must use destructuring state assignment  react/destructuring-assignment
  259:19  error  Must use destructuring props assignment  react/destructuring-assignment
  284:10  error  Must use destructuring state assignment  react/destructuring-assignment
  297:24  error  Must use destructuring props assignment  react/destructuring-assignment
  298:16  error  Must use destructuring state assignment  react/destructuring-assignment
  317:16  error  Must use destructuring state assignment  react/destructuring-assignment
  321:29  error  Must use destructuring state assignment  react/destructuring-assignment
  334:18  error  Must use destructuring props assignment  react/destructuring-assignment
  334:46  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/time-control.js
  19:15  error  Must use destructuring props assignment  react/destructuring-assignment
  28:5   error  Must use destructuring props assignment  react/destructuring-assignment
  33:5   error  Must use destructuring props assignment  react/destructuring-assignment
  43:9   error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/time-travel-wrapper.js
  10:7   error  Must use destructuring props assignment  react/destructuring-assignment
  12:7   error  Must use destructuring props assignment  react/destructuring-assignment
  20:20  error  Must use destructuring props assignment  react/destructuring-assignment
  21:22  error  Must use destructuring props assignment  react/destructuring-assignment
  22:28  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/tooltip.js
  8:35  error  Must use destructuring props assignment  react/destructuring-assignment
  9:10  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/topologies.js
  29:5   error  Must use destructuring props assignment  react/destructuring-assignment
  34:38  error  Must use destructuring props assignment  react/destructuring-assignment
  35:30  error  Must use destructuring props assignment  react/destructuring-assignment
  40:39  error  Must use destructuring props assignment  react/destructuring-assignment
  59:35  error  Must use destructuring props assignment  react/destructuring-assignment
  60:30  error  Must use destructuring props assignment  react/destructuring-assignment
  64:40  error  Must use destructuring props assignment  react/destructuring-assignment
  90:10  error  Must use destructuring props assignment  react/destructuring-assignment
  90:40  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/topology-option-action.js
  12:5  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/topology-options.js
  23:15  error  Must use destructuring props assignment  react/destructuring-assignment
  25:25  error  Must use destructuring props assignment  react/destructuring-assignment
  26:19  error  Must use destructuring props assignment  react/destructuring-assignment
  64:5   error  Must use destructuring props assignment  react/destructuring-assignment
  70:5   error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/troubleshooting-menu.js
  20:5   error  Must use destructuring props assignment        react/destructuring-assignment
  50:15  error  Missing an explicit type attribute for button  react/button-has-type
  52:26  error  Must use destructuring props assignment        react/destructuring-assignment
  61:15  error  Missing an explicit type attribute for button  react/button-has-type
  86:26  error  Must use destructuring props assignment        react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/view-mode-button.js
  17:15  error  Must use destructuring props assignment  react/destructuring-assignment
  18:25  error  Must use destructuring props assignment  react/destructuring-assignment
  19:19  error  Must use destructuring props assignment  react/destructuring-assignment
  21:5   error  Must use destructuring props assignment  react/destructuring-assignment
  27:25  error  Must use destructuring props assignment  react/destructuring-assignment
  38:23  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/view-mode-selector.js
  34:22  error  Must use destructuring props assignment  react/destructuring-assignment
  40:22  error  Must use destructuring props assignment  react/destructuring-assignment
  46:22  error  Must use destructuring props assignment  react/destructuring-assignment
  47:24  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/warning.js
  15:23  error  Must use destructuring state assignment                       react/destructuring-assignment
  15:23  error  Use callback in setState when referencing the previous state  react/no-access-state-in-setstate

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/zoom-control.js
  33:5   error  Must use destructuring props assignment        react/destructuring-assignment
  37:5   error  Must use destructuring props assignment        react/destructuring-assignment
  41:5   error  Must use destructuring props assignment        react/destructuring-assignment
  46:26  error  Must use destructuring props assignment        react/destructuring-assignment
  59:9   error  Missing an explicit type attribute for button  react/button-has-type
  63:9   error  Missing an explicit type attribute for button  react/button-has-type

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/zoomable-canvas.js
   79:50  error  Must use destructuring props assignment  react/destructuring-assignment
  105:57  error  Must use destructuring state assignment  react/destructuring-assignment
  109:45  error  Must use destructuring state assignment  react/destructuring-assignment
  113:57  error  Must use destructuring props assignment  react/destructuring-assignment
  116:14  error  Must use destructuring props assignment  react/destructuring-assignment
  122:21  error  Must use destructuring state assignment  react/destructuring-assignment
  123:21  error  Must use destructuring state assignment  react/destructuring-assignment
  124:18  error  Must use destructuring state assignment  react/destructuring-assignment
  135:15  error  Must use destructuring props assignment  react/destructuring-assignment
  136:15  error  Must use destructuring props assignment  react/destructuring-assignment
  142:5   error  Must use destructuring props assignment  react/destructuring-assignment
  179:19  error  Must use destructuring state assignment  react/destructuring-assignment
  180:19  error  Must use destructuring state assignment  react/destructuring-assignment
  248:26  error  Must use destructuring state assignment  react/destructuring-assignment
  249:26  error  Must use destructuring state assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/hoc/metric-feeder.js
   67:9   error  Must use destructuring state assignment  react/destructuring-assignment
   68:44  error  Must use destructuring state assignment  react/destructuring-assignment
   73:40  error  Must use destructuring state assignment  react/destructuring-assignment
   80:11  error  Must use destructuring state assignment  react/destructuring-assignment
   83:11  error  Must use destructuring state assignment  react/destructuring-assignment
  138:39  error  Must use destructuring state assignment  react/destructuring-assignment
  139:38  error  Must use destructuring state assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/selectors/resource-view/layout.js
  88:1  error  This line has a length of 106. Maximum allowed is 100  max-len

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/utils/array-utils.js
  10:1  error  This line has a length of 101. Maximum allowed is 100  max-len

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/utils/delayed-show.js
  13:9   error  Must use destructuring props assignment  react/destructuring-assignment
  23:28  error  Must use destructuring props assignment  react/destructuring-assignment
  36:72  error  Must use destructuring props assignment  react/destructuring-assignment

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/utils/router-utils.js
  8:1  error  Dependency cycle detected  import/no-cycle

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/utils/web-api-utils.js
  6:1  error  Dependency cycle detected  import/no-cycle

@dholbach dholbach requested a review from fbarl July 1, 2019 07:59
@foot
Copy link
Contributor

foot commented Jul 1, 2019

This might help if we wanna keep scope fresh w/ latest eslint. Otherwise we could disable those rules..

https://github.com/thibaudcolas/react-destructuring-assignment-codemod/blob/master/README.md

@dholbach
Copy link
Contributor Author

dholbach commented Jul 1, 2019

@fbarl what do you think?

@foot
Copy link
Contributor

foot commented Jul 1, 2019

Some icky cases for us:

  • actions w/ the same name as a prop (destructured prop shadows mod level action).
  • destructuring nextProps already instead of props
  • overzeleaous destructuring:
   handleMouseEnter(ev) {
-    this.props.enterEdge(decodeIdAttribute(ev.currentTarget.id));
+    const { enterEdge } = this.props;
+    enterEdge(decodeIdAttribute(ev.currentTarget.id));
   }

I think disabling is okay really.

dholbach pushed a commit that referenced this pull request Jul 1, 2019
@dholbach
Copy link
Contributor Author

dholbach commented Jul 1, 2019

The new list of lint problems is:

$ eslint app server.js && stylelint app/scripts && sass-lint -v

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/actions/app-actions.js
  6:1  error  Dependency cycle detected  import/no-cycle
  7:1  error  Dependency cycle detected  import/no-cycle

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/charts/nodes-grid.js
    1:1  error  Definition for rule 'no-multi-comp' was not found      no-multi-comp
  131:1  error  This line has a length of 101. Maximum allowed is 100  max-len

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/cloud-feature.js
  30:3  error  Prop type `object` is forbidden  react/forbid-prop-types
  31:3  error  Prop type `object` is forbidden  react/forbid-prop-types
  32:3  error  Prop type `object` is forbidden  react/forbid-prop-types
  36:3  error  Prop type `object` is forbidden  react/forbid-prop-types
  37:3  error  Prop type `object` is forbidden  react/forbid-prop-types

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/debug-toolbar.js
  161:20  error  Use callback in setState when referencing the previous state  react/no-access-state-in-setstate
  288:11  error  Missing an explicit type attribute for button                 react/button-has-type
  289:11  error  Missing an explicit type attribute for button                 react/button-has-type
  291:11  error  Missing an explicit type attribute for button                 react/button-has-type
  292:11  error  Missing an explicit type attribute for button                 react/button-has-type
  293:11  error  Missing an explicit type attribute for button                 react/button-has-type
  296:11  error  Missing an explicit type attribute for button                 react/button-has-type
  297:11  error  Missing an explicit type attribute for button                 react/button-has-type
  298:11  error  Missing an explicit type attribute for button                 react/button-has-type
  299:11  error  Missing an explicit type attribute for button                 react/button-has-type
  304:11  error  Missing an explicit type attribute for button                 react/button-has-type
  305:11  error  Missing an explicit type attribute for button                 react/button-has-type
  306:11  error  Missing an explicit type attribute for button                 react/button-has-type
  307:11  error  Missing an explicit type attribute for button                 react/button-has-type
  308:11  error  Missing an explicit type attribute for button                 react/button-has-type
  313:11  error  Missing an explicit type attribute for button                 react/button-has-type
  347:11  error  Missing an explicit type attribute for button                 react/button-has-type
  348:11  error  Missing an explicit type attribute for button                 react/button-has-type
  353:11  error  Missing an explicit type attribute for button                 react/button-has-type
  354:11  error  Missing an explicit type attribute for button                 react/button-has-type

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/footer.js
  70:11  error  Missing an explicit type attribute for button  react/button-has-type
  76:11  error  Missing an explicit type attribute for button  react/button-has-type
  79:11  error  Missing an explicit type attribute for button  react/button-has-type
  87:11  error  Missing an explicit type attribute for button  react/button-has-type

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/help-panel.js
  61:5   error  Expected closing tag to match indentation of opening     react/jsx-closing-tag-location
  77:5   error  Expected closing tag to match indentation of opening     react/jsx-closing-tag-location
  89:12  error  Expected indentation of 4 space characters but found 11  react/jsx-indent
  97:12  error  Expected indentation of 4 space characters but found 11  react/jsx-indent

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/__tests__/node-details-table-test.js
  73:1  error  This line has a length of 101. Maximum allowed is 100  max-len

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-generic-table.js
  50:14  error  Use callback in setState when referencing the previous state  react/no-access-state-in-setstate
  65:1   error  This line has a length of 142. Maximum allowed is 100         max-len

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-health.js
  16:23  error  Use callback in setState when referencing the previous state  react/no-access-state-in-setstate

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-info.js
  20:23  error  Use callback in setState when referencing the previous state  react/no-access-state-in-setstate

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-property-list.js
  31:19  error  Use callback in setState when referencing the previous state  react/no-access-state-in-setstate

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-relatives.js
  18:19  error  Use callback in setState when referencing the previous state  react/no-access-state-in-setstate

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-table-headers.js
  36:1  error  This line has a length of 108. Maximum allowed is 100  max-len

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-table-node-link.js
  6:1  error  Dependency cycle detected  import/no-cycle

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-table-node-metric-link.js
  6:1  error  Dependency cycle detected  import/no-cycle

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-table-row.js
  7:1  error  Dependency cycle detected  import/no-cycle
  8:1  error  Dependency cycle detected  import/no-cycle

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-table.js
  163:19  error  Use callback in setState when referencing the previous state  react/no-access-state-in-setstate

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/troubleshooting-menu.js
  50:15  error  Missing an explicit type attribute for button  react/button-has-type
  61:15  error  Missing an explicit type attribute for button  react/button-has-type

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/warning.js
  15:23  error  Use callback in setState when referencing the previous state  react/no-access-state-in-setstate

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/zoom-control.js
  59:9  error  Missing an explicit type attribute for button  react/button-has-type
  63:9  error  Missing an explicit type attribute for button  react/button-has-type

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/selectors/resource-view/layout.js
  88:1  error  This line has a length of 106. Maximum allowed is 100  max-len

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/utils/array-utils.js
  10:1  error  This line has a length of 101. Maximum allowed is 100  max-len

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/utils/router-utils.js
  8:1  error  Dependency cycle detected  import/no-cycle

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/utils/web-api-utils.js
  6:1  error  Dependency cycle detected  import/no-cycle

✖ 59 problems (59 errors, 0 warnings)
  4 errors and 0 warnings potentially fixable with the `--fix` option.

Copy link
Contributor

@fbarl fbarl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some more comments to the PR.

Good job so far on reducing the list of errors - at some point soon I think it would be best to start addressing them manually!

</i>
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of this autofixed HTML content has very weird indentation now - I wonder if there's a nicer way to represent it that is still acceptable for the linter..

client/package.json Outdated Show resolved Hide resolved
return BLURRED_EDGES_LAYER;
} else if (edge.get('highlighted')) {
} if (edge.get('highlighted')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally find this rule rather confusing (if being the same as else if only because of the return statements feels like an extra cognitive load), but I think I'd be able to live with it :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd put the if on the next line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was done by eslint using the --fix option.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was basically ef44eb3 - let me know if you'd prefer me to revert this and we either

  • figure out if we want to fix our code to comply with new eslint rules
  • or ignore some of those new rules

@@ -31,6 +31,7 @@
"no-param-reassign": 0,
"no-restricted-properties": 0,
"object-curly-spacing": 0,
"react/destructuring-assignment": 0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@dholbach
Copy link
Contributor Author

dholbach commented Jul 3, 2019

@fbarl and @foot Thanks for the reviews so far.

I set up this Draft PR, so we can collectively fix this. I want to get the security issues resolved, but I won't have time to dive deep enough into this to actually have an opinion on JavaScript indentation. This is what I could fix easily. The rest will have to be done by somebody else If fear.

@fbarl fbarl self-assigned this Jul 9, 2019
dholbach pushed a commit that referenced this pull request Jul 18, 2019
@dholbach
Copy link
Contributor Author

dholbach commented Aug 1, 2019

Almost there:

$ eslint app server.js && stylelint app/scripts && sass-lint -v

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/actions/app-actions.js
  6:1  error  Dependency cycle detected  import/no-cycle
  7:1  error  Dependency cycle detected  import/no-cycle

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-table-node-link.js
  6:1  error  Dependency cycle detected  import/no-cycle

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-table-node-metric-link.js
  6:1  error  Dependency cycle detected  import/no-cycle

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/components/node-details/node-details-table-row.js
  7:1  error  Dependency cycle detected  import/no-cycle
  8:1  error  Dependency cycle detected  import/no-cycle

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/utils/router-utils.js
  8:1  error  Dependency cycle detected  import/no-cycle

/home/daniel/go/src/github.com/weaveworks/scope/client/app/scripts/utils/web-api-utils.js
  6:1  error  Dependency cycle detected  import/no-cycle

✖ 8 problems (8 errors, 0 warnings)

@dholbach dholbach marked this pull request as ready for review August 1, 2019 14:47
@dholbach dholbach requested a review from qiell as a code owner August 1, 2019 14:47
@dholbach
Copy link
Contributor Author

dholbach commented Aug 2, 2019

ERROR in ./app/scripts/actions/app-actions.js
Module build failed: Module failed because of a eslint error.

/home/weave/scope/client/app/scripts/actions/app-actions.js
  6:1  error  Dependency cycle detected  import/no-cycle
  7:1  error  Dependency cycle detected  import/no-cycle

✖ 2 problems (2 errors, 0 warnings)

 @ ./app/scripts/components/terminal-app.js 14:18-51
 @ ./app/scripts/terminal-main.js

ERROR in ./app/scripts/utils/router-utils.js
Module build failed: Module failed because of a eslint error.

/home/weave/scope/client/app/scripts/utils/router-utils.js
  8:1  error  Dependency cycle detected  import/no-cycle

✖ 1 problem (1 error, 0 warnings)

 @ ./app/scripts/components/app.js 64:19-51
 @ ./app/scripts/main.js

ERROR in ./app/scripts/utils/web-api-utils.js
Module build failed: Module failed because of a eslint error.

/home/weave/scope/client/app/scripts/utils/web-api-utils.js
  6:1  error  Dependency cycle detected  import/no-cycle

✖ 1 problem (1 error, 0 warnings)

 @ ./app/scripts/components/app.js 46:19-52
 @ ./app/scripts/main.js

@fbarl
Copy link
Contributor

fbarl commented Aug 2, 2019

I just addressed all the remaining eslint errors, resolving dependency cycles took by far the most time - that was especially the case between action and request methods which cross-call each other a lot so we sometimes end up in potentially long chains action -> request -> action -> request... I've put all of those mixed methods into a new file request-actions.js and put a comment there in how we might go into refactoring them further.

I'd suggest to test only the behavior when reviewing this PR as the code change mostly consists of functions that moved around.

@fbarl fbarl requested a review from foot August 2, 2019 18:09
@dholbach
Copy link
Contributor Author

dholbach commented Aug 5, 2019

Ready for review now.

@dholbach
Copy link
Contributor Author

Since @fbarl and I worked on this, we both tested it and the warnings in the browser console look OK, we'll go ahead and merge it.

@fbarl fbarl merged commit c8c8dac into master Aug 12, 2019
@fbarl fbarl deleted the security-updates branch August 12, 2019 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants