diff --git a/.eslintrc.json b/.eslintrc.json index 6c9c24d46e59..2efe773b6f22 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -51,6 +51,7 @@ "SwitchCase": 1 } ], + "logical-assignment-operators": "off", "max-params": [ "warn", 5 @@ -75,6 +76,7 @@ "error", "after" ], + "prefer-object-has-own": "off", "prefer-template": "error", "semi": [ "error", diff --git a/js/src/modal.js b/js/src/modal.js index b44cbb94d943..dd61649ecce0 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -11,7 +11,9 @@ import SelectorEngine from './dom/selector-engine.js' import Backdrop from './util/backdrop.js' import { enableDismissTrigger } from './util/component-functions.js' import FocusTrap from './util/focustrap.js' -import { defineJQueryPlugin, isRTL, isVisible, reflow } from './util/index.js' +import { + defineJQueryPlugin, isRTL, isVisible, reflow +} from './util/index.js' import ScrollBarHelper from './util/scrollbar.js' /** diff --git a/js/src/scrollspy.js b/js/src/scrollspy.js index 69de7151bea5..368092de45c9 100644 --- a/js/src/scrollspy.js +++ b/js/src/scrollspy.js @@ -8,7 +8,9 @@ import BaseComponent from './base-component.js' import EventHandler from './dom/event-handler.js' import SelectorEngine from './dom/selector-engine.js' -import { defineJQueryPlugin, getElement, isDisabled, isVisible } from './util/index.js' +import { + defineJQueryPlugin, getElement, isDisabled, isVisible +} from './util/index.js' /** * Constants diff --git a/js/src/tooltip.js b/js/src/tooltip.js index 1252811573e9..bcdc18f5d91b 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -9,7 +9,9 @@ import * as Popper from '@popperjs/core' import BaseComponent from './base-component.js' import EventHandler from './dom/event-handler.js' import Manipulator from './dom/manipulator.js' -import { defineJQueryPlugin, execute, findShadowRoot, getElement, getUID, isRTL, noop } from './util/index.js' +import { + defineJQueryPlugin, execute, findShadowRoot, getElement, getUID, isRTL, noop +} from './util/index.js' import { DefaultAllowlist } from './util/sanitizer.js' import TemplateFactory from './util/template-factory.js' diff --git a/js/src/util/backdrop.js b/js/src/util/backdrop.js index 0d478e98de71..82b54900e42f 100644 --- a/js/src/util/backdrop.js +++ b/js/src/util/backdrop.js @@ -7,7 +7,9 @@ import EventHandler from '../dom/event-handler.js' import Config from './config.js' -import { execute, executeAfterTransition, getElement, reflow } from './index.js' +import { + execute, executeAfterTransition, getElement, reflow +} from './index.js' /** * Constants diff --git a/js/tests/unit/carousel.spec.js b/js/tests/unit/carousel.spec.js index c468b5c04eb4..2960eb5ce59f 100644 --- a/js/tests/unit/carousel.spec.js +++ b/js/tests/unit/carousel.spec.js @@ -2,7 +2,9 @@ import Carousel from '../../src/carousel.js' import EventHandler from '../../src/dom/event-handler.js' import { isRTL, noop } from '../../src/util/index.js' import Swipe from '../../src/util/swipe.js' -import { clearFixture, createEvent, getFixture, jQueryMock } from '../helpers/fixture.js' +import { + clearFixture, createEvent, getFixture, jQueryMock +} from '../helpers/fixture.js' describe('Carousel', () => { const { Simulator, PointerEvent } = window diff --git a/js/tests/unit/dropdown.spec.js b/js/tests/unit/dropdown.spec.js index 8447be60bb6b..156005588dbe 100644 --- a/js/tests/unit/dropdown.spec.js +++ b/js/tests/unit/dropdown.spec.js @@ -1,7 +1,9 @@ import EventHandler from '../../src/dom/event-handler.js' import Dropdown from '../../src/dropdown.js' import { noop } from '../../src/util/index.js' -import { clearFixture, createEvent, getFixture, jQueryMock } from '../helpers/fixture.js' +import { + clearFixture, createEvent, getFixture, jQueryMock +} from '../helpers/fixture.js' describe('Dropdown', () => { let fixtureEl diff --git a/js/tests/unit/modal.spec.js b/js/tests/unit/modal.spec.js index 6434d8b3cca2..b5c03131287e 100644 --- a/js/tests/unit/modal.spec.js +++ b/js/tests/unit/modal.spec.js @@ -1,7 +1,9 @@ import EventHandler from '../../src/dom/event-handler.js' import Modal from '../../src/modal.js' import ScrollBarHelper from '../../src/util/scrollbar.js' -import { clearBodyAndDocument, clearFixture, createEvent, getFixture, jQueryMock } from '../helpers/fixture.js' +import { + clearBodyAndDocument, clearFixture, createEvent, getFixture, jQueryMock +} from '../helpers/fixture.js' describe('Modal', () => { let fixtureEl diff --git a/js/tests/unit/offcanvas.spec.js b/js/tests/unit/offcanvas.spec.js index 03e7d9ed3d3c..3b6c98c1004c 100644 --- a/js/tests/unit/offcanvas.spec.js +++ b/js/tests/unit/offcanvas.spec.js @@ -2,7 +2,9 @@ import EventHandler from '../../src/dom/event-handler.js' import Offcanvas from '../../src/offcanvas.js' import { isVisible } from '../../src/util/index.js' import ScrollBarHelper from '../../src/util/scrollbar.js' -import { clearBodyAndDocument, clearFixture, createEvent, getFixture, jQueryMock } from '../helpers/fixture.js' +import { + clearBodyAndDocument, clearFixture, createEvent, getFixture, jQueryMock +} from '../helpers/fixture.js' describe('Offcanvas', () => { let fixtureEl diff --git a/js/tests/unit/scrollspy.spec.js b/js/tests/unit/scrollspy.spec.js index ecbd9522c0a1..fc44471c42da 100644 --- a/js/tests/unit/scrollspy.spec.js +++ b/js/tests/unit/scrollspy.spec.js @@ -1,6 +1,8 @@ import EventHandler from '../../src/dom/event-handler.js' import ScrollSpy from '../../src/scrollspy.js' -import { clearFixture, createEvent, getFixture, jQueryMock } from '../helpers/fixture.js' +import { + clearFixture, createEvent, getFixture, jQueryMock +} from '../helpers/fixture.js' describe('ScrollSpy', () => { let fixtureEl diff --git a/js/tests/unit/tab.spec.js b/js/tests/unit/tab.spec.js index 007adddc6014..4fcf8ee0f0b4 100644 --- a/js/tests/unit/tab.spec.js +++ b/js/tests/unit/tab.spec.js @@ -1,5 +1,7 @@ import Tab from '../../src/tab.js' -import { clearFixture, createEvent, getFixture, jQueryMock } from '../helpers/fixture.js' +import { + clearFixture, createEvent, getFixture, jQueryMock +} from '../helpers/fixture.js' describe('Tab', () => { let fixtureEl diff --git a/js/tests/unit/toast.spec.js b/js/tests/unit/toast.spec.js index cfc56c74aaa5..200fe3e40cf7 100644 --- a/js/tests/unit/toast.spec.js +++ b/js/tests/unit/toast.spec.js @@ -1,5 +1,7 @@ import Toast from '../../src/toast.js' -import { clearFixture, createEvent, getFixture, jQueryMock } from '../helpers/fixture.js' +import { + clearFixture, createEvent, getFixture, jQueryMock +} from '../helpers/fixture.js' describe('Toast', () => { let fixtureEl diff --git a/js/tests/unit/tooltip.spec.js b/js/tests/unit/tooltip.spec.js index 080432e9abab..ceb8de41e1a0 100644 --- a/js/tests/unit/tooltip.spec.js +++ b/js/tests/unit/tooltip.spec.js @@ -1,7 +1,9 @@ import EventHandler from '../../src/dom/event-handler.js' import Tooltip from '../../src/tooltip.js' import { noop } from '../../src/util/index.js' -import { clearFixture, createEvent, getFixture, jQueryMock } from '../helpers/fixture.js' +import { + clearFixture, createEvent, getFixture, jQueryMock +} from '../helpers/fixture.js' describe('Tooltip', () => { let fixtureEl diff --git a/package-lock.json b/package-lock.json index 62262e1167b3..777abfc0c615 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,7 +32,7 @@ "clean-css-cli": "^5.6.3", "cross-env": "^7.0.3", "eslint": "^8.56.0", - "eslint-config-xo": "^0.43.1", + "eslint-config-xo": "^0.44.0", "eslint-plugin-html": "^7.1.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-markdown": "^3.0.1", @@ -4814,21 +4814,21 @@ } }, "node_modules/eslint-config-xo": { - "version": "0.43.1", - "resolved": "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.43.1.tgz", - "integrity": "sha512-azv1L2PysRA0NkZOgbndUpN+581L7wPqkgJOgxxw3hxwXAbJgD6Hqb/SjHRiACifXt/AvxCzE/jIKFAlI7XjvQ==", + "version": "0.44.0", + "resolved": "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.44.0.tgz", + "integrity": "sha512-YG4gdaor0mJJi8UBeRJqDPO42MedTWYMaUyucF5bhm2pi/HS98JIxfFQmTLuyj6hGpQlAazNfyVnn7JuDn+Sew==", "dev": true, "dependencies": { "confusing-browser-globals": "1.0.11" }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" }, "peerDependencies": { - "eslint": ">=8.27.0" + "eslint": ">=8.56.0" } }, "node_modules/eslint-import-resolver-node": { @@ -15111,9 +15111,9 @@ } }, "eslint-config-xo": { - "version": "0.43.1", - "resolved": "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.43.1.tgz", - "integrity": "sha512-azv1L2PysRA0NkZOgbndUpN+581L7wPqkgJOgxxw3hxwXAbJgD6Hqb/SjHRiACifXt/AvxCzE/jIKFAlI7XjvQ==", + "version": "0.44.0", + "resolved": "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.44.0.tgz", + "integrity": "sha512-YG4gdaor0mJJi8UBeRJqDPO42MedTWYMaUyucF5bhm2pi/HS98JIxfFQmTLuyj6hGpQlAazNfyVnn7JuDn+Sew==", "dev": true, "requires": { "confusing-browser-globals": "1.0.11" diff --git a/package.json b/package.json index c590fe35b581..4b94b6d797d4 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,7 @@ "clean-css-cli": "^5.6.3", "cross-env": "^7.0.3", "eslint": "^8.56.0", - "eslint-config-xo": "^0.43.1", + "eslint-config-xo": "^0.44.0", "eslint-plugin-html": "^7.1.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-markdown": "^3.0.1",