Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2021-11-02 14:04:29 +0300
committerXhmikosR <xhmikosr@gmail.com>2022-02-01 10:15:13 +0300
commit331a935902e509c58e92228bc78fdece9bf633d7 (patch)
tree149ce6c9981d39402e1398a25c5abae8360367f3
parent8306213650fb3473416df7445393ab01b6a44331 (diff)
Move ESLint config to an overridejo-ssr-friendly
-rw-r--r--.eslintrc.json19
-rw-r--r--js/tests/integration/bundle-modularity.js1
-rw-r--r--js/tests/integration/bundle.js1
3 files changed, 14 insertions, 7 deletions
diff --git a/.eslintrc.json b/.eslintrc.json
index 123212f4a7..7ec5ba9e38 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -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",
@@ -65,5 +61,18 @@
"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"
+ }
+ }
+ ]
}
diff --git a/js/tests/integration/bundle-modularity.js b/js/tests/integration/bundle-modularity.js
index ecfd2335f9..8546141b19 100644
--- a/js/tests/integration/bundle-modularity.js
+++ b/js/tests/integration/bundle-modularity.js
@@ -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))
diff --git a/js/tests/integration/bundle.js b/js/tests/integration/bundle.js
index 8c5442626d..452088a7d8 100644
--- a/js/tests/integration/bundle.js
+++ b/js/tests/integration/bundle.js
@@ -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))