]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Move ESLint config to an override jo-ssr-friendly 34989/head
authorXhmikosR <xhmikosr@gmail.com>
Tue, 2 Nov 2021 11:04:29 +0000 (13:04 +0200)
committerXhmikosR <xhmikosr@gmail.com>
Tue, 1 Feb 2022 07:15:13 +0000 (09:15 +0200)
.eslintrc.json
js/tests/integration/bundle-modularity.js
js/tests/integration/bundle.js

index 123212f4a7b2760c9ed063844c28ffaafc575099..7ec5ba9e388cfaac73538fcddfe4083ed3da75ee 100644 (file)
@@ -1,10 +1,8 @@
 {
   "root": true,
-  "plugins": ["ssr-friendly"],
   "extends": [
     "plugin:import/errors",
     "plugin:import/warnings",
-    "plugin:ssr-friendly/recommended",
     "plugin:unicorn/recommended",
     "xo",
     "xo/browser"
@@ -52,8 +50,6 @@
       "error",
       "never"
     ],
-    "ssr-friendly/no-dom-globals-in-react-cc-render": "off",
-    "ssr-friendly/no-dom-globals-in-react-fc": "off",
     "unicorn/explicit-length-check": "off",
     "unicorn/no-array-callback-reference": "off",
     "unicorn/no-array-method-this-argument": "off",
     "unicorn/prefer-query-selector": "off",
     "unicorn/prefer-spread": "off",
     "unicorn/prevent-abbreviations": "off"
-  }
+  },
+  "overrides": [
+    {
+      "files": "js/src/**/*.js",
+      "plugins": ["ssr-friendly"],
+      "extends": [
+        "plugin:ssr-friendly/recommended"
+      ],
+      "rules": {
+        "ssr-friendly/no-dom-globals-in-react-cc-render": "off",
+        "ssr-friendly/no-dom-globals-in-react-fc": "off"
+      }
+    }
+  ]
 }
index ecfd2335f9b75b5abc550cdcd544a599aadc54f0..8546141b195544fbed5a0ea23c5cdaa6005080f6 100644 (file)
@@ -1,7 +1,6 @@
 import Tooltip from '../../dist/tooltip'
 import '../../dist/carousel'
 
-// eslint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope
 window.addEventListener('load', () => {
   [].concat(...document.querySelectorAll('[data-bs-toggle="tooltip"]'))
     .map(tooltipNode => new Tooltip(tooltipNode))
index 8c5442626df9495e5f156f8197b946b43effe12f..452088a7d811718dcb98572e1ce3f855860849f0 100644 (file)
@@ -1,6 +1,5 @@
 import { Tooltip } from '../../../dist/js/bootstrap.esm.js'
 
-// eslint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope
 window.addEventListener('load', () => {
   [].concat(...document.querySelectorAll('[data-bs-toggle="tooltip"]'))
     .map(tooltipNode => new Tooltip(tooltipNode))