MERGE! #13

Merged
N0tAI merged 3 commits from main into dev 2026-04-03 04:22:51 +00:00
N0tAI commented 2026-04-03 04:22:25 +00:00 (Migrated from github.com)
No description provided.
gemini-code-assist[bot] (Migrated from github.com) reviewed 2026-04-03 04:24:35 +00:00
gemini-code-assist[bot] (Migrated from github.com) left a comment

Code Review

This pull request introduces Biome as the project's linter and formatter, resulting in widespread formatting changes—primarily switching from spaces to tabs—across the codebase. It adds a biome.json configuration file, updates package.json with linting and formatting scripts, and includes the Biome VS Code extension recommendation. Review feedback highlights a significant issue in src/components/keyword.astro where a resize event listener is added to the window object every time a page loads, which will lead to memory leaks when using View Transitions. Additionally, the biome.json file contains incorrect configuration keys and non-standard glob patterns that require correction.

## Code Review This pull request introduces Biome as the project's linter and formatter, resulting in widespread formatting changes—primarily switching from spaces to tabs—across the codebase. It adds a `biome.json` configuration file, updates `package.json` with linting and formatting scripts, and includes the Biome VS Code extension recommendation. Review feedback highlights a significant issue in `src/components/keyword.astro` where a `resize` event listener is added to the `window` object every time a page loads, which will lead to memory leaks when using View Transitions. Additionally, the `biome.json` file contains incorrect configuration keys and non-standard glob patterns that require correction.
gemini-code-assist[bot] (Migrated from github.com) commented 2026-04-03 04:24:35 +00:00

medium

The configuration key includes is incorrect; Biome uses include (singular). Additionally, the !! prefix is not a standard way to exclude files in Biome globs. Exclusions should be defined in the ignore field. Note that dist and .astro are typically ignored by default if they are listed in your .gitignore and vcs.useIgnoreFile is enabled.

		"include": ["**"],
		"ignore": ["dist", ".astro"]
![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg) The configuration key `includes` is incorrect; Biome uses `include` (singular). Additionally, the `!!` prefix is not a standard way to exclude files in Biome globs. Exclusions should be defined in the `ignore` field. Note that `dist` and `.astro` are typically ignored by default if they are listed in your `.gitignore` and `vcs.useIgnoreFile` is enabled. ```json "include": ["**"], "ignore": ["dist", ".astro"] ```
gemini-code-assist[bot] (Migrated from github.com) commented 2026-04-03 04:24:35 +00:00

high

This resize event listener is being added to the window object every time initKeywords is called. Because initKeywords is triggered by the astro:page-load event (which fires on every navigation when using View Transitions), multiple redundant listeners will accumulate on the window object. This leads to memory leaks and performance degradation.

Furthermore, initKeywords is called both directly (line 152) and via the event listener (line 154), causing it to run twice on the initial page load.

Additionally, line 145 uses spaces for indentation while the rest of the block uses tabs, which is inconsistent with the project's move to tabs.

Recommendation: Move the window resize listener outside of the initKeywords function so it is only registered once when the script module loads, and have it query the current keywords dynamically.

![high](https://www.gstatic.com/codereviewagent/high-priority.svg) This `resize` event listener is being added to the `window` object every time `initKeywords` is called. Because `initKeywords` is triggered by the `astro:page-load` event (which fires on every navigation when using View Transitions), multiple redundant listeners will accumulate on the `window` object. This leads to memory leaks and performance degradation. Furthermore, `initKeywords` is called both directly (line 152) and via the event listener (line 154), causing it to run twice on the initial page load. Additionally, line 145 uses spaces for indentation while the rest of the block uses tabs, which is inconsistent with the project's move to tabs. **Recommendation:** Move the `window` resize listener outside of the `initKeywords` function so it is only registered once when the script module loads, and have it query the current keywords dynamically.
Sign in to join this conversation.
No description provided.