mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-31 02:49:56 +02:00
restrict globals that are permitted for linting (#1077)
This commit is contained in:
@@ -79,6 +79,7 @@
|
||||
"no-path-concat": "error",
|
||||
"no-redeclare": "error",
|
||||
"no-regex-spaces": "error",
|
||||
"no-restricted-globals": ["error", "Debug", "Document", "event", "history", "History", "length", "Map", "Node", "parent", "Range", "Selection", "Set", "Text"],
|
||||
"no-sequences": "error",
|
||||
"no-shadow": "error",
|
||||
"no-shadow-restricted-names": "error",
|
||||
|
@@ -25,7 +25,7 @@ function extendSelection(selection, el, offset) {
|
||||
anchor.setStart(selection.anchorNode, selection.anchorOffset)
|
||||
focus.setStart(el, offset)
|
||||
|
||||
const v = focus.compareBoundaryPoints(Range.START_TO_START, anchor)
|
||||
const v = focus.compareBoundaryPoints(window.Range.START_TO_START, anchor)
|
||||
|
||||
// If the focus is after the anchor...
|
||||
if (v >= 0) {
|
||||
|
Reference in New Issue
Block a user