chore(repo): introduce HTML eslint config #DS-2492#2558
chore(repo): introduce HTML eslint config #DS-2492#2558
Conversation
✅ Deploy Preview for spirit-design-system-docsite ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for spirit-design-system ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for spirit-design-system-storybook canceled.
|
configs/eslint-html-spirit/index.mjs
Outdated
There was a problem hiding this comment.
suggestion(blocking): Please, create this configuration the same way as style.js - https://github.com/alma-oss/spirit-design-system/blob/main/configs/eslint-config-spirit/style.js. In this case html.js.
configs/eslint-html-spirit/index.mjs
Outdated
| templateEngineSyntax: TEMPLATE_ENGINE_SYNTAX.HANDLEBAR, | ||
| }, | ||
| }, | ||
| rules: { |
There was a problem hiding this comment.
suggestion(non-blocking): It would be nice to add a reference to the rules documentation and describe why - https://github.com/yeonjuan/html-eslint/tree/main/docs/rules.
configs/eslint-html-spirit/index.mjs
Outdated
There was a problem hiding this comment.
suggestion(blocking): Please, use your agents and create a test for this file. You can take inspiration from: yeonjuan/html-eslint@main/packages/eslint-plugin/tests/rules/no-accesskey-attrs.test.js.
configs/eslint-html-spirit/index.mjs
Outdated
There was a problem hiding this comment.
suggestion(if-minor): Please, generate a style guide based on this and add it to the README.md of this config or to the developer's guide. Here is an example how it can be done: https://github.com/carbon-design-system/carbon/blob/main/docs/developer-handbook.md#coding-style
3e18ec2 to
6ec08bd
Compare
There was a problem hiding this comment.
Code Review: chore/html-eslint
Scope: 1 commit, 60 files (+5506 / -1996)
- Introduces a new shareable HTML ESLint flat config at
eslint-config-spirit/htmlwith Handlebars template support and project-specific rule tuning. - Updates
packages/webandpackages/web-reactESLint flat configs so legacy JS/TS shareable configs are scoped to JS/TS files, and HTML files are linted via the new HTML config. - Applies broad HTML lint normalization across component/helper demo templates; semantic deltas appear intentionally limited to duplicate
class-attribute cleanup in a few snippets.
Findings
No actionable findings identified in the changed scope across security, bugs, silent failures, tests, types, simplification, or project-guideline compliance.
Review Summary
| Label | Count |
|---|---|
| praise | 1 |
Verdict
APPROVE
praise (non-blocking): The rollout cleanly separates JS/TS and HTML linting responsibilities while keeping behavioral impact low.
Why: Introducing HTML linting in a dedicated shared config and scoping legacy configs reduces cross-language lint noise and makes future maintenance much clearer.
Sent by Cursor Automation: Spirit Cursor Code Review
| "version": "0.1.7", | ||
| "private": true, | ||
| "type": "commonjs", | ||
| "exports": { |


Description
Additional context
Issue reference