Skip to content

Taking indent setting from tslint.json #20

@myitcv

Description

@myitcv

Unfortunately the current sample tslint.json for tslint incorrectly suggests the format for the indent rule is:

[true, 4]

However, the code that parses the setting expects the format to be:

[true, "spaces"]

There isn't even an option for a number in the final position (even though that seems quite sensible).

I've raised a pull request to fix the sample.

However this presents a problem for tsfmt, specifically here.

This means:

  • with a setting of [true, 4], tsfmt correct indents code but tslint fails to apply the indent linting rule
  • with a setting of [true, "spaces"], tsfmt removes all indenting but tslint correctly applies the indent linting rule

My suggestion would be that we drop the parsing of the indent rule from tslint.json.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions