typescript-eslint / tslint-to-eslint-config

Converts your TSLint configuration to the closest possible ESLint equivalent. πŸš€

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Res42 opened this issue Β· comments

πŸ› 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.

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

Didn't know there was a list for these rules, glad you shared it πŸš€