import-sort-style-module-scoped
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

import-sort-style-module

A style for import-sort that is focused on modules but with scope support.

// Absolute modules with side effects (not sorted because order may matter)
import "a";
import "c";
import "b";

// Relative modules with side effects (not sorted because order may matter)
import "./a";
import "./c";
import "./b";

// Modules from the Node.js "standard" library sorted by name
import {readFile, writeFile} from "fs";
import * as path from "path";

// Third-party modules sorted by name
import aa from "aa";
import bb from "bb";
import cc from "cc";

// Scoped modules
import aa from "@myScope/aa";
import bb from "@myScope/bb";
import cc from "@yourScope/cc";

// First-party modules sorted by "relative depth" and then by name
import aaa from "../../aaa";
import bbb from "../../bbb";
import aaaa from "../aaaa";
import bbbb from "../bbbb";
import aaaaa from "./aaaaa";
import bbbbb from "./bbbbb";

Dependencies (1)

Dev Dependencies (8)

Package Sidebar

Install

npm i import-sort-style-module-scoped

Weekly Downloads

838

Version

1.0.3

License

ISC

Last publish

Collaborators

  • cliffkoh