Skip to content

Commit

Permalink
feat: .vscode add typescript lint rules
Browse files Browse the repository at this point in the history
useful rules for when Prettier not enabled:
no space in braces + prefer single quotes

applies to monorepo + generator template

fixes #4584

Signed-off-by: Douglas McConnachie <dougal83+git@gmail.com>
  • Loading branch information
dougal83 committed Feb 18, 2020
1 parent db850b6 commit e8eb371
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .vscode/settings.json
Expand Up @@ -28,6 +28,8 @@
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"typescript.tsdk": "./packages/build/node_modules/typescript/lib",
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false,
"typescript.preferences.quoteStyle": "single",
"eslint.run": "onSave",
"eslint.nodePath": "./packages/build/node_modules",
"eslint.validate": [
Expand Down
11 changes: 7 additions & 4 deletions packages/cli/generators/project/templates/.vscode/settings.json
Expand Up @@ -4,6 +4,10 @@
"editor.tabSize": 2,
"editor.trimAutoWhitespace": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.fixAll.eslint": true
},

"files.exclude": {
"**/.DS_Store": true,
Expand All @@ -17,13 +21,12 @@
"files.trimTrailingWhitespace": true,

"typescript.tsdk": "./node_modules/typescript/lib",
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false,
"typescript.preferences.quoteStyle": "single",
"eslint.run": "onSave",
"eslint.nodePath": "./node_modules",
"eslint.validate": [
"javascript",
"typescript"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
]
}

0 comments on commit e8eb371

Please sign in to comment.