package.json - Add prettier cmds to script

This commit is contained in:
2020-09-28 16:15:20 +05:30
parent 7c302335e9
commit b040ae3e27
+5 -2
View File
@@ -32,7 +32,9 @@
"build": "react-scripts build", "build": "react-scripts build",
"test": "react-scripts test", "test": "react-scripts test",
"eject": "react-scripts eject", "eject": "react-scripts eject",
"lint": "eslint --ext js,jsx,ts,tsx src" "lint": "eslint --ext js,jsx,ts,tsx src",
"prettier": "prettier -l",
"prettier-fix-all": "prettier --write --ignore-unknown ./"
}, },
"eslintConfig": { "eslintConfig": {
"extends": "react-app" "extends": "react-app"
@@ -44,7 +46,8 @@
}, },
"lint-staged": { "lint-staged": {
"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [ "src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [
"prettier -l" "npm run lint",
"npm run prettier"
] ]
}, },
"browserslist": { "browserslist": {