Skip to content

[no-unused-vars] warnings for used vars #1479

@fairking

Description

@fairking

Repro

module.exports = {
	root: true,
	env: {
		node: true,
	},
	extends: ["eslint:recommended", "plugin:vue/recommended", "prettier", "prettier/vue", "@vue/typescript"],
	rules: {
		"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
		"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
		"no-unused-vars": "warn",
	},
	parserOptions: {
		parser: "@typescript-eslint/parser",
	},
	plugins: ["vue"],
	overrides: [
		{
			files: ["**/__tests__/*.{j,t}s?(x)"],
			env: {
				jest: true,
			},
		},
	],
};
import Vue, { DirectiveOptions } from "vue";
import AppSubmenu from "@/views/layouts/comps/AppSubmenu.vue";
Vue.directive("appsubmenu", <DirectiveOptions>AppSubmenu);

warning: 'DirectiveOptions' is defined but never used (no-unused-vars)

import { LoginTokenVm } from "@/services/index";
export class UserLoginStateVm {
	status: UserLoginStatus;
	user: LoginTokenVm;
	returnUrl: string;
}

warning: 'LoginTokenVm' is defined but never used (no-unused-vars)

Versions

package version
@typescript-eslint/eslint-plugin ^2.15.0
@typescript-eslint/parser ^2.15.0
TypeScript ^3.7.4
ESLint ^6.8.0
node 12.14.1
npm 6.13.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginscope analyserIssues that are caused by bugs/incomplete cases in the scope analyser

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy