Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toolchain: Better out-of-the-box experience in VS Code #4230

Merged
merged 8 commits into from
Jan 27, 2023
13 changes: 10 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
root = true

# only apply to frontend files
[*.{es6,js,jsx,ts,tsx,coffee,scss,css,html}]
# defaults
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

# 2 spaces - frontend files mostly
[*.{es6,js,jsx,ts,tsx,coffee,scss,css,html,hbs,json,md,yml}]
indent_size = 2

# 4 spaces - python and others
[{*.{py,sh,ini},Dockerfile}]
indent_size = 4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ env
cypress/cypress/videos/*
cypress/cypress/screenshots/*
public
.venv
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.15.0
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.15.0
48 changes: 48 additions & 0 deletions kpi.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"folders": [
{
"path": "."
}
],
"extensions": {
"recommendations": [
"editorconfig.editorconfig", // EditorConfig

// Linters and Formatters
"ms-python.black-formatter", // Black (also installs MS Pylance)*
"dbaeumer.vscode-eslint", // ESLint
"rvest.vs-code-prettier-eslint", // Prettier
"stylelint.vscode-stylelint", // Stylelint
"freewil.vscode-coffeelint2", // Coffeelint

// Status Bar Toggle for Format and AutoFix on Save
"tombonnike.vscode-status-bar-format-toggle", // Formatting Toggle

// Syntax Support
"almahdi.code-django", // Django templates
]
},
"settings": {
// Black
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},

// Prettier
"[typescript][typescriptreact][javascript][javascriptreact]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
},

// Stylelint
"stylelint.validate": ["css", "scss"],
"css.validate": false,
"scss.validate": false,

// Formatting Toggle
"formattingToggle.affects": [
"editor.formatOnSave",
"editor.codeActionsOnSave.source.fixAll.eslint",
"editor.codeActionsOnSave.source.fixAll.stylelint",
],
},
}
Loading