You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

313 lines
6.6 KiB

{
"root": true,
"parser": "@typescript-eslint/parser",
// https://github.com/babel/babel-eslint
"parserOptions": {
"ecmaFeatures": {
"arrowFunctions": true,
"blockBindings": true,
"classes": true,
"defaultParams": true,
"destructuring": true,
"forOf": true,
"generators": false,
"modules": true,
"objectLiteralComputedProperties": true,
"objectLiteralDuplicateProperties": false,
"objectLiteralShorthandMethods": true,
"objectLiteralShorthandProperties": true,
"spread": true,
"superInFunctions": true,
"templateStrings": true,
"jsx": false,
"legacyDecorators": true
},
"sourceType": "module",
"ecmaVersion": 6
},
"plugins": [
"@typescript-eslint"
],
"env": {
// http://eslint.org/docs/user-guide/configuring.html#specifying-environments
"browser": true,
"node": true,
"es6": true
},
"rules": {
"no-tabs": "error",
// // babel inserts "use strict"; for us
// "strict": [
// "error",
// "never"
// ],
"no-var": "error",
"prefer-const": "warn",
"no-shadow": "error",
// "no-shadow-restricted-names": "error",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"vars": "local",
"args": "none"
}
],
"@typescript-eslint/explicit-function-return-type": [
"error"
],
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "explicit",
"overrides": {
"constructors": "no-public"
}
}
],
"@typescript-eslint/member-delimiter-style": [
"error",
{
"multiline": {
"delimiter": "comma",
"requireLast": false
},
"singleline": {
"delimiter": "comma",
"requireLast": false
}
}
],
"@typescript-eslint/interface-name-prefix": [
"error",
"always"
],
"@typescript-eslint/semi": "error",
"@typescript-eslint/no-empty-interface": "warn",
// "no-use-before-define": "off",
"comma-dangle": [
"error",
"never"
],
// "no-cond-assign": [
// "error",
// "except-parens"
// ],
// "no-console": "off",
// "no-debugger": "warn",
// "no-alert": "warn",
// "no-constant-condition": "warn",
// "no-dupe-keys": "error",
// "no-dupe-class-members": "error",
// "no-duplicate-case": "error",
// "no-empty": "error",
// "no-ex-assign": "error",
// "no-extra-boolean-cast": "off",
"no-extra-semi": "error",
// "no-func-assign": "error",
// "no-inner-declarations": "error",
// "no-invalid-regexp": "error",
"no-irregular-whitespace": "error",
// "no-obj-calls": "error",
// "no-sparse-arrays": "error",
// "no-unreachable": "error",
// "use-isnan": "error",
// "block-scoped-var": "off",
/**
* Best practices
*/
// "consistent-return": "off",
"curly": [
"error",
"multi-line"
],
"default-case": "error",
// "dot-notation": "off",
"eqeqeq": [
"warn",
"smart"
],
"guard-for-in": "off",
"no-caller": "error",
// "no-else-return": "off",
// "no-eq-null": "off",
"no-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
// "no-fallthrough": "error",
"no-floating-decimal": "error",
"no-implied-eval": "error",
"no-lone-blocks": "error",
// "no-loop-func": "error",
// "no-multi-str": "error",
"no-global-assign": "error",
"no-new": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
// "no-octal": "error",
// "no-octal-escape": "error",
// "no-param-reassign": "off",
// "no-proto": "error",
"no-redeclare": "error",
"no-return-assign": "error",
// "no-script-url": "error",
"no-self-compare": "error",
// "no-sequences": "error",
"no-throw-literal": "error",
// "no-with": "error",
"radix": [
"warn",
"as-needed"
],
// "vars-on-top": "error",
// "wrap-iife": [
// "error",
// "any"
// ],
"yoda": "error",
/**
* Style
*/
"indent": [
"error",
2,
{
"SwitchCase": 1,
"MemberExpression": 1,
"FunctionDeclaration": {
"parameters": "first"
},
"FunctionExpression": {
"parameters": "first"
}
}
],
"brace-style": [
"error",
"1tbs",
{
"allowSingleLine": true
}
],
"quotes": [
"error",
"single",
"avoid-escape"
],
"camelcase": "error",
"comma-spacing": [
"error",
{
"before": false,
"after": true
}
],
"comma-style": [
"error",
"last"
],
"eol-last": "error",
// "func-names": "off",
"key-spacing": [
"error",
{
"beforeColon": false,
"afterColon": true
}
],
// "new-cap": [
// "error",
// {
// "newIsCap": true
// }
// ],
// "no-multiple-empty-lines": [
// "error",
// {
// "max": 2
// }
// ],
"no-nested-ternary": "error",
// "no-new-object": "error",
"no-trailing-spaces": "error",
// "no-extra-parens": [
// "error",
// "functions"
// ],
// "no-underscore-dangle": "off",
// "one-var": [
// "error",
// "never"
// ],
"padded-blocks": [
"error",
{
"classes": "always"
}
],
"semi": [
"error",
"always"
],
"semi-spacing": [
"error",
{
"before": false,
"after": true
}
],
"keyword-spacing": [
"error",
{
"overrides": {
"if": {
"after": false
},
"for": {
"after": false
},
"catch": {
"after": false
},
"while": {
"after": false
},
"switch": {
"after": false
}
}
}
],
"space-before-blocks": "error",
"space-before-function-paren": ["error", {
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}],
"space-infix-ops": "error",
"spaced-comment": [
"error",
"always",
{
// "exceptions": [
// "*"
// ],
// "markers": [
// "*"
// ]
}
],
"linebreak-style": [
"error",
"unix"
],
// "no-undef": "error",
"lines-between-class-members": ["error", "always", {
"exceptAfterSingleLine": true
}]
}
}