4 ms·
This needs a way to match directories for changes in monorepos. E.g. run this linter only if there were changes in this directory.
by parhamn 1y ago
This needs a way to match directories for changes in monorepos. E.g. run this linter only if there were changes in this directory.
- brynary 1y agoThis can be implemented at the line level if the linter is Git aware
- ramoz 1y agoAn abstraction via a script should work, right? They document that it pipes the JSON data to your command's stdin, ```lint-monorepo.sh # read that data json_input=$(cat) # do some parsing here with jq, get the file path (file_path) if [$file_path" == "$dir1"*] run lint_for_dir1 ```
- dcre 1y agoWhatever you run in the hook can check whatever conditions you want.
- tinodb 1y agoSet up pre-commit and call that from a hook? That's what we have