Making a React Native app with expo/typescript and since I’m working in a team I want to disable use of type:any since it happened a couple of times someone puts it and forgets to remove it and it doesn’t end well usually
{
"extends": "expo/tsconfig.base",
"compilerOptions": {
"strict": true,
"strictNullChecks": true,
"noUncheckedIndexedAccess": true,
"noImplicitAny": true,
"allowUnreachableCode": false,
"strictFunctionTypes": true,
},
}
This is my current tsconfig.json
2
Answers
You’ll need the
no-explicit-any
fromtypescript-eslint
!The basic ts setting doesn’t have that option.
TypeScript itself doesn’t have a setting for that, but
typescript-eslint
has one:no-explicit-any
.