Skip to content

variable-name generates naming-convention #1225

Closed
@benjaminpjones

Description

@benjaminpjones

🐛 Bug Report

  • tslint-to-eslint-config version: 2.10.0
  • ESLint version: N/A
  • Node version: v14.17.6

Actual Behavior

Running tslint-to-eslint-config on a tslint.json file with a variable-name rule, but no "check-format" option:

{
    "rules": {
        "variable-name": [true, "ban-keywords"]
    }
}

Outputs an .eslintrc.js file with a default naming-convention rule (without a selector).

{
    ...
    "rules": {
        "@typescript-eslint/naming-convention": "error",
        "id-denylist": [
            "error",
            "any",
            "Number",
            "number",
            "String",
            "string",
            "Boolean",
            "boolean",
            "Undefined",
            "undefined"
        ],
        "id-match": "error",
        "no-underscore-dangle": "error"
    }
}

Expected Behavior

I would expect this rule to only output the id-denylist rule, or at worst output a naming-convention rule with the variable selector as seems to be specified in the unit test.

Reproduction

Minimal reproducible example repo
Real life repo - Running eslint with a tslint-to-eslint-config-generated .eslintrc.js generates a ton of new naming-convention errors, which I think can be avoided.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: incorrect converterRule converter with incomplete, incorrect, or invalid rule names and/or argumentsstatus: accepting prsPlease, send in a PR to resolve this! ✨type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions