Skip to content

Linter: Implement turbo-permanent-require-id rule#1229

Merged
marcoroth merged 5 commits intomarcoroth:mainfrom
pardeyke:main
Mar 1, 2026
Merged

Linter: Implement turbo-permanent-require-id rule#1229
marcoroth merged 5 commits intomarcoroth:mainfrom
pardeyke:main

Conversation

@pardeyke
Copy link
Contributor

@pardeyke pardeyke changed the title added TurboPermanentRequireIdRule Linter: added TurboPermanentRequireIdRule Feb 22, 2026
@marcoroth
Copy link
Owner

Hey @pardeyke, thanks for working on this!

We have been waiting on adding Turbo-related rules to the main Herb Linter, similar to how we extracted the Stimulus-related rules to stimulus-lint.

The pull request #677 implements a similar rule and a turbo-lint package, but sadly the name is not available anymore. Ideally, we could work on adding a plugin system to the Herb Linter, where NPM packages can provide a plugin with a set of linter rules.

Maybe the stimulus-* and turbo-* rules and/or plugins could be built-in to start with. Would you mind renaming the rule to turbo-permanent-require-id so we have the rules "scoped" by the first part of the rule name. Thank you!

@pardeyke
Copy link
Contributor Author

Im not sure if I get what you mean. The rule is names HTMLTurboPermanentRequireId. Do you want me to remove the HTML part?

@marcoroth
Copy link
Owner

marcoroth commented Feb 23, 2026

Yeah, so it's kind of implicitly "scoped" to a turbo-* namespace and that we can later extract it to its own plugin/package.

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.

Hey @pardeyke, looks we got two rules and two test files, would you mind removing the html-* one too?

Can we also add a docs page in javascript/packages/linter/docs/rules/* as well as short mention in the javascript/packages/linter/docs/rules/README.md to align with the other rules?

Thank you!

@marcoroth marcoroth changed the title Linter: added TurboPermanentRequireIdRule Linter: Implement turbo-permanent-require-id rule Feb 25, 2026
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Feb 25, 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 @pardeyke! 🙏🏼

@marcoroth marcoroth merged commit ebeeb5c into marcoroth:main Mar 1, 2026
12 checks passed
@brunoprietog
Copy link

Hi, sorry for being late to this, but this is not strictly true when used with page refreshes and morphing, where the ID is not required in elements with data-turbo-permanent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation linter linter-rule typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants