Typescript eslint - Missing file extension “ts” import/extensions

前端 未结 2 2000
孤城傲影
孤城傲影 2021-02-03 16:38

I have a simple Node/Express app made with Typescript. And eslint give me the error

Missing file extension "ts" for "./lib/env" import/extensi         


        
2条回答
  •  半阙折子戏
    2021-02-03 17:40

    Add this to rules in your eslint config:

    "rules": {
      "import/extensions": "off"
    }
    

    This disables the rule, since airbnb's config enables it.

提交回复
热议问题