Include / exclude behavior differs with `--stdin`
thatsmydoing opened this issue · comments
Thomas Dy commented
Version: 0.45.0
With the following dprint.json:
{
"typescript": {
},
"includes": [
"a/**/*.ts"
],
"excludes": [
"a/b",
"**/node_modules"
],
"plugins": [
"https://plugins.dprint.dev/typescript-0.88.10.wasm"
]
}
And a file a/b/c.ts
Running
dprint fmt a/b/c.ts
errors with no files found which is expected.
However, when running
cat a/b/c.ts | dprint fmt --stdin $(pwd)/a/b/c.ts
dprint will print out a formatted version of the file.
Changing the excludes to a/b/**
properly makes the --stdin
format print out the file as-is.