Skip to content

Instantly share code, notes, and snippets.

@webstrand
Created October 11, 2022 19:01
Show Gist options
  • Select an option

  • Save webstrand/f8255e92f1caefaa9a5503e55c040844 to your computer and use it in GitHub Desktop.

Select an option

Save webstrand/f8255e92f1caefaa9a5503e55c040844 to your computer and use it in GitHub Desktop.
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"eslint:recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"array-bracket-spacing": [
"warn",
"always",
{
"objectsInArrays": true,
"arraysInArrays": true
}
],
"arrow-spacing": [
"error"
],
"block-spacing": [
"error",
"always"
],
"brace-style": [
"warn",
"stroustrup",
{ "allowSingleLine": true }
],
"comma-spacing": [
"error"
],
"computed-property-spacing": [
"error"
],
"func-call-spacing": [
"error"
],
"generator-star-spacing": [
"error",
{
"before": true,
"after": false
}
],
"indent": [
"error",
"tab",
{
"SwitchCase": 1
}
],
"key-spacing": [
"error",
{
"mode": "minimum"
}
],
"linebreak-style": [
"error",
"unix"
],
"no-case-declarations": [
"off"
],
"no-confusing-arrow": [
"warn",
{
"allowParens": true
}
],
"object-curly-spacing": [
"warn",
"always"
],
"quotes": [
"error",
"double",
{
"allowTemplateLiterals": true,
"avoidEscape": true
}
],
"rest-spread-spacing": [
"error"
],
"template-curly-spacing": [
"warn",
"never"
],
"semi": [
"error",
"always"
],
"semi-spacing": [
"warn"
],
"space-before-blocks": [
"warn",
"always"
],
"space-before-function-paren": [
"warn",
{
"anonymous": "always",
"named": "never",
"asyncArrow": "always"
}
],
"space-in-parens": [
"warn",
"never"
],
"space-infix-ops": [
"error"
],
"space-unary-ops": [
"error",
{
"words": true,
"nonwords": false
}
],
"spaced-comment": [
"warn",
"always",
{
"block": {
"balanced": true
}
}
],
"switch-colon-spacing": [
"warn",
{
"after": true,
"before": false
}
],
"template-tag-spacing": [
"error",
"never"
],
"yield-star-spacing": [
"error",
"before"
]
},
"overrides": [
{
"files": [ "**/*.ts", "**/*.tsx" ],
"extends": [
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/explicit-function-return-type": [
"warn",
{
}
],
"@typescript-eslint/no-explicit-any": [
"error",
{
"ignoreRestArgs": true
}
],
"@typescript-eslint/no-use-before-define": [
"error",
{
"functions": false,
"classes": false
}
]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment