Skip to content

Instantly share code, notes, and snippets.

@dragonman225
Last active January 18, 2020 15:51
Show Gist options
  • Save dragonman225/4162da4746e6c1fbf6edb4e277877b13 to your computer and use it in GitHub Desktop.
Save dragonman225/4162da4746e6c1fbf6edb4e277877b13 to your computer and use it in GitHub Desktop.
ESLint config for TypeScript (typescript-eslint)
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"plugin:@typescript-eslint/recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"camelcase": "off",
"@typescript-eslint/camelcase": [
"off"
],
"indent": [
"warn",
2,
{
"SwitchCase": 1
}
],
"@typescript-eslint/indent": [
"warn",
2,
{
"SwitchCase": 1
}
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"warn",
"double",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"semi": [
"error",
"never"
],
"no-console": "off",
"@typescript-eslint/no-use-before-define": [
"error",
{
"functions": false,
"classes": true
}
],
"@typescript-eslint/member-delimiter-style": [
"error",
{
"multiline": {
"delimiter": "none",
"requireLast": false
},
"singleline": {
"delimiter": "semi",
"requireLast": false
}
}
],
"@typescript-eslint/no-var-requires": [
"off"
]
},
"overrides": [
{
"files": [
"*.js"
],
"rules": {
"@typescript-eslint/no-var-requires": "off"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment