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 sort imports #1

Open
nirtamir2 opened this issue Nov 25, 2020 · 1 comment
Open

ESLint sort imports #1

nirtamir2 opened this issue Nov 25, 2020 · 1 comment

Comments

@nirtamir2
Copy link
Owner

nirtamir2 commented Nov 25, 2020

// This won't clash with import/order and will order imports inside the {}.
sort-imports: ["error", { ignoreDeclarationSort: true }],
"import/order": [
      "warn",
      {
        groups: [
          ["builtin", "external"],
          "internal",
          ["parent", "index", "sibling"],
        ],
        pathGroups: [
          // replace @projectName with your project name
          {
            pattern: "@projectName/**",
            group: "external",
            position: "after",
          },
          {
            pattern: "*.svg",
            patternOptions: {
              dot: true,
              nocomment: true,
              matchBase: true,
            },
            group: "sibling",
            position: "after",
          },
        ],
        pathGroupsExcludedImportTypes: ["builtin"],
        "newlines-between": "always",
        alphabetize: {
          order: "asc",
        },
      },
    ]
@nirtamir2
Copy link
Owner Author

Maybe add another config file named sort imports for people that like to sort imports with eslint.
Include eslint-plugin-sort-export-all and matybe eslint-plugin-simple-import-sort

Repository owner deleted a comment Jan 2, 2024
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

1 participant