Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4893dad

Browse filesBrowse files
boris-petrovdgreif
authored andcommitted
Update events handled by require-passive-events
1 parent c54cec9 commit 4893dad
Copy full SHA for 4893dad

File tree

Expand file treeCollapse file tree

2 files changed

+10
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+10
-2
lines changed

‎docs/rules/require-passive-events.md

Copy file name to clipboardExpand all lines: docs/rules/require-passive-events.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Require Passive Events
22

3-
This rule enforces adding `passive: true` to high frequency event listeners (`touchstart`, `touchmove`, `wheel`, `mousewheel`).
3+
This rule enforces adding `passive: true` to high frequency event listeners (`touchstart`, `touchmove`, `touchenter`, `touchend`, `touchleave`, `wheel`, `mousewheel`).
44

55
## Rule Details
66

‎lib/rules/require-passive-events.js

Copy file name to clipboardExpand all lines: lib/rules/require-passive-events.js
+9-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.