Linter: Implement source-indentation rule#1444
Merged
marcoroth merged 6 commits intomarcoroth:mainfrom Mar 22, 2026
Merged
Conversation
f87205c to
4eb4ce0
Compare
Signed-off-by: Marco Roth <marco.roth@intergga.ch>
erb-space-indentation rulesource-space-indentation rule
marcoroth
approved these changes
Mar 22, 2026
Owner
marcoroth
left a comment
There was a problem hiding this comment.
Thank you @markokajzer (and sorry for pushing to your branch again) 🙈
I just merged in main and updated the rule to work with the changes from #1453.
Also renamed it to source-* to make sure we already align them (similar to #1359 and #1310), so we don't have to rename them later 🙌🏼
Owner
|
Hmm, I wonder if we should call it just |
source-space-indentation rulesource-indentation rule
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
closes #548
I added an autofix in a separate commit because I wasn't sure about the implementation. The formatter provides an
indentWidthconfig option, and optimally we would want to use the same configured value without having to specify a separate value for each rule that needs it.To do this, I added some plumbing in the linter, to pipe the config from the formatter to all rules. If this is not what we want, we can simply drop/undo the specific commit.
another option is to wait for custom per-rule configuration options, see #1204.
we could also hardcode the configuration, e.g. to 2m, until then, similar to what we did with
html-allowed-script-type, see #1201.