Skip to content

Commit

Permalink
chore: add pre-commit hook and run linting in workflow (#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak authored Oct 4, 2022
1 parent 067fc73 commit 42b2356
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ jobs:
test:
uses: fastify/workflows/.github/workflows/plugins-ci.yml@v3
with:
lint: true
license-check: true
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"lint:fix": "standard --fix",
"lint:standard": "standard",
"lint:typescript": "standard --parser @typescript-eslint/parser --plugin @typescript-eslint/eslint-plugin test/*.ts",
"test": "npm run lint && npm run unit && npm run typescript",
"test": "npm run unit && npm run typescript",
"test:ci": "npm run lint && tap test/*.test.js --coverage-report=lcovonly && npm run typescript",
"typescript": "tsd",
"unit": "tap test/*.test.js"
Expand All @@ -33,6 +33,7 @@
},
"homepage": "https://github.com/fastify/fastify-cors#readme",
"devDependencies": {
"@fastify/pre-commit": "^2.0.2",
"@types/node": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^5.12.1",
"@typescript-eslint/parser": "^5.12.1",
Expand All @@ -52,5 +53,9 @@
},
"publishConfig": {
"access": "public"
}
},
"pre-commit": [
"lint",
"test"
]
}

0 comments on commit 42b2356

Please sign in to comment.