Skip to content

Comments should be informed by config rule conversions #427

Closed
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

🐛 Bug Report

  • tslint-to-eslint-config version: 1.0.0-beta
  • ESLint version: N/A
  • Node version: N/A

Actual Behavior

Right now, comments are generated by directly running rule converters on rule names found in those comments without any rule arguments. If a converter can output different ESLint rules based on rule arguments, that logic will be ignored. That's a bug.

Expected Behavior

We should store the rule conversion results done in the config conversion logic, then pass that to comment conversion logic.

Reproduction

Roughly:

  1. Create a tslint.json with a TSLint rule whose converter can output different ESLint rules, such as "comment-format": [true, "check-space"]
  2. Add an // tslint:disable: comment-format in a line of source code
  3. Run tslint-to-eslint-config --comments file.ts

The comment should disable the rules output by the TSLint's rule factoring in its tslint.json rule arguments

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions