Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Tanuj Kanti <86398394+Tanujkanti4441@users.noreply.github.com>
  • Loading branch information
gwBear1 and Tanujkanti4441 committed Mar 21, 2024
1 parent 9ff7893 commit 54d368d
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions docs/src/rules/sort-imports.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ import {b, a, c} from 'foo.js'

### `ignoreCase`

Default is `false`.

When `false` (default), uppercase letters of the alphabet must always precede lowercase letters.

Expand Down Expand Up @@ -251,9 +250,7 @@ import a from 'bar.js';

### `ignoreDeclarationSort`

Default is `false`.

Ignores the sorting of import declaration statements.
When `true`, the rule ignores the sorting of import declaration statements. Default is `false`.

Examples of **incorrect** code for this rule with the default `{ "ignoreDeclarationSort": false }` option:

Expand Down Expand Up @@ -304,9 +301,7 @@ import {b, a, c} from 'foo.js';

### `ignoreMemberSort`

Default is `false`.

Ignores the member sorting within a `multiple` member import declaration.
When `true`, the rule ignores the member sorting within a `multiple` member import declaration. Default is `false`.

Examples of **incorrect** code for this rule with the default `{ "ignoreMemberSort": false }` option:

Expand Down Expand Up @@ -355,7 +350,9 @@ import a from 'bar.js';

### `memberSyntaxSortOrder`

Default is `["none", "all", "multiple", "single"]`.
This option takes an array with four predefined elements, the order of elements specifies the order of import styles.

Default order is `["none", "all", "multiple", "single"]`.

There are four different styles and the default member syntax sort order is:

Expand Down Expand Up @@ -407,9 +404,7 @@ import {a, b} from 'foo.js';

### `allowSeparatedGroups`

Default is `false`.

When `true` the rule checks the sorting of import declaration statements only for those that appear on consecutive lines.
When `true`, the rule checks the sorting of import declaration statements only for those that appear on consecutive lines. Default is `false`.

In other words, a blank line or a comment line or line with any other statement after an import declaration statement will reset the sorting of import declaration statements.

Expand Down

0 comments on commit 54d368d

Please sign in to comment.