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
Add the following code to rules
:
"rules": {
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
]
}
airbnb
ESLint config leads the problem.
Add this to rules
in your eslint config:
"rules": {
"import/extensions": "off"
}
This disables the rule, since airbnb
's config enables it.