aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Gruntfile.js4
-rw-r--r--build/postcss.config.js2
-rw-r--r--build/rollup.config.js2
-rw-r--r--build/workbox.js2
-rw-r--r--docs/4.0/components/forms.md15
-rw-r--r--docs/4.0/examples/offcanvas/offcanvas.js8
-rw-r--r--docs/4.0/examples/tooltip-viewport/tooltip-viewport.js24
-rw-r--r--js/tests/.eslintrc.json3
-rw-r--r--package.json2
9 files changed, 41 insertions, 21 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index 351802b94..28f25b48c 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -6,9 +6,9 @@
* 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': {
diff --git a/build/postcss.config.js b/build/postcss.config.js
index 721e467c6..b34a0ce46 100644
--- a/build/postcss.config.js
+++ b/build/postcss.config.js
@@ -1,3 +1,5 @@
+'use strict'
+
module.exports = (ctx) => ({
map: ctx.file.dirname.startsWith('docs') ? false : {
inline: false,
diff --git a/build/rollup.config.js b/build/rollup.config.js
index 0f1a023e8..9faeb0882 100644
--- a/build/rollup.config.js
+++ b/build/rollup.config.js
@@ -1,3 +1,5 @@
+'use strict'
+
const path = require('path')
const babel = require('rollup-plugin-babel')
const resolve = require('rollup-plugin-node-resolve')
diff --git a/build/workbox.js b/build/workbox.js
index 9d2bec27e..bae5b35cc 100644
--- a/build/workbox.js
+++ b/build/workbox.js
@@ -1,3 +1,5 @@
+'use strict'
+
const fs = require('fs')
const path = require('path')
const swBuild = require('workbox-build')
diff --git a/docs/4.0/components/forms.md b/docs/4.0/components/forms.md
index 76d14dde9..ed4d95b70 100644
--- a/docs/4.0/components/forms.md
+++ b/docs/4.0/components/forms.md
@@ -739,18 +739,19 @@ When attempting to submit, you'll see the `:invalid` and `:valid` styles applied
<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 %}
diff --git a/docs/4.0/examples/offcanvas/offcanvas.js b/docs/4.0/examples/offcanvas/offcanvas.js
index a89262a26..a41847081 100644
--- a/docs/4.0/examples/offcanvas/offcanvas.js
+++ b/docs/4.0/examples/offcanvas/offcanvas.js
@@ -1,5 +1,7 @@
-$(document).ready(function () {
+$(function () {
+ 'use strict'
+
$('[data-toggle="offcanvas"]').on('click', function () {
$('.row-offcanvas').toggleClass('active')
- });
-});
+ })
+})
diff --git a/docs/4.0/examples/tooltip-viewport/tooltip-viewport.js b/docs/4.0/examples/tooltip-viewport/tooltip-viewport.js
index e87f4eec7..dc75e18c6 100644
--- a/docs/4.0/examples/tooltip-viewport/tooltip-viewport.js
+++ b/docs/4.0/examples/tooltip-viewport/tooltip-viewport.js
@@ -1,18 +1,32 @@
-$(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
+ }
})
})
diff --git a/js/tests/.eslintrc.json b/js/tests/.eslintrc.json
index b03980144..460286508 100644
--- a/js/tests/.eslintrc.json
+++ b/js/tests/.eslintrc.json
@@ -21,9 +21,6 @@
"no-magic-numbers": "off",
"vars-on-top": "off",
- // Strict Mode
- "strict": "off",
-
// NodeJS and CommonJS
"global-require": "off",
"no-process-env": "off",
diff --git a/package.json b/package.json
index 601dd09f7..85a641b34 100644
--- a/package.json
+++ b/package.json
@@ -31,7 +31,7 @@
"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",