]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
ESLint: specify `--report-unused-disable-directives` (#29350)
authorXhmikosR <xhmikosr@gmail.com>
Mon, 2 Sep 2019 09:44:19 +0000 (12:44 +0300)
committerGitHub <noreply@github.com>
Mon, 2 Sep 2019 09:44:19 +0000 (12:44 +0300)
js/src/util/index.js
package.json

index 746ee608bc4c94e0fca638151ffd6d1712fb2344..150b4f87735da330b1c530991733b4c386c98760 100644 (file)
@@ -20,7 +20,6 @@ const toType = obj => ({}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase
 
 const getUID = prefix => {
   do {
-    // eslint-disable-next-line no-bitwise
     prefix += ~~(Math.random() * MAX_UID) // "~~" acts like a faster Math.floor() here
   } while (document.getElementById(prefix))
 
@@ -170,7 +169,6 @@ const findShadowRoot = element => {
   return findShadowRoot(element.parentNode)
 }
 
-// eslint-disable-next-line no-empty-function
 const noop = () => function () {}
 
 const reflow = element => element.offsetHeight
index 8ff9e2e8bff0d8e1efe1174532d70ccb7d37b54c..8399c31a273b06059efe40c3a2ec4011b2ac3635 100644 (file)
@@ -44,7 +44,7 @@
     "js-compile-standalone-esm": "rollup --environment ESM:true,BUNDLE:false --config build/rollup.config.js --sourcemap",
     "js-compile-bundle": "rollup --environment BUNDLE:true --config build/rollup.config.js --sourcemap",
     "js-compile-plugins": "node build/build-plugins.js",
-    "js-lint": "eslint --cache --cache-location .cache/.eslintcache .",
+    "js-lint": "eslint --cache --cache-location .cache/.eslintcache --report-unused-disable-directives .",
     "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",