Skip to content

Commit

Permalink
Tests and docs fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lydell committed Dec 8, 2020
1 parent 1f696ba commit 5dd83b9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -393,9 +393,9 @@ Each `import` is matched against _all_ regexes on the `from` string. The import
Imports that don’t match any regex are grouped together last.

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

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.
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.

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

Expand Down
6 changes: 3 additions & 3 deletions examples/.eslintrc.js
Expand Up @@ -126,7 +126,7 @@ module.exports = {
"error",
{
// The default grouping, but with type imports first as a separate group.
groups: [["\u0000$"], ["^\\u0000"], ["^@?\\w"], ["^"], ["^\\."]],
groups: [["^.*\\u0000$"], ["^\\u0000"], ["^@?\\w"], ["^"], ["^\\."]],
},
],
},
Expand All @@ -139,7 +139,7 @@ module.exports = {
"error",
{
// The default grouping, but with type imports last as a separate group.
groups: [["^\\u0000"], ["^@?\\w"], ["^"], ["^\\."], ["^.+\u0000$"]],
groups: [["^\\u0000"], ["^@?\\w"], ["^"], ["^\\."], ["^.+\\u0000$"]],
},
],
},
Expand All @@ -154,7 +154,7 @@ module.exports = {
// The default grouping, but with type imports first as a separate
// group, sorting that group like non-type imports are grouped.
groups: [
["^@?\\w.*\\u0000$", "\\u0000$", "^\\..*\\u0000$"],
["^@?\\w.*\\u0000$", "^[^.].*\\u0000$", "^\\..*\\u0000$"],
["^\\u0000"],
["^@?\\w"],
["^"],
Expand Down
2 changes: 1 addition & 1 deletion test/__snapshots__/examples.test.js.snap
Expand Up @@ -140,12 +140,12 @@ import type { Page } from "./page";
import type { Css } from "./styles";
import type { Config } from "/config";
import type { AppRouter } from "@/App";
import type { Story } from "@storybook/react";
import type { Component } from "react";
import type { Store } from "redux";
import "./polyfills";
import type { Story } from "@storybook/react";
import { storiesOf } from "@storybook/react";
import react from "react";
Expand Down

0 comments on commit 5dd83b9

Please sign in to comment.