Closed
Description
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 |