4.0.22.0.10depending on which glob I use, not all files are linted, even though the globs should catch all files. With a single folder everything is fine, but when I create a nested folder structure, things begin to break down, and app/*/.ts no longer runs linting against every ts file in the app folder and all subfolders
Should lint all ts files under the app folder.
I have created a failing project.
from a fresh directory:
git clone https://github.com/joeeames/tslint-glob-fail.git
cd tslint-glob-fail
npm i typescript tslint
node_modules/.bin/tslint app/**/*.ts
Note that 1 error is found
Now run
node_modules/.bin/tslint app/*.ts
A different set of failures are found
Now run
node_modules/.bin/tslint app/**/*.spec.ts
A different set of failures are found.
All the failures should be found with the first command.
See my comment here: https://github.com/palantir/tslint/issues/1560#issuecomment-264520174
The globs in your examples are expanded by your shell, not the TSLint CLI. Not much we can do here. If you supply globs as strings instead, we use node-glob to expand them.
Thanks for the info. Things are good now.
I didn't really find the solution in the links you listed, like no example of
instead of doing: tslint app//.ts
do: tslint "app//.ts"
But here when you said "supply globs as strings". So I don't know if anyone else who has the same issue can find the solution easily...I certainly spent a couple hours googling and reading to try to find a documented solution.
Most helpful comment
Thanks for the info. Things are good now.
I didn't really find the solution in the links you listed, like no example of
instead of doing: tslint app//.ts
do: tslint "app//.ts"
But here when you said "supply globs as strings". So I don't know if anyone else who has the same issue can find the solution easily...I certainly spent a couple hours googling and reading to try to find a documented solution.