This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The regexp without escapse is ^[^D]{2}.*((.js)|/)$ with: | |
# [^D]{2} means that's not a deleted file from git output | |
# .* is the file name | |
# ((.js)|/) means it's end with .js extension, or a slash (directory) | |
# To use in package.json, we need to double the escapse: ^[^D]\\{2\\}.*\\(\\(\\.js\\)\\|/\\)$ pretty neat huh? | |
git status --porcelain | grep '^[^D]\{2\}.*\(\(\.js\)\|/\)$' | cut -c 4- | xargs eslint |