Last active
December 16, 2020 11:07
-
-
Save armanozak/76fd0d39755ce5e321805e84fccb7c78 to your computer and use it in GitHub Desktop.
[Disabling TS Lint, The Easy Way] VS Code Snippet + Key Binding for Adding TS Lint Rule Flags #typescript #vscode #tip
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// /User/keybindings.json | |
[ | |
{ | |
"key": "shift+alt+t", | |
"command": "editor.action.insertSnippet", | |
"when": "resourceLangId == typescript && editorTextFocus && !editorReadonly", | |
"args": { | |
"langId": "typescript", | |
"name": "Disable TSLint" | |
} | |
}, | |
{ | |
"key": "ctrl+shift+alt+t", | |
"command": "editor.action.insertSnippet", | |
"when": "resourceLangId == typescript && editorTextFocus && !editorReadonly", | |
"args": { | |
"langId": "typescript", | |
"name": "Disable TSLint NextLine" | |
} | |
} | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// /User/snippets/typescript.json | |
{ | |
"Disable TSLint": { | |
"prefix": "tsl", | |
"body": [ | |
"/* tslint:disable$1 */", | |
"$TM_SELECTED_TEXT", | |
"/* tslint:enable${2:$1}$0 */" | |
], | |
"description": "Disables TSLint on selected code block" | |
}, | |
"Disable TSLint NextLine": { | |
"prefix": "tsl1", | |
"body": [ | |
"/* tslint:disable-next-line$1 */", | |
"$TM_SELECTED_TEXT", | |
], | |
"description": "Disables TSLint on next line" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment