Skip to content

Linter: Implement source-indentation rule#1444

Merged
marcoroth merged 6 commits intomarcoroth:mainfrom
markokajzer:marko/spaceindentation
Mar 22, 2026
Merged

Linter: Implement source-indentation rule#1444
marcoroth merged 6 commits intomarcoroth:mainfrom
markokajzer:marko/spaceindentation

Conversation

@markokajzer
Copy link
Contributor

@markokajzer markokajzer commented Mar 21, 2026

closes #548

I added an autofix in a separate commit because I wasn't sure about the implementation. The formatter provides an indentWidth config 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.

@markokajzer markokajzer force-pushed the marko/spaceindentation branch from f87205c to 4eb4ce0 Compare March 21, 2026 12:17
Signed-off-by: Marco Roth <marco.roth@intergga.ch>
@marcoroth marcoroth changed the title Linter: Implement erb-space-indentation rule Linter: Implement source-space-indentation rule Mar 22, 2026
Copy link
Owner

@marcoroth marcoroth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 🙌🏼

@marcoroth
Copy link
Owner

Hmm, I wonder if we should call it just source-indentation so that we could also support something like style: "tabs" at a later point 🤔

@marcoroth marcoroth changed the title Linter: Implement source-space-indentation rule Linter: Implement source-indentation rule Mar 22, 2026
@marcoroth marcoroth merged commit cf9ac07 into marcoroth:main Mar 22, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

erb-lint: SpaceIndentation

2 participants