"no-shadow": "off",
"no-shadow-restricted-names": "error",
"no-undef-init": "error",
- "no-undefined": "error",
"no-use-before-define": "off",
// Node.js and CommonJS
"no-mixed-requires": "error",
"no-new-require": "error",
"no-path-concat": "error",
- "no-process-env": "error",
"no-process-exit": "error",
"no-restricted-modules": "error",
"no-sync": "error",
"func-style": "off",
"no-console": "off",
"no-magic-numbers": "off",
- "no-process-env": "off",
"no-process-exit": "off",
"no-sync": "off",
"spaced-comment": "off"
// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37
function regExpQuote(string) {
- return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&')
+ return string.replace(/[$()*+.?[\\\]^{|}-]/g, '\\$&')
}
function regExpQuoteReplacement(string) {
- return string.replace(/[$]/g, '$$')
+ return string.replace(/\$/g, '$$')
}
const DRY_RUN = false
return Dropdown._jQueryInterface
}
-
export default Dropdown
$(this._element).off(EVENT_CLICK_DISMISS)
$(this._dialog).off(EVENT_MOUSEDOWN_DISMISS)
-
if (transition) {
const transitionDuration = Util.getTransitionDurationFromElement(this._element)
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
*/
-const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi
+const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi
/**
* A pattern that matches safe data URLs. Only matches image, video and audio types.
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
*/
-const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i
+const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i
function allowedAttribute(attr, allowedAttributeList) {
const attrName = attr.nodeName.toLowerCase()
if ($(event.target).is(this)) {
return event.handleObj.handler.apply(this, arguments) // eslint-disable-line prefer-rest-params
}
- return undefined // eslint-disable-line no-undefined
+ return undefined
}
}
}
/* eslint-env node */
-/* eslint no-process-env: 0 */
const path = require('path')
const ip = require('ip')
'</div>'
].join('')).appendTo('#qunit-fixture')
-
$modal.on('shown.bs.modal', function () {
assert.strictEqual($modal.scrollTop(), 0)
done()
.bootstrapToast('show')
})
-
QUnit.test('should close toast when close element with data-dismiss attribute is set', function (assert) {
assert.expect(2)
var done = assert.async()
Util.typeCheckConfig(namePlugin, config, defaultType)
- // eslint-disable-next-line
config.toggle = undefined
Util.typeCheckConfig(namePlugin, config, defaultType)
"js-compile-plugins": "node build/build-plugins.js",
"js-compile-plugins-coverage": "cross-env NODE_ENV=test node build/build-plugins.js",
"js-lint": "npm-run-all --continue-on-error --parallel js-lint-*",
- "js-lint-main": "eslint --cache --cache-location .cache/.eslintcache js/src js/tests build/",
- "js-lint-docs": "eslint --cache --cache-location .cache/.eslintcache site/",
+ "js-lint-main": "eslint --report-unused-disable-directives --cache --cache-location .cache/.eslintcache js/src js/tests build/",
+ "js-lint-docs": "eslint --report-unused-disable-directives --cache --cache-location .cache/.eslintcache site/",
"js-minify": "npm-run-all --parallel js-minify-main js-minify-docs",
"js-minify-main": "npm-run-all js-minify-standalone js-minify-bundle",
"js-minify-standalone": "terser --compress typeofs=false --mangle --comments \"/^!/\" --source-map \"content=dist/js/bootstrap.js.map,includeSources,url=bootstrap.min.js.map\" --output dist/js/bootstrap.min.js dist/js/bootstrap.js",
})
clipboard.on('error', function (e) {
- var modifierKey = /Mac/i.test(navigator.userAgent) ? '\u2318' : 'Ctrl-'
+ var modifierKey = /mac/i.test(navigator.userAgent) ? '\u2318' : 'Ctrl-'
var fallbackMsg = 'Press ' + modifierKey + 'C to copy'
$(e.trigger)
'use strict'
function emulatedIEMajorVersion() {
- var groups = /MSIE ([0-9.]+)/.exec(window.navigator.userAgent)
+ var groups = /MSIE ([\d.]+)/.exec(window.navigator.userAgent)
if (groups === null) {
return null
}