Skip to content

Commit b2b0b65

Browse files
committed
Auto-sort imports with eslint
1 parent 9487e3d commit b2b0b65

21 files changed

+32
-22
lines changed

.eslintrc.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,16 @@ module.exports = {
5555
],
5656
'react/jsx-fragments': [2, 'syntax'],
5757
'react/static-property-placement': [2, 'static public field'],
58+
'sort-imports': [
59+
'error',
60+
{
61+
allowSeparatedGroups: true,
62+
ignoreCase: true,
63+
ignoreDeclarationSort: true,
64+
ignoreMemberSort: false,
65+
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
66+
},
67+
],
5868
},
5969
settings: {
6070
'import/resolver': {

example/src/examples/PublicMethodsExample.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React, { useRef } from 'react';
22
import {
3-
Button as RBButton,
43
ButtonProps,
54
ButtonToolbar,
5+
Button as RBButton,
66
} from 'react-bootstrap';
77
import { Typeahead, TypeaheadRef } from 'react-bootstrap-typeahead';
88

src/components/Highlighter/Highlighter.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { StoryFn, Meta } from '@storybook/react';
2+
import { Meta, StoryFn } from '@storybook/react';
33

44
import Highlighter, { HighlighterProps } from './Highlighter';
55

src/components/Hint/Hint.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useState } from 'react';
2-
import { StoryFn, Meta } from '@storybook/react';
2+
import { Meta, StoryFn } from '@storybook/react';
33

44
import Hint, { HintProps } from './Hint';
55
import { HintProvider, noop } from '../../tests/helpers';

src/components/Input/Input.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { StoryFn, Meta } from '@storybook/react';
2+
import { Meta, StoryFn } from '@storybook/react';
33

44
import Input, { InputProps } from './Input';
55

src/components/Loader/Loader.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { StoryFn, Meta } from '@storybook/react';
2+
import { Meta, StoryFn } from '@storybook/react';
33

44
import Loader, { LoaderProps } from './Loader';
55

src/components/Menu/Menu.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { StoryFn, Meta } from '@storybook/react';
2+
import { Meta, StoryFn } from '@storybook/react';
33

44
import Menu, { MenuProps } from './Menu';
55
import MenuItem from '../MenuItem';

src/components/Menu/Menu.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import * as stories from './Menu.stories';
55
import {
66
composeStories,
77
fireEvent,
8+
generateSnapshots,
89
getItems,
910
getMenu,
10-
generateSnapshots,
1111
render,
1212
screen,
1313
} from '../../tests/helpers';

src/components/MenuItem/BaseMenuItem.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { StoryFn, Meta } from '@storybook/react';
2+
import { Meta, StoryFn } from '@storybook/react';
33

44
import { BaseMenuItem, BaseMenuItemProps } from './MenuItem';
55

src/components/MenuItem/MenuItem.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { StoryFn, Meta } from '@storybook/react';
2+
import { Meta, StoryFn } from '@storybook/react';
33

44
import {
55
defaultContext,

0 commit comments

Comments
 (0)