Skip to content

Commit

Permalink
DE-554 - DE 597 Added eslint check and prettier format
Browse files Browse the repository at this point in the history
  • Loading branch information
Alberto Blacutt authored and Alberto Blacutt committed Nov 3, 2023
1 parent 7662873 commit 9ef94ca
Show file tree
Hide file tree
Showing 9 changed files with 833 additions and 485 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint verification
run: pnpm run lint
- name: Build process verification
run: pnpm run build
- name: e2e tests verification
Expand All @@ -37,4 +39,4 @@ jobs:
PASSWORD: ${{ secrets.PASSWORD }}
SUBDOMAIN: ${{ secrets.SUBDOMAIN }}
DOMAIN: ${{ secrets.DOMAIN }}
run: pnpm run coverage
run: pnpm run test
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm exec lint-staged
6 changes: 6 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"*.ts": [
"prettier --write",
"eslint"
]
}
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"build": "rm -rf dist & tsc -p tsconfig.esm.json & tsc -p tsconfig.cjs.json",
"test": "jest",
"coverage": "jest --coverage",
"lint": "eslint --ignore-path .eslintignore --ext .js,.ts .",
"prepare": "rm -rf dist & tsc -p tsconfig.esm.json & tsc -p tsconfig.cjs.json"
"lint": "eslint --ignore-path .eslintignore --ext spec.js,spec.ts .",
"format": "prettier --write \"src/e2e/**/*.{js,ts}\"",
"prepare": "rm -rf dist & tsc -p tsconfig.esm.json & tsc -p tsconfig.cjs.json && husky install"
},
"peerDependencies": {},
"prettier": {
"printWidth": 80,
"semi": true,
Expand All @@ -37,7 +37,10 @@
"@typescript-eslint/eslint-plugin": "^5.52.0",
"@typescript-eslint/parser": "^5.52.0",
"eslint": "^8.34.0",
"husky": "^8.0.0",
"jest": "^29.4.3",
"lint-staged": "^15.0.2",
"prettier": "^3.0.3",
"ts-jest": "^29.0.5",
"tslib": "^2.5.0",
"typescript": "^4.9.5"
Expand Down
Loading

0 comments on commit 9ef94ca

Please sign in to comment.