Skip to content

Commit

Permalink
🐶 [UI] Pre-commit Formatting with Prettier and Husky
Browse files Browse the repository at this point in the history
🐶 [UI]  Pre-commit Formatting with Prettier and Husky
  • Loading branch information
KaradzaJuraj authored Apr 13, 2024
2 parents a7fe31d + ea06832 commit a806517
Show file tree
Hide file tree
Showing 4 changed files with 246 additions and 9 deletions.
2 changes: 2 additions & 0 deletions cyclops-ui/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cd cyclops-ui
npx lint-staged
1 change: 1 addition & 0 deletions cyclops-ui/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
11 changes: 9 additions & 2 deletions cyclops-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"start": "REACT_APP_CYCLOPS_CTRL_HOST=http://localhost:8888 node_modules/.bin/react-scripts start",
"build": "node_modules/.bin/react-scripts build",
"test": "node_modules/.bin/react-scripts test",
"eject": "node_modules/.bin/react-scripts eject"
"eject": "node_modules/.bin/react-scripts eject",
"prepare": "cd .. && husky cyclops-ui/.husky"
},
"eslintConfig": {
"extends": [
Expand All @@ -70,6 +71,12 @@
},
"devDependencies": {
"@types/react-gauge-chart": "^0.4.3",
"@types/react-highlight-words": "^0.16.7"
"@types/react-highlight-words": "^0.16.7",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"prettier": "3.2.5"
},
"lint-staged": {
"**/*": "prettier --write --ignore-unknown"
}
}
Loading

0 comments on commit a806517

Please sign in to comment.