Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed
Description
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages. (as far as
xo
goes) - I haveread the FAQ and my problem is not listed.
Repro
I'm not exactly sure how my rule is configured, it comes from the XO package.
abstractclassAbstractThing{protectedreportStuff():void{console.log("This reports a lot of stuff...");}}classMyThing{protectedoverridereportStuff(){};}
Here is my tsconfig:
{"compilerOptions": {"target":"esnext","module":"esnext","jsx":"preserve","lib": ["dom","es2020" ],"baseUrl":"./","moduleResolution":"node","strict":true,"allowJs":true,"noEmit":true,"allowSyntheticDefaultImports":true,"esModuleInterop":true,"skipLibCheck":true,"noUnusedLocals":true,"noUnusedParameters":true,"isolatedModules":true,"removeComments":false,"preserveConstEnums":true,"sourceMap":true,"forceConsistentCasingInFileNames":true,"experimentalDecorators":true,"emitDecoratorMetadata":true,"resolveJsonModule":true,"noImplicitOverride":true,"incremental":true },"include": ["src/**/*","test/**/*" ],"exclude": ["node_modules" ]}
Expected Result
I expect the rule to not give me a warning, because itcan be an actual use case to "disable" base-class functionality.
Actual Result
I get the classic warning "Unexpected empty method 'reportStuff'. (@typescript-eslint/no-empty-function)XO(@typescript-eslint/no-empty-function)" because the function is obviously empty, but the rule does not consider the (relatively new)override
keyword.
Additional Info
None.
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin | 5.11.0 |
@typescript-eslint/parser | 5.11.0 |
TypeScript | 4.5.5 |
ESLint | 8.14.0 |
node | 16.13.1 |