Updated TypeScript rules

Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
2020-06-17 21:30:15 +04:00
parent 65cf95c441
commit 802224efd3
5 changed files with 69 additions and 34 deletions

View File

@ -16,6 +16,7 @@
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowConciseArrowFunctionExpressionsStartingWithVoid": false,
"allowExpressions": false,
"allowHigherOrderFunctions": false,
"allowTypedFunctionExpressions": false
@ -61,12 +62,9 @@
"outerIIFEBody": 1
}
],
"@typescript-eslint/interface-name-prefix": [
"@typescript-eslint/method-signature-style": [
"error",
{
"allowUnderscorePrefix": false,
"prefixWithI": "always"
}
"property"
],
"@typescript-eslint/no-base-to-string": [
"error"
@ -125,9 +123,7 @@
"@typescript-eslint/no-unnecessary-condition": [
"error",
{
"allowConstantLoopConditions": false,
"checkArrayPredicates": true,
"ignoreRhs": true
"allowConstantLoopConditions": false
}
],
"@typescript-eslint/no-unnecessary-type-assertion": [
@ -213,9 +209,13 @@
"@typescript-eslint/strict-boolean-expressions": [
"error",
{
"allowNullable": false,
"allowSafe": false,
"ignoreRhs": false
"allowAny": false,
"allowNullableBoolean": false,
"allowNullableNumber": false,
"allowNullableObject": false,
"allowNullableString": false,
"allowNumber": false,
"allowString": false
}
],
"@typescript-eslint/type-annotation-spacing": [
@ -297,4 +297,4 @@
"space-before-function-paren": [
"off"
]
}
}

View File

@ -3,7 +3,6 @@ import rDefault from "./rules/typescript/default.json";
module.exports = {
"extends": [
"./javascript",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:import/typescript",