Skip to content

kkuriata/import-blacklist-extended

Repository files navigation

Build Status

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 where tslint.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 supports tsconfig's and relative paths (they are relative to the tsLintDirectory).

About

Extended version of "import-blacklist" TSLint rule

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published