Closed aljones15 closed 2 years ago
none
should be last instead of first.
We should use the rule (if we're not already) that allows groupings to be individually sorted as well.
We should use the rule (if we're not already) that allows groupings to be individually sorted as well.
do you mean this one? https://eslint.org/docs/rules/sort-imports#ignoremembersort
This means:
import {a,b,c} from 'b.js'
import {z, d, a} from 'z.js'
is ok. the --fix
option will automatically alphabetize members if that is a concern.
or do you mean: https://eslint.org/docs/rules/sort-imports#allowseparatedgroups
@aljones15,
do you mean this one? https://eslint.org/docs/rules/sort-imports#ignoremembersort
No, this one: https://eslint.org/docs/rules/sort-imports#allowseparatedgroups
Before merging this, we need to possibly address https://github.com/digitalbazaar/eslint-config-digitalbazaar/pull/59. I'm thinking of just reverting that change and this would need a rebase.
new rule:
https://eslint.org/docs/rules/sort-imports
ignoreCase: true
this is because Capitalized Class names would then trump other imports.Example 1:
Example 2:
sort-imports
sorts first by import type and then secondly by alphabetized member name. We're using this sort order:import * as jsonld from 'jsonld';
import {a, b} from './foo.js';
import a from 'z.js';
import {bar} from 'foo.js';
import 'bedrock-test';
There for our imports would look like this: