Sergino
Sergino

Reputation: 10818

How to use tslint with npx

I have a project that has tslint and typescript locally installed. I want to run tslint against the files so I am doing this:

npx tslint -c tsconfig.json 'src/**/*.ts?(x)'

But the command has no effect. That is what I am only see in console:

"C:\Program Files\nodejs\\node.exe"  "C:\Program Files\nodejs\\node_modules\npx\index.js" tslint -c tsconfig.json 'src/**/*.ts?(x)'

Any thoughts?

tslint: 5.7.0
node: 8.9.1
npm: 5.5.1
npx: 9.7.1
os: windows10

Upvotes: 2

Views: 1653

Answers (1)

sbat
sbat

Reputation: 1888

I think it should be:

npx tslint -c tslint.json "src/**/*.ts?(x)"

(of course file naming is up to you, but probably you meant to pass tslint.json, tsconfig.json is usually typescript configuration)

Upvotes: 2

Related Questions