Skip to content

@typescript-eslint/ban-types object not being handled. #1135

Closed
@goldingdamien

Description

@goldingdamien

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

function test(a: object) {
    console.log(a)
}

function test1(a: Object) {
    console.log(a)
}

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

package version
@typescript-eslint/eslint-plugin 2.0.0
@typescript-eslint/parser 2.0.0
TypeScript 3.5.3
ESLint `6.1.0
node `12.1.0
npm 6.4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: eslint-pluginIssues related to @typescript-eslint/eslint-plugintriageWaiting for team members to take a look

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions