Add align rule converter + indent merger #248
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Checklist
status: accepting prs
Overview
The TSLint
align
converter maps rule arguments to the equivalent options for@typescript-eslint-indent
rule supporting the "first" option, which aligns all parameters / arguments / elements / properties with the first one in each declaration.Next, a merger is required for the
@typescript-eslint/indent
since two TSLint rules are mapped to it:align
andindent
.There is a small issue where the object option cannot be supplied without the indent size option. This is a problem since TSLint's
align
rule does not concern itself with the indent size. I decided to specify the default indent size of4
when converting the indent rule. Correspondingly, theindent
merger ignores indent size values of4
when merging rules.Docs:
TSLint
align
@typescript-eslint/indent