Big News: Socket Selected for OpenAI's Cybersecurity Grant Program.Details
Socket
Book a DemoSign in
Socket

tslint-blank-lines-after-imports

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tslint-blank-lines-after-imports

Ensure number of blank lines after all import statements.

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

TSLint Blank Lines After Imports Rule

Ensure number of blank lines after all import statements.

Usage

npm i -D tslint-origin-ordered-imports-rule

Configuration

"rules": {
  "blank-lines-after-imports": [true]
}

Wrong:

import MyClass from './my-class';
import * as _ from 'lodash';
class YourClass {}

Right:

import MyClass from './my-class';
import * as _ from 'lodash';
...
class YourClass {}

Additional parameter allows to configure number of required blank lines:

"rules": {
  "blank-lines-after-imports": [true, 2]
}

Wrong:

import MyClass from './my-class';
import * as _ from 'lodash';
class YourClass {}

Right:

import MyClass from './my-class';
import * as _ from 'lodash';
...
...
class YourClass {}

Testing

To test the rule just run:

npm run test

Licensing

The code in this project is licensed under MIT license.

Keywords

tslint

FAQs

Package last updated on 31 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts