Skip to content
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

variable-name generates naming-convention #1225

Closed
benjaminpjones opened this issue Sep 21, 2021 · 1 comment · Fixed by #1565
Closed

variable-name generates naming-convention #1225

benjaminpjones opened this issue Sep 21, 2021 · 1 comment · Fixed by #1565
Labels
area: incorrect converter Rule converter with incomplete, incorrect, or invalid rule names and/or arguments status: accepting prs Please, send in a PR to resolve this! ✨ type: bug Something isn't working

Comments

@benjaminpjones
Copy link

🐛 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.

@benjaminpjones
Copy link
Author

I'm curious if this is related to #1207 there seems to be some spooky action at a distance!

@JoshuaKGoldberg JoshuaKGoldberg added area: incorrect converter Rule converter with incomplete, incorrect, or invalid rule names and/or arguments status: accepting prs Please, send in a PR to resolve this! ✨ type: bug Something isn't working labels Oct 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: incorrect converter Rule converter with incomplete, incorrect, or invalid rule names and/or arguments status: accepting prs Please, send in a PR to resolve this! ✨ type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants