mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-18 10:52:19 +01:00
Disable ESlint on no-return-assign and temporary for arrow-body-style
This commit is contained in:
parent
2970d14dd9
commit
4aef395e49
@ -69,7 +69,6 @@
|
|||||||
"no-param-reassign": "off",
|
"no-param-reassign": "off",
|
||||||
"no-proto": "error",
|
"no-proto": "error",
|
||||||
"no-restricted-properties": "error",
|
"no-restricted-properties": "error",
|
||||||
"no-return-assign": "error",
|
|
||||||
"no-return-await": "error",
|
"no-return-await": "error",
|
||||||
"no-script-url": "error",
|
"no-script-url": "error",
|
||||||
"no-self-compare": "error",
|
"no-self-compare": "error",
|
||||||
|
@ -66,7 +66,7 @@ class Alert {
|
|||||||
|
|
||||||
const customEvent = this._triggerCloseEvent(rootElement)
|
const customEvent = this._triggerCloseEvent(rootElement)
|
||||||
|
|
||||||
if (customEvent.defaultPrevented) {
|
if (customEvent === null || customEvent.defaultPrevented) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@ if (!Element.prototype.matches) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// closest polyfill (see: https://mzl.la/2vXggaI)
|
// closest polyfill (see: https://mzl.la/2vXggaI)
|
||||||
|
let fnClosest = null
|
||||||
if (!Element.prototype.closest) {
|
if (!Element.prototype.closest) {
|
||||||
Element.prototype.closest = (element, selector) => {
|
fnClosest = (element, selector) => {
|
||||||
let ancestor = element
|
let ancestor = element
|
||||||
if (!document.documentElement.contains(element)) {
|
if (!document.documentElement.contains(element)) {
|
||||||
return null
|
return null
|
||||||
@ -33,10 +34,13 @@ if (!Element.prototype.closest) {
|
|||||||
|
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// eslint-disable-next-line arrow-body-style
|
||||||
|
fnClosest = (element, selector) => {
|
||||||
|
return element.closest(selector)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const fnClosest = Element.prototype.closest
|
|
||||||
|
|
||||||
const SelectorEngine = {
|
const SelectorEngine = {
|
||||||
matches(element, selector) {
|
matches(element, selector) {
|
||||||
return fnMatches.call(element, selector)
|
return fnMatches.call(element, selector)
|
||||||
@ -56,7 +60,7 @@ const SelectorEngine = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
closest(element, selector) {
|
closest(element, selector) {
|
||||||
return fnClosest.call(element, selector)
|
return fnClosest(element, selector)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user