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 prsOverview
The TSLint
alignconverter maps rule arguments to the equivalent options for@typescript-eslint-indentrule 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/indentsince two TSLint rules are mapped to it:alignandindent.There is a small issue where the object option cannot be supplied without the indent size option. This is a problem since TSLint's
alignrule does not concern itself with the indent size. I decided to specify the default indent size of4when converting the indent rule. Correspondingly, theindentmerger ignores indent size values of4when merging rules.Docs:
TSLint
align@typescript-eslint/indent