0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-26 23:54:23 +01:00

Move ESLint config to an override

This commit is contained in:
XhmikosR 2021-11-02 13:04:29 +02:00
parent 8306213650
commit 331a935902
3 changed files with 14 additions and 7 deletions

View 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",
@ -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"
}
}
]
}

View 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))

View 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))