studio-206 / frontend-template

Our main web app template using Nextjs, Typescript and Tailwind.
MIT License
2 stars 1 forks source link

Add `eslint-plugin-import` #8

Closed karltaylor closed 2 years ago

karltaylor commented 2 years ago

Add eslint-plugin-import to help clean up imports

https://github.com/import-js/eslint-plugin-import

Config for Sen but can be adapted to be generic

"import/order": [
      "error",
      {
        "groups": ["external", "index"],
        "pathGroups": [
          {
            "pattern": "src/components/**/*",
            "group": "internal"
          },
          {
            "pattern": "src/core/**/*",
            "group": "external",
            "position": "after"
          }
        ],
        "newlines-between": "always"
      }
    ]
karltaylor commented 2 years ago

I've actually started to dislike this 🙃