File: pre-commit

package info (click to toggle)
vue.js 2.6.14%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,268 kB
  • sloc: javascript: 81,161; 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