Skip to content

Commit c54cec9

Browse files
boris-petrovdgreif
authored andcommitted
1 parent 0b53561 commit c54cec9

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

docs/rules/no-useless-passive.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This rule disallows setting `passive: true` for events on which it will have no effect.
44

5-
Events where `passive: true` has an effect are: `touchstart`, `touchmove`, `wheel`, and `mousewheel`.
5+
Events where `passive: true` has an effect are: `touchstart`, `touchmove`, `touchenter`, `touchend`, `touchleave`, `wheel`, and `mousewheel`.
66

77
## Rule Details
88

lib/rules/no-useless-passive.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
const passiveEventListenerNames = new Set(['touchstart', 'touchmove', 'wheel', 'mousewheel'])
1+
const passiveEventListenerNames = new Set([
2+
'touchstart',
3+
'touchmove',
4+
'touchenter',
5+
'touchend',
6+
'touchleave',
7+
'wheel',
8+
'mousewheel'
9+
])
210

311
const propIsPassiveTrue = prop => prop.key && prop.key.name === 'passive' && prop.value && prop.value.value === true
412

0 commit comments

Comments
 (0)