File: pre-commit

package info (click to toggle)
vue.js 2.6.12%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,124 kB
  • sloc: javascript: 80,436; sh: 97; makefile: 7
file content (7 lines) | stat: -rwxr-xr-x 190 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
#!/usr/bin/env bash

files_to_lint=$(git diff --cached --name-only --diff-filter=ACM | grep '\.js$')

if [ -n "$files_to_lint" ]; then
  NODE_ENV=production eslint --quiet $files_to_lint
fi