Search code examples
typescripteslintcreate-react-app

how to delete create react app typescript ordering imports rule


I'm a newbie in create react app typescript version and I was wondering to ask how can I disable the ordering import :((

I've been trying to set false different attributes in both tsconfig.json and tslint.json

I would appreciate your help.


Solution

  • You must edit tslint.json and disable ordered-imports rule as follows:

    {
        "extends": ["tslint:recommended", "tslint-react", "tslint-config-prettier"],
        "rules": {
          "ordered-imports": false
        },
        "linterOptions": {
          "exclude": [
            "config/**/*.js",
            "node_modules/**/*.ts"
          ]
        }
    }