1.1.0 • Published 5 years ago

import-sort-style-eslint-typescript-hero v1.1.0

Weekly downloads
289
License
MIT
Repository
github
Last release
5 years ago

import-sort-style-eslint-typescript-hero

A style for import-sort that mimics import-sort and typescript-hero sorting applied one after another with default settings.

import 'a';
import 'b';
import 'c';

import { ArgumentsHost } from '@nestjs/common';
import { GqlArgumentsHost } from '@nestjs/graphql';

import * as aa from 'aa';
import aaa, { bbb } from 'aaa';
import aaaa from 'aaaa';
import * as bb from 'bb';
import { bbbb } from 'bbbb';
import { ccc, ddd } from 'ccc';
import * as fff from 'eee';

import * as dd from '../dd';
import * as ff from '../ff';
import * as cc from './cc';
import * as ee from './ee';

Installation

  • Run npm install -g import-sort-style-eslint-typescript-hero
  • Create a .importsortrc file
    {
      ".ts": {
        "style": "/{global_node_modules_path}/import-sort-style-eslint-typescript-hero",
        "options": {
          "tsHeroGroupsConfig": [
            "/request-context/",
            "Plains",
            "/@nestjs/",
            "Modules",
            "Workspace"
          ]
        }
      }
    }