[setup][s]-setup code formatting with prettier
- add husky and lint-stages for pre-commit hooks - format entire codebase using `yarn format`
This commit is contained in:
15
package.json
15
package.json
@@ -8,7 +8,9 @@
|
||||
"start": "next start",
|
||||
"test": "jest",
|
||||
"test:watch": "jest --watch",
|
||||
"test:coverage": "jest --coverage"
|
||||
"test:coverage": "jest --coverage",
|
||||
"format": "prettier --single-quote --write .",
|
||||
"pre-comit": "echo 'formating your changes.....' && prettier --single-quote --write"
|
||||
},
|
||||
"dependencies": {
|
||||
"bytes": "^3.1.0",
|
||||
@@ -26,12 +28,23 @@
|
||||
"@types/react": "^16.9.35",
|
||||
"babel-jest": "^26.0.1",
|
||||
"dotenv": "^8.2.0",
|
||||
"husky": ">=4",
|
||||
"jest": "^26.0.1",
|
||||
"lint-staged": ">=10",
|
||||
"nconf": "^0.10.0",
|
||||
"nock": "^12.0.3",
|
||||
"postcss-preset-env": "^6.7.0",
|
||||
"prettier": "2.0.5",
|
||||
"react-test-renderer": "^16.13.1",
|
||||
"tailwindcss": "^1.4.6",
|
||||
"typescript": "^3.9.3"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{ts,css,html,tsx}": "yarn pre-comit"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user