I can't figure out why this doesn't work. I would expect @typescript-eslint/no-unused-vars to recognize the type as being used for this function return type. What am I doing wrong? Am I miss-understanding how this is supposed to work?
Code from the image:
.eslintrc.json
{ "env": { "browser": false, "node": true }, "extends": [ "airbnb-base", "eslint:recommended", "plugin:@typescript-eslint/eslint-recommended" ], "parser": "@typescript-eslint/parser", "parserOptions": { "ecmaVersion": 2020, "sourceType": "module" }, "plugins": [ "typescript", "@typescript-eslint" ], "settings": { "import/resolver": { "typescript": {} } }, "rules": { "no-unused-vars": "off", "@typescript-eslint/no-unused-vars": ["error"] } } Service.ts:
export declare interface FooConfig {} Foo.ts:
import { FooConfig } from "library/types/Service"; export default function foo(): FooConfig { return {}; } Error:
ESLint: 'FooConfig' is defined but never used. (@typescript-eslint/no-unused-vars)
