jsx-eslint/eslint-plugin-react

Some cases should not be triggered **no-unused-state**

Open

#1,626 opened on 2017年12月25日

GitHub で見る
 (10 comments) (0 reactions) (0 assignees)JavaScript (8,630 stars) (2,797 forks)batch import
enhancementhelp wanted

説明

no-unused-state

state = {
  id: null,
  name: '',
  age: 0,
}
const {
  id,
  ...data
} = this.state;

console.log('data', data);

name and age should not be reported as error [eslint] Unused state field: 'departmentId' (react/no-unused-state).

コントリビューターガイド

Some cases should not be triggered **no-unused-state** · jsx-eslint/eslint-plugin-react#1626 | Good First Issue