bencodezen / vue-enterprise-boilerplate

An ever-evolving, very opinionated architecture and dev environment for new Vue SPA projects using Vue CLI.
7.78k stars 1.32k forks source link

Organize imports #177

Closed marceloavf closed 4 years ago

marceloavf commented 4 years ago

I saw that there is an extension for eslint to automatically organize imports, allowing them to be more readable, It should be nice to have some in this project.

// 3rd party packages
import Vue from 'vue'

// Stores
import Store from '@Store'

// reusable components
import Button from '@components/Button'

// utility functions
import { add, subtract } from '@utils/calculate'

// submodules
import Intro from './Intro'
import Selector from './Selector'
chrisvfritz commented 4 years ago

I'm open to this. 🙂 What extension is this? Can you show me an example of how you use it in your own projects?

marceloavf commented 4 years ago

I'm using this one in some projects with the default config documented over here

https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md

There are many options to enforce conventions that when my application became big, I noticed a heavy disorder when not using this rule

chrisvfritz commented 4 years ago

Just added this. 🙂