1. import-sort-style-as
import-sort style which take resolve.alias into account
import-sort-style-as
Package: import-sort-style-as
Created by: ruanyl
Last modified: Thu, 05 May 2022 20:32:43 GMT
Version: 1.3.1
License: MIT
Downloads: 4,115
Repository: https://github.com/ruanyl/import-sort-style-as

Install

npm install import-sort-style-as
yarn add import-sort-style-as

import-sort-style-alias

Sort resolve.alias separately, first by the order defined in the array, then by member name

npm i import-sort-style-alias --save-dev

package.json

  "importSort": {
    ".js, .jsx, .es6, .es": {
      "parser": "babylon",
      "style": "alias",
      "custom": {
        "alias": ["components", "modules"]
      }
    },
    ".ts, .tsx": {
      "parser": "typescript",
      "style": "alias",
      "custom": {
        "alias": ["components", "modules"]
      }
    }

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin