Skip to content

Instantly share code, notes, and snippets.

@sinpaout
Last active May 26, 2019 09:42
Show Gist options
  • Save sinpaout/f06dfa7c32029a002ee847fa8cb38cf5 to your computer and use it in GitHub Desktop.
Save sinpaout/f06dfa7c32029a002ee847fa8cb38cf5 to your computer and use it in GitHub Desktop.
Run eslint fro VSCode tasks.
....
{
"key": "ctrl+l",
"command": "workbench.action.tasks.runTask",
"args": "Fix lint current file"
},
...
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Fix lint current file",
"type": "shell",
"command": "${workspaceFolder}/node_modules/.bin/eslint -c ${workspaceFolder}/.eslintrc ${file} --fix",
"problemMatcher": [
"$eslint-stylish"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment