SoominHan / import-sorter

MIT License
89 stars 28 forks source link

How to custom order an absolute import #91

Open barrymichaeldoyle opened 2 years ago

barrymichaeldoyle commented 2 years ago

I have the following:

import { Box, ScrollView, useColorModeValue, View } from "native-base";
import React, { FC } from "react";

import ErrorBoundary from "shared/components/ErrorBoundary";
import Footer from "shared/components/site/Footer";
import Navigation from "shared/components/site/Navigation";

import SomethingElse from "./something";

This is the desired final outcome but whenever I sort it I end up with this:

import { Box, ScrollView, useColorModeValue, View } from "native-base";
import React, { FC } from "react";
import ErrorBoundary from "shared/components/ErrorBoundary";
import Footer from "shared/components/site/Footer";
import Navigation from "shared/components/site/Navigation";

import SomethingElse from "./something"

What custom sorting rule can I use to resolve this undesirable outcome?