Skip to content

Commit

Permalink
remove lint-staged
Browse files Browse the repository at this point in the history
  • Loading branch information
logonoff committed Oct 25, 2024
1 parent 601dccc commit 6d21263
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 1,145 deletions.
4 changes: 0 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
"sourceType": "module"
},
"plugins": ["promise", "react"],
"rules": {
"no-console": "off",
"no-unused-vars": "warn"
},
"env": {
"es6": true,
"browser": true,
Expand Down
15 changes: 14 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
npm run pretty
#!/bin/sh
# from https://prettier.io/docs/en/precommit#option-4-shell-script
FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g')
[ -z "$FILES" ] && exit 0

# Prettify all selected files
echo "$FILES" | xargs ./node_modules/.bin/prettier --ignore-unknown --write

# Lint
npm run lint

# Add back the modified/prettified files to staging
echo "$FILES" | xargs git add

exit 0
Loading

0 comments on commit 6d21263

Please sign in to comment.