Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
meetulr committed Jan 1, 2024
1 parent a15c1c1 commit 6995144
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ build
coverage
node_modules
src/types
docs/Schema.md
docs/Schema.md
package.json
6 changes: 4 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@
# Change to the current directory
. "$(dirname -- "$0")/_/husky.sh"

STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E "\.(ts|tsx|json|scss|css)$")

# Formats code using prettier.
npm run format:fix
npm run pre-commit:format:fix -- $STAGED_FILES

# Checks code for typescript type errors and throws errors if found.
npm run typecheck

# Checks and fixes all lint issues in code which don't require manual intervention.
# Throws errors if lint issues requiring manual intervention are found in code.
npm run lint:fix
npm run pre-commit:lint:fix -- $STAGED_FILES

npm run gen:schema

Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
"typecheck": "graphql-codegen && tsc --noEmit --pretty",
"lint:check": "eslint . --max-warnings=1500",
"lint:fix": "eslint . --fix",
"pre-commit:lint:fix": "eslint --fix",
"format:fix": "prettier --write \"**/*.{ts,tsx,json,scss,css}\"",
"pre-commit:format:fix": "prettier --write",
"format:check": "prettier --check \"**/*.{ts,tsx,json,scss,css}\"",
"prepare": "husky install",
"generate:graphql-markdown": "graphql-markdown http://localhost:4000/graphql > docs/Schema.md",
Expand Down

0 comments on commit 6995144

Please sign in to comment.