add prettier support
Signed-off-by: Karan Yadav <xpresskaran98@gmail.com>
This commit is contained in:
parent
a20477b0b2
commit
dd03b2f3c0
|
@ -0,0 +1,24 @@
|
|||
name: Formatting Check
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
format-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: "npm"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Run Prettier Check
|
||||
run: npm run format:check || (echo "Code is not formatted! Run 'npm run format' locally." && exit 1)
|
|
@ -0,0 +1 @@
|
|||
npx lint-staged
|
|
@ -0,0 +1,6 @@
|
|||
node_modules
|
||||
frontend/node_modules
|
||||
backend/node_modules
|
||||
backend/dist
|
||||
deployment/
|
||||
docs/
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"semi": true,
|
||||
"tabWidth": 4,
|
||||
"arrowParens": "always",
|
||||
"endOfLine": "lf",
|
||||
"singleQuote": false,
|
||||
"bracketSpacing": true
|
||||
}
|
File diff suppressed because it is too large
Load Diff
74
package.json
74
package.json
|
@ -1,35 +1,43 @@
|
|||
{
|
||||
"name": "volcano-dashboard",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"workspaces": [
|
||||
"frontend",
|
||||
"backend"
|
||||
],
|
||||
"scripts": {
|
||||
"backend": "npm run dev -w backend",
|
||||
"frontend": "npm run dev -w frontend",
|
||||
"dev": "concurrently -n server,client \"npm run backend\" \"npm run frontend\""
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
"react-app",
|
||||
"react-app/jest"
|
||||
]
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
"name": "volcano-dashboard",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"workspaces": [
|
||||
"frontend",
|
||||
"backend"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"concurrently": "^9.1.2"
|
||||
}
|
||||
}
|
||||
"scripts": {
|
||||
"backend": "npm run dev -w backend",
|
||||
"frontend": "npm run dev -w frontend",
|
||||
"dev": "concurrently -n server,client \"npm run backend\" \"npm run frontend\"",
|
||||
"format": "prettier --write .",
|
||||
"format:check": "prettier --check ."
|
||||
},
|
||||
"lint-staged": {
|
||||
"**/*.{js,jsx,ts,tsx,json,md}": "prettier --write"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
"react-app",
|
||||
"react-app/jest"
|
||||
]
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"concurrently": "^9.1.2",
|
||||
"husky": "^9.1.7",
|
||||
"lint-staged": "^15.4.3",
|
||||
"prettier": "^3.5.1"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue