Skip to content

Missing ESLint rule disable in @typescript-eslint rule converter(s) #1091

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

Closed
Res42 opened this issue May 23, 2021 · 3 comments · Fixed by #1093
Closed

Missing ESLint rule disable in @typescript-eslint rule converter(s) #1091

Res42 opened this issue May 23, 2021 · 3 comments · Fixed by #1093
Labels
area: incorrect converter Rule converter with incomplete, incorrect, or invalid rule names and/or arguments good first issue Good for newcomers; welcome aboard! status: accepting prs Please, send in a PR to resolve this! ✨

Comments

@Res42
Copy link
Contributor

Res42 commented May 23, 2021

🐛 Bug Report

  • tslint-to-eslint-config version: 2.4.2
  • ESLint version: -
  • Node version: -

Actual Behavior

This issue was created according to this comment: #1085 (comment).

There are @typescript-eslint/... rules that require to turn off their ESLint counterpart like this:

{
  // note you must disable the base rule as it can report incorrect errors
  "no-use-before-define": "off",
  "@typescript-eslint/no-use-before-define": ["error"]
}

Source: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md

In the rule convertNoUseBeforeDeclare this is not disabled.

Also I think it would be good to check all @typescript-eslint rule converters for this type of bug.

Expected Behavior

@typescript-eslint rule converters that require to turn off their ESLint rule counterpart actually turn them off.

@JoshuaKGoldberg JoshuaKGoldberg added area: incorrect converter Rule converter with incomplete, incorrect, or invalid rule names and/or arguments good first issue Good for newcomers; welcome aboard! status: accepting prs Please, send in a PR to resolve this! ✨ labels May 23, 2021
@Res42 Res42 changed the title Mssing ESLint rule disable in @typescript-eslint rule converter(s) Missing ESLint rule disable in @typescript-eslint rule converter(s) May 23, 2021
@Res42
Copy link
Contributor Author

Res42 commented May 23, 2021

These are the rules @typescript-eslint requires to be disabled.
Source: https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin/docs/rules

@typescript-eslint rule ESLint rule
@typescript-eslint/brace-style brace-style
@typescript-eslint/comma-dangle comma-dangle
@typescript-eslint/comma-spacing comma-spacing
@typescript-eslint/default-param-last default-param-last
@typescript-eslint/dot-notation dot-notation
@typescript-eslint/func-call-spacing func-call-spacing
@typescript-eslint/indent indent
@typescript-eslint/init-declarations init-declarations
@typescript-eslint/keyword-spacing keyword-spacing
@typescript-eslint/lines-between-class-members lines-between-class-members
@typescript-eslint/no-array-constructor no-array-constructor
@typescript-eslint/no-dupe-class-members no-dupe-class-members
@typescript-eslint/no-duplicate-imports no-duplicate-imports
@typescript-eslint/no-empty-function no-empty-function
@typescript-eslint/no-extra-parens no-extra-parens
@typescript-eslint/no-extra-semi no-extra-semi
@typescript-eslint/no-invalid-this no-invalid-this
@typescript-eslint/no-loop-func no-loop-func
@typescript-eslint/no-loss-of-precision no-loss-of-precision
@typescript-eslint/no-magic-numbers no-magic-numbers
@typescript-eslint/no-redeclare no-redeclare
@typescript-eslint/no-shadow no-shadow
@typescript-eslint/no-throw-literal no-throw-literal
@typescript-eslint/no-unused-expressions no-unused-expressions
@typescript-eslint/no-unused-vars no-unused-vars
@typescript-eslint/no-use-before-define no-use-before-define
@typescript-eslint/no-useless-constructor no-useless-constructor
@typescript-eslint/object-curly-spacing object-curly-spacing
@typescript-eslint/quotes quotes
@typescript-eslint/require-await require-await
@typescript-eslint/return-await no-return-await
@typescript-eslint/semi semi
@typescript-eslint/space-before-function-paren space-before-function-paren
@typescript-eslint/space-infix-ops space-infix-ops

@Res42
Copy link
Contributor Author

Res42 commented May 25, 2021

A more authorative list can be found here https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/README.md#extension-rules.

@KingDarBoja
Copy link
Collaborator

Didn't know there was a list for these rules, glad you shared it 🚀

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 good first issue Good for newcomers; welcome aboard! status: accepting prs Please, send in a PR to resolve this! ✨
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants