File tree Expand file tree Collapse file tree 5 files changed +11
-10
lines changed Expand file tree Collapse file tree 5 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -369,6 +369,7 @@ class Carousel extends BaseComponent {
369
369
370
370
const indicators = SelectorEngine . find ( SELECTOR_INDICATOR , this . _indicatorsElement )
371
371
372
+ // eslint-disable-next-line unicorn/no-for-loop
372
373
for ( let i = 0 ; i < indicators . length ; i ++ ) {
373
374
if ( Number . parseInt ( indicators [ i ] . getAttribute ( 'data-coreui-slide-to' ) , 10 ) === this . _getItemIndex ( element ) ) {
374
375
indicators [ i ] . classList . add ( CLASS_NAME_ACTIVE )
Original file line number Diff line number Diff line change 8
8
* --------------------------------------------------------------------------
9
9
*/
10
10
11
- const MAX_UID = 1000000
11
+ const MAX_UID = 1_000_000
12
12
const MILLISECONDS_MULTIPLIER = 1000
13
13
const TRANSITION_END = 'transitionend'
14
14
15
15
// Shoutout AngusCroll (https://goo.gl/pxwQGp)
16
- const toType = obj => {
17
- if ( obj === null || obj === undefined ) {
18
- return `${ obj } `
16
+ const toType = object => {
17
+ if ( object === null || object === undefined ) {
18
+ return `${ object } `
19
19
}
20
20
21
- return { } . toString . call ( obj ) . match ( / \s ( [ a - z ] + ) / i) [ 1 ] . toLowerCase ( )
21
+ return Object . prototype . toString . call ( object ) . match ( / \s ( [ a - z ] + ) / i) [ 1 ] . toLowerCase ( )
22
22
}
23
23
24
24
/**
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ describe('Dropdown', () => {
74
74
const dropdown = new Dropdown ( btnDropdown , {
75
75
offset : getOffset ,
76
76
popperConfig : {
77
- onFirstUpdate : state => {
77
+ onFirstUpdate ( state ) {
78
78
expect ( getOffset ) . toHaveBeenCalledWith ( {
79
79
popper : state . rects . popper ,
80
80
reference : state . rects . reference ,
Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ describe('ScrollSpy', () => {
236
236
contentEl,
237
237
scrollSpy,
238
238
spy,
239
- cb : ( ) => {
239
+ cb ( ) {
240
240
testElementIsActiveAfterScroll ( {
241
241
elementSelector : '#a-2' ,
242
242
targetSelector : '#div-2' ,
@@ -276,7 +276,7 @@ describe('ScrollSpy', () => {
276
276
contentEl,
277
277
scrollSpy,
278
278
spy,
279
- cb : ( ) => {
279
+ cb ( ) {
280
280
testElementIsActiveAfterScroll ( {
281
281
elementSelector : '#a-2' ,
282
282
targetSelector : '#div-2' ,
@@ -316,7 +316,7 @@ describe('ScrollSpy', () => {
316
316
contentEl,
317
317
scrollSpy,
318
318
spy,
319
- cb : ( ) => {
319
+ cb ( ) {
320
320
testElementIsActiveAfterScroll ( {
321
321
elementSelector : '#a-2' ,
322
322
targetSelector : '#div-2' ,
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ describe('Tooltip', () => {
126
126
const tooltip = new Tooltip ( tooltipEl , {
127
127
offset : getOffset ,
128
128
popperConfig : {
129
- onFirstUpdate : state => {
129
+ onFirstUpdate ( state ) {
130
130
expect ( getOffset ) . toHaveBeenCalledWith ( {
131
131
popper : state . rects . popper ,
132
132
reference : state . rects . reference ,
You can’t perform that action at this time.
0 commit comments