Standardize code format for web interface with prettier

Use husky, lint-staged to run prettier pre-commit
This commit is contained in:
Debanjum Singh Solanky
2024-07-15 00:34:54 +05:30
parent 6dd90931e8
commit 6f8f846086
4 changed files with 247 additions and 11 deletions

View File

@@ -14,7 +14,8 @@
"watch": "nodemon --watch . --ext js,jsx,ts,tsx,css --ignore 'out/**/*' --exec 'yarn export'",
"windowswatch": "nodemon --watch . --ext js,jsx,ts,tsx,css --ignore 'out/**/*' --exec 'yarn windowsexport'",
"windowscollectstatic": "cd ..\\..\\.. && .\\.venv\\Scripts\\Activate.bat && py .\\src\\khoj\\manage.py collectstatic --noinput && .\\.venv\\Scripts\\deactivate.bat && cd ..",
"windowsexport": "yarn build && xcopy out ..\\..\\khoj\\interface\\built /E /Y && yarn windowscollectstatic"
"windowsexport": "yarn build && xcopy out ..\\..\\khoj\\interface\\built /E /Y && yarn windowscollectstatic",
"prepare": "husky"
},
"dependencies": {
"@phosphor-icons/react": "^2.1.7",
@@ -61,7 +62,18 @@
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.2.3",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"husky": "^9.0.11",
"lint-staged": "^15.2.7",
"nodemon": "^3.1.3",
"prettier": "3.3.3",
"typescript": "^5"
},
"prettier": {
"tabWidth": 4
},
"lint-staged": {
"*": "yarn lint --fix"
}
}