Skip to content
TSLint plugin to detect and warn about circular imports
TypeScript
Branch: master
Clone or download
bcherny Merge pull request #41 from ajmas/issue-40-documentation-update
Fixes #40 Document how to display as warning
Latest commit 792980c Dec 21, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode 🌅 Nov 15, 2016
test Added search-depth-limit parameter Aug 20, 2018
.gitignore cleanup Nov 15, 2016
.npmignore 🌅 Nov 15, 2016
CHANGELOG.md add changelog (fix #16) Sep 10, 2018
LICENSE.md 🌅 Nov 15, 2016
README.md Fixes #40 Document how to display as warning Dec 21, 2019
circle.yml
noCircularImportsRule.ts
package.json v0.6.2 Mar 2, 2019
tsconfig.json Improve performance by quickly checking first for any cycle Jun 8, 2018
tsconfig.test.json 🌅 Nov 15, 2016
tslint-no-circular-imports.json simplify usage, better error message Nov 15, 2016
tslint.json add tslint.json Aug 21, 2018
yarn.lock upgrade deps Mar 2, 2019

README.md

tslint-no-circular-imports Build Status npm mit

TSLint plugin to detect and warn about circular imports

Installation

# Using Yarn:
yarn add --dev tslint-no-circular-imports

# Or, using NPM:
npm install --save-dev tslint-no-circular-imports

Usage

Add the following to your tslint.json:

{
  "extends": ["tslint-no-circular-imports"]
}

Run TSLint:

$ tslint .
Circular import detected: foo.ts -> bar.ts -> foo.ts
Circular import detected: baz.ts -> bar.ts -> baz.ts

Note, if you wish to have circular references reported as a warning, rather than as an error, then add this to your tslint.json:

{
  "rules": {
    "no-circular-imports": { "severity": "warn" }
  }
}

Running the tests

npm test

License

MIT

You can’t perform that action at this time.