Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: sort-imports add single named import example #15675

Merged
merged 1 commit into from Mar 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/rules/sort-imports.md
Expand Up @@ -7,6 +7,7 @@ The import statement is used to import members (functions, objects or primitives
```js
// single - Import single member.
import myMember from "my-module.js";
import {myOtherMember} from "my-other-module.js";

// multiple - Import multiple members.
import {foo, bar} from "my-module.js";
Expand Down Expand Up @@ -72,7 +73,7 @@ import * as foo from 'foo.js';
import {alpha, beta} from 'alpha.js';
import {delta, gamma} from 'delta.js';
import a from 'baz.js';
import b from 'qux.js';
import {b} from 'qux.js';

/*eslint sort-imports: "error"*/
import a from 'foo.js';
Expand All @@ -84,6 +85,7 @@ import 'foo.js'
import * as bar from 'bar.js';
import {a, b} from 'baz.js';
import c from 'qux.js';
import {d} from 'quux.js';

/*eslint sort-imports: "error"*/
import {a, b, c} from 'foo.js'
Expand All @@ -108,6 +110,10 @@ import {a, b} from 'bar.js';
import a from 'foo.js';
import {b, c} from 'bar.js';

/*eslint sort-imports: "error"*/
import {a} from 'foo.js';
import {b, c} from 'bar.js';

/*eslint sort-imports: "error"*/
import a from 'foo.js';
import * as b from 'bar.js';
Expand Down