Skip to main content

๐Ÿš€ VSCode support

To make the VSCode ESLint Extension work better with Sheriff we can enable a few settings. It's advisable to enable them at the workspace level, meaning in the root of the project at .vscode/settings.json

Enable linting on specified file extensionsโ€‹

.vscode/settings.json
{
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
]
}

Astro supportโ€‹

For Astro projects, add the astro extension too:

.vscode/settings.json
{
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
"astro"
]
}

Avoid "source.organizeImports"โ€‹

Sheriff already handle imports sorting, so you have to disable thew VSCode automatic import sorting feature to avoid conflicts:

.vscode/settings.json
"editor.codeActionsOnSave": {
"source.organizeImports": false
}