Skip to content

Add option to ignore sorting for a single import line. #383

Description

@paul23-git

Is your feature request related to a problem?
Sometimes a single import should be at a specific location, but all other imports an be sorted as needed, however this cannot be done currently.

IE:


import type { CodingTemplate as CodingTemplateType } from "invoice/codingtemplate/stores/codingTemplateStore";

import { envType } from "platform/stores/rootStore";

export const SourceCodingTemplate = types.late<typeof CodingTemplateType>(
  () => {
    return (CodingTemplate as any).named("SourceCodingTemplate");
  },
);

// this import is lazily loaded after SourceCodingTemplate
// to break circular dependencies
// sort-imports-ignore
import { CodingTemplate } from "invoice/codingtemplate/stores/codingTemplateStore";

Describe the solution you'd like
// sort-imports-ignore or maybe a specific // sort-imports-ignore-next-line should only ignore the next line for import sorting.

Describe alternatives you've considered
putting the sort-imports-ignore at top is a work around, but still gives the need to manually sort EVERYTHING in the file.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions