-
Notifications
You must be signed in to change notification settings - Fork 661
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
Eslint import sort plugin selection #1194
Comments
Some figures:
https://github.com/marudor/eslint-plugin-sort-imports-es6-autofix
|
Results for articulations.ts import { RuntimeError, log, defined } from './util';
import { Flow } from './flow';
import { Modifier } from './modifier';
import { Glyph } from './glyph';
import { Stem } from './stem';
import { Note } from './note';
import { StaveNote } from './stavenote';
import { ModifierContextState } from './modifiercontext';
import { Builder } from './easyscore';
import { isGraceNote, isStaveNote, isTabNote } from './typeguard'; https://github.com/lydell/eslint-plugin-simple-import-sort import { Builder } from './easyscore';
import { Glyph } from './glyph';
import { Modifier } from './modifier';
import { ModifierContextState } from './modifiercontext';
import { Note } from './note';
import { StaveNote } from './stavenote';
import { Stem } from './stem';
import { Tables } from './tables';
import { isGraceNote, isStaveNote, isTabNote } from './typeguard';
import { defined, log, RuntimeError } from './util'; https://github.com/marudor/eslint-plugin-sort-imports-es6-autofix import { Builder } from './easyscore';
import { Glyph } from './glyph';
import { Modifier } from './modifier';
import { ModifierContextState } from './modifiercontext';
import { Note } from './note';
import { RuntimeError, defined, log } from './util';
import { StaveNote } from './stavenote';
import { Stem } from './stem';
import { Tables } from './tables';
import { isGraceNote, isStaveNote, isTabNote } from './typeguard'; |
Looking at the statistics and results, I agree with @ronyeh, we should go for |
Once #1192 is merged and the circular dependencies are resolved, it is possible to configure in eslint rules for the order of imports.
There are three options.
The rule sort-imports which does not support autofix:
https://eslint.org/docs/rules/sort-imports
Two plugins with autofix support:
https://github.com/lydell/eslint-plugin-simple-import-sort
https://github.com/marudor/eslint-plugin-sort-imports-es6-autofix
The text was updated successfully, but these errors were encountered: