Open Mamadou888 opened 2 months ago
What does prettier do when you run it outside of Bazel? I would expect an exclude for node_modules
to be in the prettierrc file.
@alexeagle I work with @Mamadou888. We do not currently have an explicit ignore for node_modules
in our prettierrc
file. It hadn't occurred to add it, as the prettier documentation states that node_modules
is ignored by default. We can of course add that to our prettierrc file.
Maybe you were missing a .gitignore
for the node_modules
folder? I'm not able to reproduce this in the example in this repo, which doesn't have a .prettierrc.
Note that the format tool runs this ls-files
function which asks git what files exist, then only formats those.
What happened?
I run
bazel run //:format path_to_dir_to_check
, where format is an alias to//tools/format:format.check
, which subsequently runs theformat_multirun
, wherejavascript = ":prettier"
. The results I receive in the terminal are[error] No matching files. Patterns: path_to_dir_to_check/node_modules/
, followed by a list of node_modules it could not pattern match.What I expect to happen is a successful prettier check of the
path_to_dir_to_check
with the results of the check.Version
Development (host) and target OS/architectures: Darwin Kernel Version 22.6.0 arm64
Output of
bazel --version
: aspect 5.9.36Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file:Language(s) and/or frameworks involved: Typescript, Javascript
How to reproduce
Any other information?
Example output after running the command