Skip to content

[ban-types] Default options are never removed #686

@OliverJAsh

Description

@OliverJAsh

Repro

module.exports = {
    parser: '@typescript-eslint/parser',
    plugins: ['@typescript-eslint'],
    rules: {
        '@typescript-eslint/ban-types': [
            'error',
            {
                types: {
                    Omit: 'Prefer `OmitStrict`.',
                },
            },
        ],
    },
};
// Don't use 'Object' as a type. Use Record<string, any> instead
type Foo1 = Object;
// Don't use 'Boolean' as a type. Use boolean instead
type Foo2 = Boolean;
// Don't use 'Number' as a type. Use number instead
type Foo3 = Number;

Expected Result
No errors, because I am overriding the default options.

Actual Result
Each line errors. It is not possible to disable the default options.

Additional Info

Versions

package version
@typescript-eslint/eslint-plugin 1.11.0
@typescript-eslint/parser 1.11.0
TypeScript 3.5.2
ESLint 6.0.1
node 8.15.1
npm 6.9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions