Skip to content

Commit a51cc51

Browse files
committed
Enable Biome Import Organizer
1 parent cba8fc8 commit a51cc51

18 files changed

+98
-34
lines changed

biome.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,72 @@
1111
"!**/.pnp.loader.mjs"
1212
]
1313
},
14+
"assist": {
15+
"actions": {
16+
"source": {
17+
"organizeImports": {
18+
"level": "on",
19+
"options": {
20+
"groups": [
21+
{ "type": false, "source": ":NODE:" },
22+
{ "type": false, "source": ["vitest", "vitest/**", "@vitest/**", "vitest-*"] },
23+
{ "type": false, "source": "@testing-library/**" },
24+
{ "type": false, "source": ["react", "react-dom", "react-dom/**", "react-native"] },
25+
{ "type": false, "source": [":PACKAGE:"] },
26+
":BLANK_LINE:",
27+
"**/*.css",
28+
":BLANK_LINE:",
29+
{
30+
"type": false,
31+
"source": [
32+
":PATH:",
33+
"!**/hooks/*",
34+
"!**/use*.js",
35+
"!**/shared/*",
36+
"!**/utils/*",
37+
"!**/__mocks__/*",
38+
"!**/test-utils.js",
39+
"!**/*.avif",
40+
"!**/*.jpg",
41+
"!**/*.mp3",
42+
"!**/*.mp4",
43+
"!**/*.png",
44+
"!**/*.svg",
45+
"!**/*.webm",
46+
"!**/*.webp",
47+
"!**/*.woff2"
48+
]
49+
},
50+
":BLANK_LINE:",
51+
{ "type": false, "source": ["**/hooks/*", "**/use*.js"] },
52+
":BLANK_LINE:",
53+
{ "type": false, "source": ["**/shared/*", "**/utils/*"] },
54+
":BLANK_LINE:",
55+
{ "type": false, "source": "**/__mocks__/*" },
56+
":BLANK_LINE:",
57+
{ "type": false, "source": "**/test-utils.js" },
58+
":BLANK_LINE:",
59+
[
60+
"**/*.avif",
61+
"**/*.jpg",
62+
"**/*.mp3",
63+
"**/*.mp4",
64+
"**/*.png",
65+
"**/*.svg",
66+
"**/*.webm",
67+
"**/*.webp",
68+
"**/*.woff2"
69+
],
70+
":BLANK_LINE:",
71+
":NODE:",
72+
":PACKAGE:",
73+
":PATH:"
74+
]
75+
}
76+
}
77+
}
78+
}
79+
},
1480
"formatter": {
1581
"lineWidth": 100,
1682
"indentStyle": "space"

src/DiagramWithLegend.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { wrapper } from './DiagramWithLegend.module.css';
22

3-
import Legend from './Legend.js';
43
import Diagram from './Diagram.js';
4+
import Legend from './Legend.js';
55

66
import type { ReactVersion } from './types.js';
77

src/Options.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ import countryCodeToFlagEmoji from 'country-code-to-flag-emoji';
44

55
import { wrapper } from './Options.module.css';
66

7-
import { supportedReactVersions } from './reactVersions.js';
87
import { supportedLocales } from './i18n/i18n.js';
9-
108
import languages from './i18n/languages.json' with { type: 'json' };
9+
import { supportedReactVersions } from './reactVersions.js';
1110

1211
import type { ReactVersion } from './types.js';
1312

src/Root.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
import { useEffect } from 'react';
2+
import { useLocalStorage } from '@wojtekmaj/react-hooks';
23
import T from '@wojtekmaj/react-t';
3-
import { getUserLocales } from 'get-user-locale';
44
import { getMatchingLocale } from '@wojtekmaj/react-t/dist/esm/utils/locale.js';
5-
import { useLocalStorage } from '@wojtekmaj/react-hooks';
5+
import { getUserLocales } from 'get-user-locale';
66

7-
import Options from './Options.js';
87
import DiagramWithLegend from './DiagramWithLegend.js';
98
import Footer from './Footer.js';
10-
11-
import { supportedReactVersions } from './reactVersions.js';
12-
139
import { supportedLocales } from './i18n/i18n.js';
10+
import Options from './Options.js';
11+
import { supportedReactVersions } from './reactVersions.js';
1412

1513
import type { ReactVersion } from './types.js';
1614

src/diagramElements/Arrow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import clsx from 'clsx';
22

3-
import { wrapper, solid as solidClassName, withAlt as withAltClassName } from './Arrow.module.css';
3+
import { solid as solidClassName, withAlt as withAltClassName, wrapper } from './Arrow.module.css';
44

55
type ArrowProps = {
66
col?: number;

src/diagramElements/Initiator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import clsx from 'clsx';
22

3-
import { wrapper, secondary as secondaryClassName } from './Initiator.module.css';
3+
import { secondary as secondaryClassName, wrapper } from './Initiator.module.css';
44

55
import DocLink from './DocLink.js';
66

src/diagramElements/Method.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import clsx from 'clsx';
22

33
import {
4-
wrapper,
4+
commit,
55
endsInMiddle as endsInMiddleClassName,
66
main as mainClassName,
7-
secondary as secondaryClassName,
8-
render,
97
preCommit,
10-
commit,
8+
render,
9+
secondary as secondaryClassName,
10+
wrapper,
1111
} from './Method.module.css';
1212

1313
import DocLink from './DocLink.js';

src/diagramElements/Section.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { Children, cloneElement } from 'react';
2-
import clsx from 'clsx';
32
import T from '@wojtekmaj/react-t';
3+
import clsx from 'clsx';
44

55
import {
6-
wrapper,
7-
highlight as highlightClassName,
86
advanced as advancedClassName,
7+
highlight as highlightClassName,
98
title,
9+
wrapper,
1010
} from './Section.module.css';
1111

1212
import Subsection from './Subsection.js';

src/diagramElements/Subsection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import { Children, cloneElement } from 'react';
22

33
import { methods } from './Section.module.css';
44

5+
import Arrow from './Arrow.js';
56
import Initiator from './Initiator.js';
67
import Method from './Method.js';
7-
import Arrow from './Arrow.js';
88

99
/**
1010
* Fills props automatically for certain children types. For example, if <Arrow />

src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { StrictMode } from 'react';
22
import { createRoot } from 'react-dom/client';
33
import { TProvider } from '@wojtekmaj/react-t';
4+
45
import { defaultLocale, languageFiles } from './i18n/i18n.js';
56

67
import './global.css';

0 commit comments

Comments
 (0)