Skip to content

Commit

Permalink
test: setup pre-commit with linting (#590)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn authored May 27, 2024
1 parent c9fd2f4 commit 74900fc
Show file tree
Hide file tree
Showing 4 changed files with 282 additions and 4 deletions.
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yarn lint-staged
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ yarn build
yarn lint
```

There is also a pre-commit configuration set up with [husky](https://typicode.github.io/husky/) and [lint-staged](https://github.com/lint-staged/lint-staged).

## Tests

```sh
Expand Down
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,16 @@
"build-prod": "vite build --base=/app/ --mode prod",
"preview": "vite preview",
"lint": "eslint",
"lint:fix": "eslint --fix",
"cy:open": "cypress open",
"cy:run": "cypress run",
"test": "start-server-and-test dev http://localhost:5173 cy:run"
"test": "start-server-and-test dev http://localhost:5173 cy:run",
"postinstall": "husky"
},
"lint-staged": {
"*.{js,ts,vue}": [
"yarn lint --max-warnings=0"
]
},
"dependencies": {
"@intlify/unplugin-vue-i18n": "^2.0.0",
Expand Down Expand Up @@ -41,6 +48,8 @@
"cypress": "^13.8.1",
"eslint": "^9.3.0",
"eslint-plugin-vue": "^9.26.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.5",
"postcss": "^8.4.31",
"start-server-and-test": "^2.0.3",
"vite": "^4.5.0"
Expand Down
Loading

0 comments on commit 74900fc

Please sign in to comment.