Skip to content

build: Added linting and formatting setup to the repository#101

Merged
dobromirts merged 6 commits into
masterfrom
rkaraivanov/add-linting-and-formatting
Jul 21, 2026
Merged

build: Added linting and formatting setup to the repository#101
dobromirts merged 6 commits into
masterfrom
rkaraivanov/add-linting-and-formatting

Conversation

@rkaraivanov

@rkaraivanov rkaraivanov commented Jul 1, 2026

Copy link
Copy Markdown
Member

Set up oxlint for linting, Prettier + prettier-plugin-astro for formatting, and husky + lint-staged to enforce both on commit. Also fixes the resulting lint errors and pre-existing playground type-check errors (astro check).

The commented-out reference was an invalid HTML comment inside a JS expression, which caused a hard parse error in prettier-plugin-astro (though the Astro compiler tolerated it). The component and its import were unused, so both are removed.

  • DocsSubHeader.astro: wrap adjacent igc-select/igc-tooltip siblings in a fragment (invalid unwrapped adjacent JSX elements).
  • SidebarLabel.astro: remove dead commented-out child-count span (invalid HTML comment inside a JS expression) and its now-unused childCount variable.
  • DocsTreeItem.astro: convert an HTML comment inside a JS expression to a valid JSX comment.

These were undetected because oxlint only lints <script> blocks in .astro files and the Astro compiler tolerates them, but they broke prettier-plugin-astro's parser.

Repo-wide formatting pass using the newly added Prettier + prettier-plugin-astro setup. This commit is listed in .git-blame-ignore-revs.

Closes #89

rkaraivanov and others added 5 commits July 1, 2026 13:02
Set up oxlint for linting, Prettier + prettier-plugin-astro for formatting, and husky + lint-staged to enforce both on commit. Also fixes the resulting lint errors and pre-existing playground type-check errors (astro check).
The commented-out <MobileSidebarToggle/> reference was an invalid HTML comment inside a JS expression, which caused a hard parse error in prettier-plugin-astro (though the Astro compiler tolerated it). The component and its import were unused, so both are removed.
- DocsSubHeader.astro: wrap adjacent igc-select/igc-tooltip siblings in a fragment (invalid unwrapped adjacent JSX elements).
- SidebarLabel.astro: remove dead commented-out child-count span (invalid HTML comment inside a JS expression) and its now-unused childCount variable.
- DocsTreeItem.astro: convert an HTML comment inside a JS expression to a valid JSX comment.

These were undetected because oxlint only lints <script> blocks in .astro files and the Astro compiler tolerates them, but they broke prettier-plugin-astro's parser.
Repo-wide formatting pass using the newly added Prettier + prettier-plugin-astro setup. No functional changes. This commit is listed in .git-blame-ignore-revs.
Adds .git-blame-ignore-revs referencing the Prettier reformatting commit (771d566) so it doesn't obscure real history in git blame / GitHub blame view.
Comment thread playground/src/pages/styles/text-elements.mdx
Comment thread .git-blame-ignore-revs
@dobromirts
dobromirts merged commit 3b372aa into master Jul 21, 2026
3 checks passed
@dobromirts
dobromirts deleted the rkaraivanov/add-linting-and-formatting branch July 21, 2026 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add repository wide linting and formatting strategy

2 participants