0.0.5 • Published 7 years ago

import-sort-style-module-relative-aliases v0.0.5

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

import-sort-style-module

A style for import-sort that is focused on modules. It intents to receive additional configuration to support relative aliases whitelist (for example, to use with Webpack). So far it isn't possible to receive configuration (help wanted), and for now it just has a common set of React aliases, as following:

  • "actions/"
  • "components/"
  • "constants/"
  • "containers/"
  • "decorators/"
  • "hocs/"
  • "layouts/"
  • "middlewares/"
  • "reducers/"
  • "selectors/"
  • "services/"
  • "style/"
  • "stores/"
  • "utils/"
// 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";

// 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";
0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago