JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 88
  • Score
    100M100P100Q66939F
  • License ISC

TSLint rules to check multiline imports

Package Exports

  • multiline-import

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (multiline-import) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

tslint-multi-line-import

Setup

npm i multiline-import

Than add multiline-import to your rulesDirectory in tslint.config, for example, path to package inside node_modules. On the other hand you can copy rule to your custom directory.

{
  ...
  "rulesDirectory": ["./node_modules/multiline-import/dist"],
  ...
}

Usage

"multiline-import": true // 2 named imports is default

Correct:

import {a} from 'test';


import {
  a,
  b,
} from 'test';


import * as Kek from 'test';

Incorrect:

import {
  a
} from 'test'


import { a,
  b
} from 'test';

Custom imports number:

"multiline-import": [true, 3] // default is 2