help wantednew rule
仓库指标
- 星标
- (5,022 个星标)
- PR 合并指标
- (平均合并 4小时 30分钟) (30 天内合并 26 个 PR)
描述
Description
This rule would enforce users to simplify negations: !(a === b) -> a !== b.
There might be other conditions like this that could be simplified.
Fail
if (!(a > b)) {}
const foo = !(bar === baz);
const foo = !(typeof bar === 'undefined');
Pass
if (a <= b) {}
const foo = bar !== baz;
const foo = typeof bar !== 'undefined';
const foo = !Array.isArray(bar);