reactioncommerce / reaction

Mailchimp Open Commerce is an API-first, headless commerce platform built using Node.js, React, GraphQL. Deployed via Docker and Kubernetes.
https://mailchimp.com/developer/open-commerce/
GNU General Public License v3.0
12.34k stars 2.17k forks source link

Enable and fix eslint rules (10) #3612

Closed aldeed closed 6 years ago

aldeed commented 6 years ago
  1. Add the following rule in .eslintrc in the "rules" object.
  2. Run npm run lint, and fix all errors manually by choosing better variable names
    • For _, import the used lodash functions directly instead of using _, or if using _ is best in a file, disable the rule for just that import line.
"id-length": "error"
mikemurray commented 6 years ago

I think we also have a babel plugin for lodash that we should probably remove as well.

spencern commented 6 years ago

@aldeed I think we should consider adding this to our next UI repo and probably to our component library, but perhaps it's not worth the refactor for our current Meteor based UI.

aldeed commented 6 years ago

@spencern Agree. There are a couple more I want to enable because I've been pointing things out in review that eslint could be catching. I'll make an issue in the eslint repo for adding this plus those.

aldeed commented 6 years ago

Replaced by https://github.com/reactioncommerce/reaction-eslint-config/issues/1