-
Notifications
You must be signed in to change notification settings - Fork 888
Matching does not work in bash #1082
Comments
Hi @domoritz, you should be able to use globs in a platform-independent way by supplying the glob as a string, i.e. |
Thanks @adidahiya! That works like a charm. Is there any way to make this less confusing/more consistent? Could you always use the node glob expansion algorithm? |
Just a note @domoritz, the What happens is that your shell expands the glob before TSLint ever touches it. When you put it in quotes, your shell passes it on to TSLint as is, then we can expand it with node-glob. As far as I know, there's no way to change TSLint to make it tell the shell "don't expand globs", but if there is, we could consider adding that, although it might mess things up for users who want their shell to expand the glob. |
I was using bash 4.3 from homebrew but the problem was that I'm using fish shell but npm seems to use bash. It was a bit odd to debug but it's totally a problem with how npm/bash/other shells work. It would be great to document that tslint takes glob strings in addition to just files (in |
Bug Report
3.7.0
1.8.9
TypeScript code being linted
Multiple typescript files in many directories. When I'm linting in my native shell (fish), this work as expected. But in bash or when I put tslint in a run script in my
package.json
, the linter does not work as expected.Actual behavior
tslint src/**.ts
only matches the files inside src (not subfolders).tslint src/**/*.ts
matches files exactly one directory deep. And so on.Expected behavior
tslint src/**.ts
should match all files insidesrc
.The text was updated successfully, but these errors were encountered: