ESLint: replace no-empty-function with typescript version (#15732)

This commit is contained in:
Leslie Leigh (李的序)
2023-07-31 14:21:36 +08:00
committed by GitHub
parent 762fd501c7
commit 95cd245055
+11 -1
View File
@@ -61,6 +61,7 @@ rules:
quotes: [warn, single, { allowTemplateLiterals: true }] # force single, but allow template literal
no-else-return: off # else-return is a common pattern which clearly expresses the control flow
no-unused-expressions: off # taken over by '@typescript-eslint/no-unused-expressions'
no-empty-function: off # taken over by '@typescript-eslint/no-empty-function'
##### AIRBNB-SPECIFIC RULE OVERRIDES #####
@@ -126,7 +127,16 @@ rules:
'@typescript-eslint/unbound-method': off # we exploit prototype methods sometimes to acheive better performace
'@typescript-eslint/no-explicit-any': off # still relevant for some heavily templated usages
'@typescript-eslint/no-empty-function': off # may become useful in some parent classes
'@typescript-eslint/no-empty-function': [error, {
allow: [
private-constructors,
protected-constructors,
decoratedFunctions,
overrideMethods,
]
}]
'@typescript-eslint/no-unused-vars': off # may become useful in some parent classes
'@typescript-eslint/no-non-null-assertion': off # sometimes we just know better than the compiler
'@typescript-eslint/no-namespace': [warn, { # we need to declare static properties