Skip to content

Commit

Permalink
Add vscode settings to autoformat scss files (airbytehq#16134)
Browse files Browse the repository at this point in the history
Update lint-staged to lint files
  • Loading branch information
edmundito authored and jhammarstedt committed Oct 31, 2022
1 parent 64bc3f8 commit 51d22d3
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
13 changes: 11 additions & 2 deletions .vscode/frontend.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
"extensions": {
"recommendations": [
"dbaeumer.vscode-eslint",
"stylelint.vscode-stylelint",
"esbenp.prettier-vscode",
"ms-vsliveshare.vsliveshare",
"eamodio.gitlens"
"eamodio.gitlens",
]
},
"settings": {
Expand All @@ -33,6 +33,8 @@
"editor.detectIndentation": true,
"eslint.format.enable": true,
"eslint.run": "onType",
"stylelint.enable": true,
"stylelint.validate": ["css", "scss"],
"[javascript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
Expand All @@ -57,6 +59,13 @@
"[json]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.stylelint": true
}
}
}
}
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"editor.detectIndentation": true,
"eslint.format.enable": true,
"eslint.run": "onType",
"stylelint.enable": true,
"stylelint.validate": ["css", "scss"],
"[javascript]": {
"editor.formatOnSave": true,
Expand All @@ -33,5 +34,12 @@
"[json]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.stylelint": true
}
}
}
8 changes: 7 additions & 1 deletion airbyte-webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,14 @@
}
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [
"src/**/*.{js,jsx,ts,tsx,json}": [
"eslint --fix"
],
"src/**/*.{css,scss,md}": [
"prettier --write"
],
"src/**/*.{css,scss}": [
"stylelint --fix"
]
},
"browserslist": {
Expand Down

0 comments on commit 51d22d3

Please sign in to comment.