Skip to content

Instantly share code, notes, and snippets.

@theetrain
Created August 28, 2023 14:23
Show Gist options
  • Save theetrain/172482661b849c4b9e235c336cdbb2a5 to your computer and use it in GitHub Desktop.
Save theetrain/172482661b849c4b9e235c336cdbb2a5 to your computer and use it in GitHub Desktop.
Svelte ESLint config
{
"root": true,
"extends": ["prettier", "standard"],
"plugins": ["@typescript-eslint"],
"parser": "@typescript-eslint/parser",
"rules": {
"arrow-parens": ["error", "as-needed"],
"operator-linebreak": ["error", "before"],
"no-trailing-spaces": [
"error",
{
"ignoreComments": true
}
],
"indent": [
"error",
2,
{
"ignoreComments": true,
"SwitchCase": 1
}
],
"camelcase": [0, { "properties": "never" }]
},
"overrides": [
{
"files": ["*.svelte"],
"extends": ["plugin:svelte/recommended"],
"parser": "svelte-eslint-parser",
"rules": {
"svelte/no-trailing-spaces": [
"error",
{
"ignoreComments": true
}
],
"no-undef-init": [0],
"no-trailing-spaces": [0],
"space-before-function-paren": [0],
"operator-linebreak": [0],
"no-self-assign": [0],
"svelte/no-at-html-tags": [0]
},
"env": {
"node": true,
"browser": true
}
},
{
"files": ["*.d.ts"],
"rules": {
"no-unused-vars": 0
}
}
],
"env": {
"node": true
},
"globals": {
"Response": "readonly"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment