How do I use the ESLint no-restricted-syntax
rule to disallow/ban the this
keyword from being used as a return type on functions and class methods.
rules: {
"no-restricted-syntax": [
"error",
"FunctionExpression[returnType.typeAnnotation.type='TSThisType']",
"ArrowFunctionExpression[returnType.typeAnnotation.type='TSThisType']"
]
}