Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
4aef395e
Commit
4aef395e
authored
7 years ago
by
Johann-S
Committed by
XhmikosR
6 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Disable ESlint on no-return-assign and temporary for arrow-body-style
parent
2970d14d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.eslintrc.json
+0
-1
.eslintrc.json
js/src/alert.js
+1
-1
js/src/alert.js
js/src/dom/selectorEngine.js
+8
-4
js/src/dom/selectorEngine.js
with
9 additions
and
6 deletions
+9
-6
.eslintrc.json
+
0
-
1
View file @
4aef395e
...
...
@@ -69,7 +69,6 @@
"no-param-reassign"
:
"off"
,
"no-proto"
:
"error"
,
"no-restricted-properties"
:
"error"
,
"no-return-assign"
:
"error"
,
"no-return-await"
:
"error"
,
"no-script-url"
:
"error"
,
"no-self-compare"
:
"error"
,
...
...
This diff is collapsed.
Click to expand it.
js/src/alert.js
+
1
-
1
View file @
4aef395e
...
...
@@ -66,7 +66,7 @@ class Alert {
const
customEvent
=
this
.
_triggerCloseEvent
(
rootElement
)
if
(
customEvent
.
defaultPrevented
)
{
if
(
customEvent
===
null
||
customEvent
.
defaultPrevented
)
{
return
}
...
...
This diff is collapsed.
Click to expand it.
js/src/dom/selectorEngine.js
+
8
-
4
View file @
4aef395e
...
...
@@ -16,8 +16,9 @@ if (!Element.prototype.matches) {
}
// closest polyfill (see: https://mzl.la/2vXggaI)
let
fnClosest
=
null
if
(
!
Element
.
prototype
.
closest
)
{
Element
.
prototype
.
c
losest
=
(
element
,
selector
)
=>
{
fnC
losest
=
(
element
,
selector
)
=>
{
let
ancestor
=
element
if
(
!
document
.
documentElement
.
contains
(
element
))
{
return
null
...
...
@@ -33,10 +34,13 @@ if (!Element.prototype.closest) {
return
null
}
}
else
{
// eslint-disable-next-line arrow-body-style
fnClosest
=
(
element
,
selector
)
=>
{
return
element
.
closest
(
selector
)
}
}
const
fnClosest
=
Element
.
prototype
.
closest
const
SelectorEngine
=
{
matches
(
element
,
selector
)
{
return
fnMatches
.
call
(
element
,
selector
)
...
...
@@ -56,7 +60,7 @@ const SelectorEngine = {
},
closest
(
element
,
selector
)
{
return
fnClosest
.
call
(
element
,
selector
)
return
fnClosest
(
element
,
selector
)
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment