* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
-module.exports = function (grunt) {
- 'use strict'
+'use strict'
+module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
'saucelabs-qunit': {
+'use strict'
+
module.exports = (ctx) => ({
map: ctx.file.dirname.startsWith('docs') ? false : {
inline: false,
+'use strict'
+
const path = require('path')
const babel = require('rollup-plugin-babel')
const resolve = require('rollup-plugin-node-resolve')
+'use strict'
+
const fs = require('fs')
const path = require('path')
const swBuild = require('workbox-build')
<script>
// Example starter JavaScript for disabling form submissions if there are invalid fields
(function() {
- "use strict";
- window.addEventListener("load", function() {
- var form = document.getElementById("needs-validation");
- form.addEventListener("submit", function(event) {
- if (form.checkValidity() == false) {
+ 'use strict';
+
+ window.addEventListener('load', function() {
+ var form = document.getElementById('needs-validation');
+ form.addEventListener('submit', function(event) {
+ if (form.checkValidity() === false) {
event.preventDefault();
event.stopPropagation();
}
- form.classList.add("was-validated");
+ form.classList.add('was-validated');
}, false);
}, false);
-}());
+})();
</script>
{% endexample %}
-$(document).ready(function () {
+$(function () {
+ 'use strict'
+
$('[data-toggle="offcanvas"]').on('click', function () {
$('.row-offcanvas').toggleClass('active')
- });
-});
+ })
+})
-$(document).ready(function () {
+$(function () {
+ 'use strict'
+
$('.tooltip-right').tooltip({
placement: 'right',
- viewport: {selector: 'body', padding: 2}
+ viewport: {
+ selector: 'body',
+ padding: 2
+ }
})
$('.tooltip-bottom').tooltip({
placement: 'bottom',
- viewport: {selector: 'body', padding: 2}
+ viewport: {
+ selector: 'body',
+ padding: 2
+ }
})
$('.tooltip-viewport-right').tooltip({
placement: 'right',
- viewport: {selector: '.container-viewport', padding: 2}
+ viewport: {
+ selector: '.container-viewport',
+ padding: 2
+ }
})
$('.tooltip-viewport-bottom').tooltip({
placement: 'bottom',
- viewport: {selector: '.container-viewport', padding: 2}
+ viewport: {
+ selector: '.container-viewport',
+ padding: 2
+ }
})
})
"no-magic-numbers": "off",
"vars-on-top": "off",
- // Strict Mode
- "strict": "off",
-
// NodeJS and CommonJS
"global-require": "off",
"no-process-env": "off",
"js": "npm-run-all js-lint* js-compile js-minify",
"js-docs": "npm-run-all js-lint-docs js-minify-docs",
"js-lint": "eslint js/ && eslint --config js/tests/.eslintrc.json --env node build/ Gruntfile.js",
- "js-lint-docs": "eslint --config js/tests/.eslintrc.json assets/js/ sw.js",
+ "js-lint-docs": "eslint --config js/tests/.eslintrc.json assets/js/ docs/ sw.js",
"js-compile": "npm-run-all --parallel js-compile-*",
"js-compile-standalone": "cross-env ROLLUP=true rollup --environment BUNDLE:false --config build/rollup.config.js",
"js-compile-bundle": "cross-env ROLLUP=true rollup --environment BUNDLE:true --config build/rollup.config.js",