Exclude paths
See original GitHub issueHi,
Thanks for a great library. 🌹
I’m using lint-staged to run tslint on typescript files (*.ts
) but I’d like to exclude certain directories from being linted.
How can I exclude certain paths from being linted?
Cheers
Issue Analytics
- State:
- Created 7 years ago
- Comments:19 (6 by maintainers)
Top Results From Across the Web
Exclude Certain Paths With the find Command - Baeldung
Exclude Certain Paths With the find Command · Let's create a set of files and directories to use as an example: $ mkdir...
Read more >How do I exclude a directory when using `find`? - Stack Overflow
If -prune doesn't work for you, this will: find -name "*.js" -not -path "./directory/*". Caveat: requires traversing all of the unwanted directories.
Read more >Exclude a directory or multiple directories while using find ...
We can exclude directories by using the help of “path“, “prune“, “o” and “print” switches with find command. ... The directory “bit” will...
Read more >How to Exclude Certain Paths With the find Command in Linux
Ways to exclude paths with the find command: Method 1: The -prune flag. Syntax: find <path_of_the_file> -prune.
Read more >Exclude Paths — DeepDiff 6.2.2 documentation - Zepworks
Exclude part of your object tree from comparison. use exclude_paths and pass a set or list of paths to exclude, if only one...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@okonet how would I use the exclude pattern in minimatch to ignore certain files? I need to ignore compiled files. how should my
lint-staged
config look? what I want is something like this:However, I don’t think
*.js,!public/dist/*.js
is valid minimatch pattern. Do you know how I could use that?If anyone like me stumbles upon same issue when trying to exclude some folder from
lint-staged
scope, here’s the solution:Here
lint-staged
will run for every .ts or .tsx file in the project except these in rootclient
folder (I’ve got separate tslint.json for my client files).Some additional exclude patterns can be found here: https://github.com/mysticatea/cpx/issues/24#issuecomment-285389024.