docs: linting notes, npm: lint scripts

This commit is contained in:
hayzamjs 2024-06-02 21:13:03 +05:30
parent 0436480a44
commit ad0ed2269f
Signed by: hayzam
GPG key ID: 13B4C5B544B53947
2 changed files with 8 additions and 3 deletions

View file

@ -18,4 +18,8 @@ Copy the `.env.sample` file to `.env` and fill in the required values.
```bash ```bash
npm run test npm run test
``` ```
## Contributing
Use `npm run lint:check` to check for linting errors and `npm run lint:fix` to fix them.

View file

@ -5,14 +5,15 @@
"main": "index.js", "main": "index.js",
"type": "module", "type": "module",
"scripts": { "scripts": {
"lint": "semistandard --fix tests/**/*.js", "lint:check": "semistandard tests/**/*.js"
"lint:fix": "semistandard --fix tests/**/*.js",
"codegen": "npx playwright codegen", "codegen": "npx playwright codegen",
"test": "playwright test", "test": "playwright test",
"prepare": "npm run lint" "prepare": "npm run lint"
}, },
"husky": { "husky": {
"hooks": { "hooks": {
"pre-commit": "npm run lint" "pre-commit": "npm run lint:fix"
} }
}, },
"keywords": [], "keywords": [],