import-blacklist-extended
v2.0.2
Published
TSLint rule extending basic "import-blacklist" functionality to support relative paths
Downloads
16
Maintainers
Readme
Import blacklist extended
This is a simple TSLint rule that extends functionality of the original import-blacklist
.
Installation
npm install --save-dev import-blacklist-extended
Edit your global tslint.json
and add the following:
{
"extends": [
"import-blacklist-extended"
]
}
Usage
Configure the rule in chosen tslint.json
files:
{
"rules": {
"import-blacklist-extended": [
true,
{
"tsLintDirectory": "path/to/tslint/directory",
"imports": [
"@some-scope/path",
"./relative/path"
]
}
]
}
}
tsLintDirectory
- is a path from root to the dicrectory wheretslint.json
file is placed. The rule will work for each*.ts
file inside selected folder and its subfolders.imports
- an array of blacklisted paths. It supportstsconfig's
and relative paths (they are relative to thetsLintDirectory
).