Skip to content

Commit 3d3a2f0

Browse files
committed
apply linter
1 parent f6f7d01 commit 3d3a2f0

File tree

8 files changed

+24
-27
lines changed

8 files changed

+24
-27
lines changed

src/List.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ export class List<C extends ContainerChild = ContainerChild> extends Container<C
6262

6363
if (options)
6464
{
65-
if (options.maxWidth) {
65+
if (options.maxWidth)
66+
{
6667
this._maxWidth = options.maxWidth;
6768
}
6869

6970
this.init(options);
7071
}
7172

72-
7373
options?.items?.forEach((item) => this.addChild(item));
7474

7575
this.on('added', () => this.arrangeChildren());
@@ -359,18 +359,16 @@ export class List<C extends ContainerChild = ContainerChild> extends Container<C
359359
this.arrangeChildren();
360360
}
361361

362-
/**
363-
* Set width of area to fit elements when arrange. (If not set parent width will be used).
364-
*/
365-
set maxWidth(width: number) {
362+
/** Set width of area to fit elements when arrange. (If not set parent width will be used). */
363+
set maxWidth(width: number)
364+
{
366365
this._maxWidth = width;
367366
this.arrangeChildren();
368367
}
369368

370-
/**
371-
* Get width of area to fit elements when arrange. (If not set parent width will be used).
372-
*/
373-
get maxWidth(): number {
369+
/** Get width of area to fit elements when arrange. (If not set parent width will be used). */
370+
get maxWidth(): number
371+
{
374372
return this._maxWidth;
375373
}
376374
}

src/ScrollBox.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,5 +954,4 @@ export class ScrollBox extends Container
954954

955955
return type === 'bidirectional';
956956
}
957-
958957
}

src/stories/list/ListGraphics.stories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { FancyButton } from '../../FancyButton';
44
import { List, ListType } from '../../List';
55
import { centerElement } from '../../utils/helpers/resize';
66
import { defaultTextStyle } from '../../utils/helpers/styles';
7+
import { LIST_TYPE } from '../../utils/HelpTypes';
78
import { argTypes, getDefaultArgs } from '../utils/argTypes';
89
import { action } from '@storybook/addon-actions';
9-
import { LIST_TYPE } from '../../utils/HelpTypes';
1010

1111
const args = {
1212
type: [null, ...LIST_TYPE],
@@ -25,7 +25,7 @@ const args = {
2525
onPress: action('Button pressed'),
2626
};
2727

28-
export const UseGraphics: StoryFn<typeof args & { type:ListType }> = (
28+
export const UseGraphics: StoryFn<typeof args & { type: ListType }> = (
2929
{
3030
type,
3131
fontColor,

src/stories/list/ListSprite.stories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import { FancyButton } from '../../FancyButton';
44
import { List, ListType } from '../../List';
55
import { centerElement } from '../../utils/helpers/resize';
66
import { defaultTextStyle } from '../../utils/helpers/styles';
7+
import { LIST_TYPE } from '../../utils/HelpTypes';
78
import { argTypes, getDefaultArgs } from '../utils/argTypes';
89
import { getColor } from '../utils/color';
910
import { preload } from '../utils/loader';
1011
import { action } from '@storybook/addon-actions';
11-
import { LIST_TYPE } from '../../utils/HelpTypes';
1212

1313
const args = {
1414
type: LIST_TYPE.reverse(),
@@ -19,7 +19,7 @@ const args = {
1919
onPress: action('Button pressed'),
2020
};
2121

22-
export const UseSprite: StoryFn<typeof args & { type:ListType }> = (
22+
export const UseSprite: StoryFn<typeof args & { type: ListType }> = (
2323
{
2424
fontColor,
2525
elementsMargin,

src/stories/scrollBox/ScrollBoxDynamicDimensions.stories.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { Graphics, Text } from 'pixi.js';
22
import { PixiStory, StoryFn } from '@pixi/storybook-renderer';
33
import { FancyButton } from '../../FancyButton';
4+
import { ListType } from '../../List';
45
import { ScrollBox } from '../../ScrollBox';
56
import { centerElement } from '../../utils/helpers/resize';
67
import { defaultTextStyle } from '../../utils/helpers/styles';
7-
import { argTypes, getDefaultArgs } from '../utils/argTypes';
88
import { LIST_TYPE } from '../../utils/HelpTypes';
9-
import { ListType } from '../../List';
9+
import { argTypes, getDefaultArgs } from '../utils/argTypes';
1010

1111
const args = {
1212
fontColor: '#000000',
@@ -15,7 +15,7 @@ const args = {
1515
type: [...LIST_TYPE],
1616
};
1717

18-
export const UseDynamicDimensions: StoryFn<typeof args & { type:ListType }> = (
18+
export const UseDynamicDimensions: StoryFn<typeof args & { type: ListType }> = (
1919
{ fontColor, itemsAmount, backgroundColor, type },
2020
context,
2121
) =>

src/stories/scrollBox/ScrollBoxGraphics.stories.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { Graphics, Text } from 'pixi.js';
22
import { PixiStory, StoryFn } from '@pixi/storybook-renderer';
33
import { FancyButton } from '../../FancyButton';
4+
import { ListType } from '../../List';
45
import { ScrollBox } from '../../ScrollBox';
56
import { centerElement } from '../../utils/helpers/resize';
67
import { defaultTextStyle } from '../../utils/helpers/styles';
8+
import { LIST_TYPE } from '../../utils/HelpTypes';
79
import { argTypes, getDefaultArgs } from '../utils/argTypes';
810
import { action } from '@storybook/addon-actions';
9-
import { LIST_TYPE } from '../../utils/HelpTypes';
10-
import { ListType } from '../../List';
1111

1212
const args = {
1313
fontColor: '#000000',
@@ -28,7 +28,7 @@ const args = {
2828
onPress: action('Button pressed'),
2929
};
3030

31-
export const UseGraphics: StoryFn<typeof args & { type:ListType }> = (
31+
export const UseGraphics: StoryFn<typeof args & { type: ListType }> = (
3232
{
3333
fontColor,
3434
elementsMargin,

src/stories/scrollBox/ScrollBoxProximity.stories.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { Graphics, Text } from 'pixi.js';
22
import { PixiStory, StoryFn } from '@pixi/storybook-renderer';
33
import { FancyButton } from '../../FancyButton';
4+
import { ListType } from '../../List';
45
import { ScrollBox } from '../../ScrollBox';
56
import { centerElement } from '../../utils/helpers/resize';
67
import { defaultTextStyle } from '../../utils/helpers/styles';
8+
import { LIST_TYPE } from '../../utils/HelpTypes';
79
import { argTypes, getDefaultArgs } from '../utils/argTypes';
810
import { action } from '@storybook/addon-actions';
9-
import { ListType } from '../../List';
10-
import { LIST_TYPE } from '../../utils/HelpTypes';
1111

1212
const args = {
1313
proximityRange: 100,
@@ -28,7 +28,7 @@ const items: FancyButton[] = [];
2828
const inRangeCache: boolean[] = [];
2929

3030
export const ProximityEvent: StoryFn<
31-
typeof args & { type:ListType }
31+
typeof args & { type: ListType }
3232
> = (
3333
{
3434
width,

src/stories/scrollBox/ScrollBoxSprite.stories.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { ColorSource, Container, Sprite, Text } from 'pixi.js';
22
import { PixiStory, StoryFn } from '@pixi/storybook-renderer';
33
import { FancyButton } from '../../FancyButton';
4+
import { ListType } from '../../List';
45
import { ScrollBox } from '../../ScrollBox';
56
import { centerElement } from '../../utils/helpers/resize';
67
import { defaultTextStyle } from '../../utils/helpers/styles';
8+
import { LIST_TYPE } from '../../utils/HelpTypes';
79
import { argTypes, getDefaultArgs } from '../utils/argTypes';
810
import { preload } from '../utils/loader';
911
import { action } from '@storybook/addon-actions';
10-
import { ListType } from '../../List';
11-
import { LIST_TYPE } from '../../utils/HelpTypes';
1212

1313
const args = {
1414
fontColor: '#000000',
@@ -21,7 +21,7 @@ const args = {
2121
shiftScroll: false,
2222
};
2323

24-
export const UseSprite: StoryFn<typeof args & { type:ListType }> = (
24+
export const UseSprite: StoryFn<typeof args & { type: ListType }> = (
2525
{
2626
fontColor,
2727
elementsMargin,

0 commit comments

Comments
 (0)