tomshanley / d3-sankey-circular

A fork of the d3-sankey library to allow circular links.
MIT License
89 stars 41 forks source link

add eslint #21

Closed micahstubbs closed 6 years ago

micahstubbs commented 6 years ago

I'd like to experiment with adding eslint to help catch errors https://eslint.org/docs/about/

I'll give this a go and send a PR if I succeed 😄

tomshanley commented 6 years ago

Most excellent!

micahstubbs commented 6 years ago

here's the initial output from

npm run lint:fix
/Users/m/workspace/d3-sankey-circular/src/sankeyCircular.js
   484:42  error  'i' is defined but never used                     no-unused-vars
   491:83  error  Empty block statement                             no-empty
   499:21  error  'nodeHeight' is already defined                   no-redeclare
   830:9   error  'topLinks' is assigned a value but never used     no-unused-vars
   835:9   error  'bottomLinks' is assigned a value but never used  no-unused-vars
   967:9   error  'pathData' is assigned a value but never used     no-unused-vars
  1281:21  error  'dy' is already defined                           no-redeclare
  1300:21  error  'dy' is already defined                           no-redeclare
micahstubbs commented 6 years ago

🎉