Skip to content

Instantly share code, notes, and snippets.

@hoggren
Last active December 22, 2019 12:23
Show Gist options
  • Save hoggren/1f24f31030c452e048d34d8965a9837b to your computer and use it in GitHub Desktop.
Save hoggren/1f24f31030c452e048d34d8965a9837b to your computer and use it in GitHub Desktop.
ESLINT all files in editor using ESLINT
/*
Protip: Can be bound to a key binding! ;)
If you want to lint on a keybinding,
add this to 'keybindings.json':
{
"key": "cmd+k cmd+l",
"command": "workbench.action.tasks.runTask",
"args": "Lint workspace",
"when": "editorTextFocus"
}
settings:
* For windows change "command": "cmd"
* For windows change "args": ["/C"]
* Change './app' on line 18 to corresponding folder in your project
*/
{
"version": "2.0.0",
"command": "sh",
"args": [ "-c" ],
"tasks": [
{
"presentation": {
"echo": false,
"reveal": "never",
"focus": false,
"panel": "shared"
},
"label": "Lint workspace",
"type": "shell",
"command": "eslint ./app --ext=\".js,.jsx\"",
"problemMatcher": [
"$eslint-stylish"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment