flame icon indicating copy to clipboard operation
flame copied to clipboard

eslint-ordering configuration updated

Open xdrdak opened this issue 5 years ago • 2 comments

Description

we should be using ["builtin", "external", "internal", "parent", "sibling", "index"] instead of the airbnb defaults as the current setup is a bit too loose in how to order imports.

We will need to:

  • add 'import/order': ['error', { groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'] }] to the .eslintrc.js rules object
  • fix any potential errors that will arise (just run yarn lint --fix)

xdrdak avatar Jun 08 '20 21:06 xdrdak

I would also add in internal before parent for path aliased imports. From the eslint-plugin-import docs:

  1. "internal" modules // (if you have configured your path or webpack to handle your internal paths differently)

Updated issue description accordingly.

glambert avatar Jun 09 '20 02:06 glambert

I was also thinking about using newlines-between option set as always for readability, what do you think?

glambert avatar Jun 09 '20 02:06 glambert