This config allow you to ensure code style every time you save a file in frontend folder,
alternatively you can just run the command pnpm run lint:fix
- ESlint extension
- Add to settings.json ([Ctrl + Shift + P] to open 'Open Settings (JSON)')
{ ... "editor.codeActionsOnSave": { "source.fixAll.eslint": true, "source.fixAll.prettier": true }, "eslint.validate": [ "javascript", "typescript", "javascriptreact", "typescriptreact" ] ... }
- Add to settings.json ([Ctrl + Shift + P] to open 'Open Settings (JSON)')
pnpm install
Running Domino frontend locally:
pnpm start
DOCKER_BUILDKIT=1 docker build -f ./Dockerfile.prod -t domino-frontend .
Create a .vscode
folder in the root project and add a launch.json
file in it:
{
"version": "0.2.0",
"configurations": [
// Google Chrome configuration
{
"type": "chrome",
"request": "launch",
"name": "Chrome Debug",
"userDataDir": false,
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}/frontend/src",
"enableContentValidation": false,
"sourceMapPathOverrides": {
"webpack:///./src/*": "${webRoot}/*"
},
"runtimeArgs": [
"--remote-debugging-port=9222"
],
"sourceMaps": true,
"pathMapping": {"url": "/src/", "path": "${webRoot}/"}
},
// Microsoft Edge configuration
{
"type": "msedge",
"request": "launch",
"name": "Edge Debug",
"userDataDir": false,
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}/frontend/src",
"enableContentValidation": false,
"sourceMapPathOverrides": {
"webpack:///./src/*": "${webRoot}/*"
},
"runtimeArgs": [
"--remote-debugging-port=9222"
],
"sourceMaps": true,
"pathMapping": {"url": "/src/", "path": "${webRoot}/"}
},
]
}