aladdin-add/eslint-plugin

autofix/sort-imports doesn't autofix

dkent600 opened this issue ยท 6 comments

autofix/sort-imports reports error but doesn't autofix.

the rule:

"autofix/sort-imports": ["error", {
          "ignoreCase": true,
          "ignoreMemberSort": false,
          "memberSyntaxSortOrder": ["none", "all", "single", "multiple"]
        }]

the imports:

import { DAO, IProposalCreateOptions, IProposalOutcome, ITransactionState, ITransactionUpdate } from "@daostack/client";
import { IAsyncAction } from "actions/async";
import { getArc } from "arc";
import { toWei } from "lib/util";
import { IRedemptionState } from "reducers/arcReducer";
import { IRootState } from "reducers/index";
import { NotificationStatus, showNotification } from "reducers/notifications";
import { Dispatch } from "redux";
import * as Redux from "redux";
import { ThunkAction } from "redux-thunk";

This is a .tsx file, where the AST is being generated by https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser

.eslintrc is attached

.eslintrc.zip

Hi @dkent600 , you can consider eslint-plugin-import.

I could, but isn't this what eslint-plugin-autofix claims to do?

@g-plane eslint-plugin-import works, thanks for the suggestion

Why is this rule included in "autofix" if it's not fixed? Pretty frustrating.

IMO, it should be fixed.

False advertising lol