Skip to content

Ignoring .js file only if corresponding .ts file present #2465

Answered by BurntSushi
manikantag asked this question in Q&A
Discussion options

You must be logged in to vote

Nope. There is no way to hook into ripgrep's filtering logic and introduce a dependency based on whether some other file with a similar name exists.

My suggestion would be to add your js files that your want to ignore to an .rgignore file. It seems likely you could write a relatively simple program to walk your tree and produce those ignore files automatically.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by BurntSushi
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants