Skip to content

Commit 5dd83b9

Browse files
committed
Tests and docs fixes
1 parent 1f696ba commit 5dd83b9

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,9 @@ Each `import` is matched against _all_ regexes on the `from` string. The import
393393
394394
Imports that don’t match any regex are grouped together last.
395395

396-
Side effect imports have `\u0000` prepended to their `from` string. You can match them with `"^\\u0000"`.
396+
Side effect imports have `\u0000` _prepended_ to their `from` string (starts with `\u0000`). You can match them with `"^\\u0000"`.
397397

398-
Type imports have `\u0000` appended to their `from` string. You can match them with `"\\u0000$"` – but you probably need more than that to avoid them also being matched by other groups.
398+
Type imports have `\u0000` _appended_ to their `from` string (ends with `\u0000`). You can match them with `"\\u0000$"` – but you probably need more than that to avoid them also being matched by other groups.
399399

400400
The inner arrays are joined with one newline; the outer arrays are joined with two (creating a blank line).
401401

examples/.eslintrc.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ module.exports = {
126126
"error",
127127
{
128128
// The default grouping, but with type imports first as a separate group.
129-
groups: [["\u0000$"], ["^\\u0000"], ["^@?\\w"], ["^"], ["^\\."]],
129+
groups: [["^.*\\u0000$"], ["^\\u0000"], ["^@?\\w"], ["^"], ["^\\."]],
130130
},
131131
],
132132
},
@@ -139,7 +139,7 @@ module.exports = {
139139
"error",
140140
{
141141
// The default grouping, but with type imports last as a separate group.
142-
groups: [["^\\u0000"], ["^@?\\w"], ["^"], ["^\\."], ["^.+\u0000$"]],
142+
groups: [["^\\u0000"], ["^@?\\w"], ["^"], ["^\\."], ["^.+\\u0000$"]],
143143
},
144144
],
145145
},
@@ -154,7 +154,7 @@ module.exports = {
154154
// The default grouping, but with type imports first as a separate
155155
// group, sorting that group like non-type imports are grouped.
156156
groups: [
157-
["^@?\\w.*\\u0000$", "\\u0000$", "^\\..*\\u0000$"],
157+
["^@?\\w.*\\u0000$", "^[^.].*\\u0000$", "^\\..*\\u0000$"],
158158
["^\\u0000"],
159159
["^@?\\w"],
160160
["^"],

test/__snapshots__/examples.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,12 @@ import type { Page } from "./page";
140140
import type { Css } from "./styles";
141141
import type { Config } from "/config";
142142
import type { AppRouter } from "@/App";
143+
import type { Story } from "@storybook/react";
143144
import type { Component } from "react";
144145
import type { Store } from "redux";
145146
146147
import "./polyfills";
147148
148-
import type { Story } from "@storybook/react";
149149
import { storiesOf } from "@storybook/react";
150150
import react from "react";
151151

0 commit comments

Comments
 (0)