You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reproduction in #26519 (comment) makes it very clear
that formatting and linting directories like .next/ is not a good idea.
It takes a long time and makes little sense - the build artifacts are best left alone unless user really means to format them.
So I think we should change the default globs for deno fmt and deno lint to exclude hidden directories by default.
The reason to exclude all hidden directories is that if we decide on a list of directories to exclude, we'll have to keep adding to it - .next, .vite, .vitest, etc. 99% of users don't want these directories to be touched by deno fmt, as recently shown in #26402.
The text was updated successfully, but these errors were encountered:
I don't think this is a good approach, because some projects don't set the build directories as hidden (e.g. Nest JS with the TS dist directory), and it's also feasible that some project could have an actually useful hidden directory. I think it would be better if the include option just worked more predictably. In that linked reproducible example I have just the *.ts files included, but the formatter and linter still try to process other file types too.
Going to go with #26897 which respects .gitignore file and doesn't fmt/lint files that are ignored - this should cover most cases as various frameworks will produce .gitignore files that exclude and dist/build directories.
Reproduction in #26519 (comment) makes it very clear
that formatting and linting directories like
.next/
is not a good idea.It takes a long time and makes little sense - the build artifacts are best left alone unless user really means to format them.
So I think we should change the default globs for
deno fmt
anddeno lint
to exclude hidden directories by default.The reason to exclude all hidden directories is that if we decide on a list of directories to exclude, we'll have to keep adding to it -
.next
,.vite
,.vitest
, etc. 99% of users don't want these directories to be touched bydeno fmt
, as recently shown in #26402.The text was updated successfully, but these errors were encountered: