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

eslint-ordering configuration updated #91

Open
xdrdak opened this issue Jun 8, 2020 · 2 comments
Open

eslint-ordering configuration updated #91

xdrdak opened this issue Jun 8, 2020 · 2 comments

Comments

@xdrdak
Copy link
Contributor

xdrdak commented Jun 8, 2020

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 xdrdak mentioned this issue Jun 8, 2020
4 tasks
@glambert
Copy link
Collaborator

glambert commented Jun 9, 2020

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
Copy link
Collaborator

glambert commented Jun 9, 2020

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

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

No branches or pull requests

2 participants