Skip to content

@typescript-eslint/no-unused-vars reports error after upgrading to @typescript-eslint/parser 1.1.1 #160

@doberkofler

Description

@doberkofler

The @typescript-eslint/no-unused-vars reports rule reports the constant text to be unused after upgrading the @typescript-eslint/parser components from 1.1.0 to 1.1.1.

Repro

module.exports = {
	extends: [
		'eslint:recommended',
		'plugin:@typescript-eslint/recommended'
	],
	rules: {
		'@typescript-eslint/explicit-function-return-type': 'off',
		'@typescript-eslint/indent': ['warn', 'tab'],
		'@typescript-eslint/no-unused-vars': ['warn'],
	}
};
const text = 'text';

export function Foo() {
	return (
		<div>
			<input type="search" size={30} placeholder={text} />
		</div>
	);
}

Expected Result
There should be no error as the constant text has been used in JSX.

Actual Result
It worked as expected with @typescript-eslint/parser version 1.1.0 but now fails with version 1.1.1.

Additional Info

Versions

package version
@typescript-eslint/eslint-plugin 1.1.1
@typescript-eslint/parser 1.1.1
TypeScript 3.2.4
ESLint 5.12.1
node 10.15.0
npm 6.7.0

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

Type

No type

Projects

No projects

Milestone

No milestone

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