Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: setup pre-commit with linting #590

Merged
merged 2 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading