Skip to content
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.

Latest commit

 

History

History
36 lines (23 loc) · 684 Bytes

jsx-member-vars.md

File metadata and controls

36 lines (23 loc) · 684 Bytes

Prevent Import members and variables used in JSX to be marked as 'no-unused'

ESLint no-unused-vars rule does not detect variables used in JSX. This rule will locate variables used within JSX and mark them as used.

NOTE!: This rule only has an effect when the no-unused-vars rule is enabled.

Rule Details

The following patterns are considered errors:

import Member from './Member';
const Member;

The following patterns are no longer considered errors:

import Member from '.Member';

<Member />;
const Member;

<Member />;

When Not To Use It

If you are not using Twist and JSX and if no-unused-vars rule is disabled.