wemake-services / wemake-vue-template

Bleeding edge vue template focused on code quality and developer happiness.
https://wemake-services.gitbook.io/wemake-vue-template/
MIT License
732 stars 72 forks source link

Sort imports #495

Open sobolevn opened 6 years ago

sobolevn commented 6 years ago

Now:

import * as mutationTypes from '~/store/types'
import type { StateType } from '~/types'
import type { ActionContext } from 'vuex'
import comments from '~/logics/api/comments'

Should be:

import comments from '~/logics/api/comments'
import * as mutationTypes from '~/store/types'

import type { ActionContext } from 'vuex'
import type { StateType } from '~/types'

This is a linting issue.

sobolevn commented 6 years ago

Currently this is very hard to implement due to:

I don't think that it is even possible right now.

sobolevn commented 6 years ago

I also dislike alphabetical ordering:

'sort-imports': ['error', {
      'memberSyntaxSortOrder': ['none', 'single', 'multiple', 'all']
    }],

which does not bring any value. It just mixes all imports into one large group.

sobolevn commented 5 years ago

Closed by accident. https://github.com/Tibfib/eslint-plugin-import-helpers