mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-05-15 11:59:39 +03:00
Move ESLint config to an override
This commit is contained in:
+14
-5
@@ -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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user