-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
@typescript-eslint/ban-types object not being handled. #1135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
See #848 The default configuration does not include handling for If you don't like the default suggestion for |
Sorry, what do you mean by "configure it yourself"?
Regards. |
Example, the default config: typescript-eslint/packages/eslint-plugin/src/rules/ban-types.ts Lines 84 to 107 in 1508670
The docs you linked provide other examples of valid config:
|
Config is basically the same as this example but using "object" as well as other examples.
https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/ban-types.md
Expected Result
Both object and Object show an error.
I'd actually expect any word regardless of case, defaults or anything else that may be the cause to work.
Actual Result
Don't use 'Object' as a type. Use Record<string, any> instead @typescript-eslint/ban-types
Additional Info
No errors. Debug output shows nothing relevant.
Versions
@typescript-eslint/eslint-plugin
2.0.0
@typescript-eslint/parser
2.0.0
TypeScript
3.5.3
ESLint
node
npm
6.4.1
The text was updated successfully, but these errors were encountered: