1.0.3 • Published 5 years ago

tslint-customization v1.0.3

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

TSLint Customization

There is some customization lint that does not exist this world currently.

这里是当前世界不存在的一些自定义lint。

Usage

Install

npm i tslint-customization --save-dev

or

yarn add tslint-customization -D

To use these lint rules with the default preset, use configuration inheritance via the extends keyword. Here's a sample configuration where tslint.json lives adjacent to your node_modules folder,

{
      "extends": ["tslint-customization"],
}

or you can customize your rules,

{
  "rulesDirectory": [
    "node_modules/tslint-customization/rules"
  ],
  "rules": {
    "import-regular-blank-list": [true, ".jpg", /(\.helloworld){1}/]
  }
  
}

Rules

import-regular-blank-list

By regular expression lint import file. The expression can be string or instance of RegExp. Eg,

{
	"rules": {
    	"import-regular-blank-list": [true, ".jpg", /(\.helloworld){1}/]
 	 }
}

It will disallow

import 'hello.jpg'
import 'demo.helloworld'
1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago