lydell / eslint-plugin-simple-import-sort

Easy autofixable import sorting.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add `recommended` preset?

fisker opened this issue · comments

Instead of

import simpleImportSort from "eslint-plugin-simple-import-sort";

export default [
  {
    plugins: {
      "simple-import-sort": simpleImportSort,
    },
    rules: {
      "simple-import-sort/imports": "error",
      "simple-import-sort/exports": "error",
    },
  },
];

We can use

import simpleImportSort from "eslint-plugin-simple-import-sort";

export default [
  simpleImportSort.configs.recommended,
];

Hi!

Previous discussions (a bit outdated, this one is the first one for flat config): #66, #14, #142

Personally I don’t like it. It removes just a couple of lines, with the cost of if you want to change any options it’s harder. And I need to describe what recommended does in the readme anyway.

Thanks!