Skip to content

Add notice instead of logging missing rules for external code analyzerΒ #315

@KingDarBoja

Description

@KingDarBoja

πŸš€ Feature Request

Following #151 example, if you try to convert TSLint rules into ESLint ones for some projects that make use of external static code analyzer like as Elm language client VSCode, you will see a long tslint-to-eslint-config.log file whose content is the following:

arguments-order does not yet have an ESLint equivalent.
bool-param-default does not yet have an ESLint equivalent.
cognitive-complexity does not yet have an ESLint equivalent.
consecutive-overloads does not yet have an ESLint equivalent.
jsdoc-format does not yet have an ESLint equivalent.
max-switch-cases does not yet have an ESLint equivalent.
max-union-size does not yet have an ESLint equivalent.
no-accessor-field-mismatch does not yet have an ESLint equivalent.
no-all-duplicated-branches does not yet have an ESLint equivalent.
no-alphabetical-sort does not yet have an ESLint equivalent.
no-array-delete does not yet have an ESLint equivalent.
no-big-function does not yet have an ESLint equivalent.
no-case-with-or does not yet have an ESLint equivalent.
no-collapsible-if does not yet have an ESLint equivalent.
no-collection-size-mischeck does not yet have an ESLint equivalent.
no-commented-code does not yet have an ESLint equivalent.
no-dead-store does not yet have an ESLint equivalent.
no-duplicate-in-composite does not yet have an ESLint equivalent.
no-duplicate-string does not yet have an ESLint equivalent.
no-duplicated-branches does not yet have an ESLint equivalent.
no-element-overwrite does not yet have an ESLint equivalent.
no-empty-array does not yet have an ESLint equivalent.
no-empty-destructuring does not yet have an ESLint equivalent.
no-extra-semicolon does not yet have an ESLint equivalent.
no-gratuitous-expressions does not yet have an ESLint equivalent.
no-hardcoded-credentials does not yet have an ESLint equivalent.
no-identical-conditions does not yet have an ESLint equivalent.
no-identical-expressions does not yet have an ESLint equivalent.
no-identical-functions does not yet have an ESLint equivalent.
no-ignored-initial-value does not yet have an ESLint equivalent.
no-ignored-return does not yet have an ESLint equivalent.
no-in-misuse does not yet have an ESLint equivalent.
no-invalid-await does not yet have an ESLint equivalent.
no-invariant-return does not yet have an ESLint equivalent.
no-inverted-boolean-check does not yet have an ESLint equivalent.
no-misleading-array-reverse does not yet have an ESLint equivalent.
no-misspelled-operator does not yet have an ESLint equivalent.
no-multiline-string-literals does not yet have an ESLint equivalent.
no-nested-switch does not yet have an ESLint equivalent.
no-nested-template-literals does not yet have an ESLint equivalent.
no-redundant-boolean does not yet have an ESLint equivalent.
no-redundant-jump does not yet have an ESLint equivalent.
no-redundant-parentheses does not yet have an ESLint equivalent.
no-reference-import does not yet have an ESLint equivalent.
no-return-type-any does not yet have an ESLint equivalent.
no-same-line-conditional does not yet have an ESLint equivalent.
no-self-assignment does not yet have an ESLint equivalent.
no-small-switch does not yet have an ESLint equivalent.
no-statements-same-line does not yet have an ESLint equivalent.
no-try-promise does not yet have an ESLint equivalent.
no-unconditional-jump does not yet have an ESLint equivalent.
no-undefined-argument does not yet have an ESLint equivalent.
no-unenclosed-multiline-block does not yet have an ESLint equivalent.
no-unthrown-error does not yet have an ESLint equivalent.
no-unused-array does not yet have an ESLint equivalent.
no-use-of-empty-return-value does not yet have an ESLint equivalent.
no-useless-cast does not yet have an ESLint equivalent.
no-useless-catch does not yet have an ESLint equivalent.
no-useless-increment does not yet have an ESLint equivalent.
no-useless-intersection does not yet have an ESLint equivalent.
no-variable-usage-before-declaration does not yet have an ESLint equivalent.
object-literal-sort-keys does not yet have an ESLint equivalent.
parameters-max-number does not yet have an ESLint equivalent.
prefer-default-last does not yet have an ESLint equivalent.
prefer-immediate-return does not yet have an ESLint equivalent.
prefer-optional does not yet have an ESLint equivalent.
prefer-promise-shorthand does not yet have an ESLint equivalent.
prefer-type-guard does not yet have an ESLint equivalent.
prettier does not yet have an ESLint equivalent.
use-primitive-type does not yet have an ESLint equivalent.
use-type-alias does not yet have an ESLint equivalent.
editor.insertSpaces does not yet have an ESLint equivalent.
editor.tabSize does not yet have an ESLint equivalent.

As you can check at the source code, the tslint.json extends from tslint-sonarts, which is another static code analyzer for Typescript. The rule list can be found at readme at SonarTS repo.

Existing Behavior

The above log file is being generated with tons of rules that are not supported by ESLint.

Change Proposal

Provide a notice which states external code analyzer are not supported by ESLint.

I am not sure if this should be of concern but I had to bring int into discussion.

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions