Open saadq opened 6 years ago
Yea i was wondering about that option and know kinda understand what is about, so consider to rename it? Might make more sense to be such as tsroot
, typescript-root
, tsconfig-root
or whatever.. don't know exactly.
Those might be more explicit, but I want to keep the name project
because it will be familiar to TSLint users. The flag for giving a path to your tsconfig.json
with TSLint is also called --project
https://palantir.github.io/tslint/usage/cli/#cli-usage
The current API docs: https://github.com/saadq/lynt#api
There should be an example that shows how
project
works with the TypeScript flag. By default, if noproject
flag is passed and thefiles
argument is an empty array,lynt
will assume thatproject
is in the current working directory.
and will look for atsconfig.json
there.A
project
option can be explicitly passed iftsconfig.json
isn't in the current directory (like in./config/tsconfig.json
):If
files
are given, aproject
flag should not be passed in (because it will just ignore thefiles
and just use the tsconfig in theproject
to know which files to lint). However, passingfiles
when using thetypescript
option will make you opt-out of some lint rules that require type information from the whole project, so passing infiles
is not recommended.