jsx-eslint/eslint-plugin-react
在 GitHub 查看Some cases should not be triggered **no-unused-state**
Open
#1,626 创建于 2017年12月25日
enhancementhelp wanted
仓库指标
- Star
- (8,630 star)
- PR 合并指标
- (30 天内没有已合并 PR)
描述
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).