Skip to content

i-celeste-aurora/eslint-plugin-sort-imports

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Eslint Plugin Sort Imports

Installation

Since this is an internal repository, you need to install it slightly different than usual:

yarn add -D eslint-plugin-sort-imports@https://github.com/i-celeste-aurora/eslint-plugin-sort-imports

Configuration (eslint.config.js)

// your other imports
import sortImports from 'eslint-plugin-sort-imports';

import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";

export default [
  {
    files: ['**/*.{js,mjs,cjs,ts,mts,jsx,tsx}'],
  // ... your other settings
  },
  {
    plugins: {
      // ... your other plugins
      'sort-imports': sortImports
    },
    rules: {
      // ... your other rules
      'sort-imports/sort-rule': 'error'
    }
  }
];

Usage

Just run your lint

About

Sort imports

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors