amatiasq / vsc-sort-imports

Sort ES6 imports automatically.
ISC License
58 stars 24 forks source link

Split/Order by Source #24

Closed Undistraction closed 6 years ago

Undistraction commented 6 years ago

I think a setting to split imports by source would be useful - so that package imports come first, followed by local imports:

import Img from 'gatsby-image';
import PropTypes from 'prop-types';
import React from 'react';

import HTMLText from '../../components/shared/HTMLText';
import Metadata from '../../components/Metadata';
import Page from '../../components/Page';
amatiasq commented 6 years ago

Hey there! You can decide how do you want your imports to be sorted using a different style as explained in the README.

For backward compatibility the default sort type is eslint but you probably want module or module-compact.