ESLint: Modify recommended typescript rules to fit our use case.

This commit is contained in:
Thomas Ip 2019-03-25 22:35:44 +08:00 committed by Tim Abbott
parent 8b6ff8b016
commit 9c6964aa19
1 changed files with 19 additions and 16 deletions

View File

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