bcherny / tslint-no-circular-imports

TSLint plugin to detect and warn about circular imports
MIT License
86 stars 12 forks source link

Warning about type information #15

Open valentinbdv opened 6 years ago

valentinbdv commented 6 years ago

Hi,

I really need that package for my project so I am really glad I found it here!

But I have a problem, when I run $ tslint -c tslint.json 'src/**/*.ts' I get this error : Warning: The 'no-circular-imports' rule requires type information.

Here are my versions :

"tslint": "^5.10.0",
"tslint-no-circular-imports": "^0.4.0"

Thanks for the help

njgraf512 commented 6 years ago

@valentinbdv from tslint --help:

    -p, --project:
        The path or directory containing a tsconfig.json file that will be
        used to determine which files will be linted. This flag also enables
        rules that require the type checker.

So when running your tslint command, include flag -p <path/to/your/tsconfig.json>, and you should be set.

tomitrescak commented 5 years ago

Hmm, vscode complains about the same thing ... any way to make it run in vscode ?

yyynnn commented 5 years ago

yeah same here in vscode output The 'no-circular-imports' rule requires type information

alexburner commented 5 years ago

@tomitrescak @yyynnn likely due to this issue with vscode-tslint: https://github.com/Microsoft/vscode-tslint/blob/master/tslint/README.md#how-can-i-use-tslint-rules-that-require-type-information