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
Hmm, good point. I guess Go users don't run into this (single-letter wildcards is a nice convention borrowed from gofmt). Some initial thoughts below but this will require some discussion to change:
Maybe a postfix like a* would be a wildcard? Though that might conflict with a*=1.
We could inline the regex into the query like jsfmt -s "/^[a-z]$/ -> b".
A simple quick-fix might be to add a flag for disabling wildcards entirely (i.e. --no-wildcards).
EDIT: We could also exclude some letters from matching as a wildcard: --not-wildcard=t
Any of these solutions will do the job (except the --no-wildcards, as I need them here). My personal preference would be to be able to explicitely pass a list of wildcards instead of the default naming convention.
Hello,
I want to use jsfmt to search for
t("label")
calls in some JavaScript files, but it looks liket
is considered to be a wildcard:function isWildcard(node) { return node.type == "Identifier" && /^[a-z]$/.test(node.name); }
Is it possible to configure / override this isWildcard function ?
Thanks
The text was updated successfully, but these errors were encountered: