Skip to content

Commit

Permalink
config(vsCode): add lint/format settings
Browse files Browse the repository at this point in the history
  • Loading branch information
DoubleU23 committed Sep 6, 2021
1 parent c821951 commit 4066f62
Showing 1 changed file with 26 additions and 21 deletions.
47 changes: 26 additions & 21 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
{
"editor.formatOnSaveTimeout": 500,
"editor.defaultFormatter": "teeLang.vsprettier",
"vsprettier.requireConfig": true,
"vsprettier.packageManager": "npm",
"vsprettier.useEsLint": false,
"vsprettier.useStyleLint": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
"eslint.alwaysShowStatus": true,
"eslint.run": "onType",
"eslint.lintTask.enable": true,
"eslint.workingDirectories": [
{
"directory": ".",
"changeProcessCWD": true
}
],
"js/ts.implicitProjectConfig.checkJs": true,
// disable vsCode's internal default formatter
"javascript.validate.enable": false,
"javascript.format.enable": false,
"[javascriptreact,typescriptreact]": {
"typescript.validate.enable": false,
"typescript.format.enable": false,
// use prettier as default formatter (scss, json, md, yml, ...)
"editor.defaultFormatter": "esbenp.prettier-vscode",
// use ESLINT for these file types
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
"eslint.run": "onType", // auto check on typing
"editor.codeActionsOnSave": { "source.fixAll.eslint": true }, // auto fix on save
"eslint.alwaysShowStatus": true, // 'IgorSbitnev.error-gutters'
"eslint.workingDirectories": [{ "directory": ".", "changeProcessCWD": true }],
// Multiple languages specific editor settings NOT AVAILABLE YET
// https://github.com/microsoft/vscode/issues/51935
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnPaste": false,
"editor.formatOnSave": false,
"editor.formatOnType": false
},
"[javascriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnPaste": false,
"editor.formatOnSave": false,
"editor.formatOnType": false
},
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnPaste": false,
"editor.formatOnSave": false,
Expand Down

0 comments on commit 4066f62

Please sign in to comment.