diff --git a/.vscode/frontend.code-workspace b/.vscode/frontend.code-workspace index 578ef1c697e4..c55ade0551d9 100644 --- a/.vscode/frontend.code-workspace +++ b/.vscode/frontend.code-workspace @@ -18,9 +18,9 @@ "extensions": { "recommendations": [ "dbaeumer.vscode-eslint", + "stylelint.vscode-stylelint", "esbenp.prettier-vscode", - "ms-vsliveshare.vsliveshare", - "eamodio.gitlens" + "eamodio.gitlens", ] }, "settings": { @@ -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", @@ -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 + } } } } diff --git a/.vscode/settings.json b/.vscode/settings.json index ad9b648063a2..e52044ed1069 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -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, @@ -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 + } } } diff --git a/airbyte-webapp/package.json b/airbyte-webapp/package.json index 10d02454fc30..e5dfdfcd9167 100644 --- a/airbyte-webapp/package.json +++ b/airbyte-webapp/package.json @@ -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": {