ESLint: Set typescript recommended rules.

ESLint currently forbids using extends in the override block, ie
```
{
    "extends": ["plugin:@typescript-eslint/recommended"]
}
```
so we just have to add them manually for now.

See https://github.com/eslint/eslint/issues/8813 .
This commit is contained in:
Thomas Ip 2019-03-25 20:12:02 +08:00 committed by Tim Abbott
parent 90478fc4b2
commit 8b6ff8b016
1 changed files with 43 additions and 0 deletions

View File

@ -417,6 +417,49 @@
}, },
"plugins": ["@typescript-eslint"], "plugins": ["@typescript-eslint"],
"rules": { "rules": {
"@typescript-eslint/adjacent-overload-signatures": 2,
"@typescript-eslint/array-type": 2,
"@typescript-eslint/ban-types": 2,
"@typescript-eslint/ban-ts-ignore": 2,
"@typescript-eslint/camelcase": 2,
"@typescript-eslint/class-name-casing": 2,
"@typescript-eslint/explicit-function-return-type": 2,
"@typescript-eslint/explicit-member-accessibility": 2,
"@typescript-eslint/generic-type-naming": 0,
"@typescript-eslint/indent": 2,
"@typescript-eslint/interface-name-prefix": 2,
"@typescript-eslint/member-delimiter-style": 2,
"@typescript-eslint/member-naming": 0,
"@typescript-eslint/member-ordering": 0,
"@typescript-eslint/no-angle-bracket-type-assertion": 2,
"@typescript-eslint/no-array-constructor": 2,
"@typescript-eslint/no-empty-interface": 2,
"@typescript-eslint/no-explicit-any": 2,
"@typescript-eslint/no-extraneous-class": 0,
"@typescript-eslint/no-for-in-array": 0,
"@typescript-eslint/no-inferrable-types": 2,
"@typescript-eslint/no-misused-new": 2,
"@typescript-eslint/no-namespace": 2,
"@typescript-eslint/no-non-null-assertion": 2,
"@typescript-eslint/no-object-literal-type-assertion": 2,
"@typescript-eslint/no-parameter-properties": 2,
"@typescript-eslint/no-require-imports": 2,
"@typescript-eslint/no-this-alias": 0,
"@typescript-eslint/no-triple-slash-reference": 2,
"@typescript-eslint/no-type-alias": 0,
"@typescript-eslint/no-unnecessary-qualifier": 0,
"@typescript-eslint/no-unnecessary-type-assertion": 0,
"@typescript-eslint/no-unused-vars": 2,
"@typescript-eslint/no-use-before-define": 2,
"@typescript-eslint/no-useless-constructor": 0,
"@typescript-eslint/no-var-requires": 2,
"@typescript-eslint/prefer-function-type": 0,
"@typescript-eslint/prefer-interface": 2,
"@typescript-eslint/prefer-namespace-keyword": 2,
"@typescript-eslint/promise-function-async": 2,
"@typescript-eslint/restrict-plus-operands": 0,
"@typescript-eslint/type-annotation-spacing": 2,
"@typescript-eslint/unified-signatures": 0
} }
} }
] ]