feat(ci): add linting job to CI workflow and update contributing docs - #146
Conversation
📝 WalkthroughWalkthroughAdds a CI lint job and conditional script validation to GitHub Actions, adds editorconfig-checker config and local lint/format docs, introduces format check scripts and C++ check mode, and applies widespread stylistic and documentation edits. No runtime behavior changes beyond CI control flow. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant PR as Pull Request / Push
participant GH as GitHub Actions
participant Repo as Repository (checkout)
participant Node as Node/npm runner
participant ESLint as ESLint
participant EChecker as editorconfig-checker
participant Commenter as PR Comment Action
note over GH,Repo: Workflows trigger on pull_request and push->main
PR->>GH: open PR / push
GH->>Repo: actions/checkout
GH->>Node: setup-node (v22) & npm cache
GH->>Node: npm ci
alt Lint job runs
GH->>ESLint: npm run lint
ESLint-->>GH: results (pass/fail)
GH->>EChecker: npm run lint:style
EChecker-->>GH: results (pass/fail)
alt lint fails
GH->>Commenter: post failure comment (optional)
end
end
alt Validate-scripts job runs
GH->>Repo: check_changes step -> determine scripts_changed
Repo-->>GH: scripts_changed = true/false
alt scripts_changed == true
GH->>Node: npm run validate-scripts
Node-->>GH: validation results
alt validate fails
GH->>Commenter: post script-validation comment
end
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
Pre-merge checks❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
10e7d6f to
c851cc2
Compare
There was a problem hiding this comment.
Thank you very much for your contribution!!🦔
Everything looks great and the only problems I found were caused by my own mistake, and I'm sorry for that.
Please will you implement the changes I requested. I'll merge it once that has been done - please just make sure to add sufficient information about the code.
…dback - Simplify root CONTRIBUTING.md and link to detailed docs - Add comprehensive linting section to coding-style.md - Create new ci-workflows.md documenting GitHub Actions workflows - Update Questions section to link to discussions/issues instead of draft PRs Addresses review feedback from @Ryan-Millard in Ryan-Millard#146
c851cc2 to
ff9db12
Compare
|
@Ryan-Millard I've addressed your feedback! Changes made:
The documentation is now properly organized in the docs site where contributors can easily find it. Let me know if you'd like any adjustments! |
Ryan-Millard
left a comment
There was a problem hiding this comment.
Hi @LostSkyWalker-1401! I'm sorry for not submitting my review for this PR sooner - I reviewed it on 23 December but must have forgotten to submit my review.😂
This PR doesn't require too much more - just 3 changes with the biggest one being the resolution of the conflicts between the current linting setup and clang-format. I think they both enforce different rules, which causes the problem.
- Fix line endings (CRLF -> LF) in all modified files - Add final newlines to ci.yml, CONTRIBUTING.md, and docs files - Fix indentation in markdown numbered lists - Add sidebar_position: 2 to ci-workflows.md Addresses feedback from @Ryan-Millard in Ryan-Millard#146
|
@Ryan-Millard I've addressed the remaining feedback:
All files in this PR now pass |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
docs/docs/reference/tools/ci-workflows.md (1)
83-86: Fix inconsistent indentation in code block.The commands inside the code block have extra leading spaces that don't match the surrounding examples.
🔎 Proposed fix
**Solutions**: 1. Run the failing command locally: ```bash - npm run lint # for ESLint errors - npm run lint:style # for style errors + npm run lint # for ESLint errors + npm run lint:style # for style errors ```
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
.github/workflows/ci.ymlCONTRIBUTING.mddocs/docs/guidelines/CONTRIBUTING.mddocs/docs/guidelines/coding-style.mddocs/docs/reference/tools/ci-workflows.mdt this comment on the PR
✅ Files skipped from review due to trivial changes (2)
- docs/docs/guidelines/CONTRIBUTING.md
- t this comment on the PR
🧰 Additional context used
🧠 Learnings (5)
📚 Learning: 2025-12-20T20:11:28.422Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-20T20:11:28.422Z
Learning: In the Img2Num repository, all documentation should be properly organized in the docs/docs/ folder structure following the Docusaurus conventions, either as a dedicated category or integrated into existing categories like project-scripts.
Applied to files:
CONTRIBUTING.mddocs/docs/reference/tools/ci-workflows.md
📚 Learning: 2025-12-17T22:39:25.711Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-17T22:39:25.711Z
Learning: In the Img2Num repository, all documentation must be placed in the docs/docs/ folder following the Docusaurus structure, not at the repository root.
Applied to files:
CONTRIBUTING.md
📚 Learning: 2025-12-17T22:39:25.711Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-17T22:39:25.711Z
Learning: In the Img2Num repository, do not create multiple markdown files at the repository root. The README.md at root should remain brief and point to the Docusaurus site.
Applied to files:
CONTRIBUTING.md
📚 Learning: 2025-12-17T21:35:30.143Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-17T21:35:30.143Z
Learning: In the Img2Num project, files that import React hooks must use the `.jsx` extension (not `.js`), as `npm run dev` fails otherwise. This is a build configuration requirement.
Applied to files:
CONTRIBUTING.md
📚 Learning: 2025-12-17T22:39:25.711Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-17T22:39:25.711Z
Learning: In the Img2Num repository, avoid creating strangely-named markdown files (like COMPREHENSIVE_TEST_REPORT.md, DELIVERABLES.md, etc.) at the root level.
Applied to files:
CONTRIBUTING.md
🪛 LanguageTool
docs/docs/guidelines/coding-style.md
[style] ~164-~164: Consider using a different verb for a more formal wording.
Context: ...ges lint-clean. Don't feel obligated to fix unrelated issues! :::
(FIX_RESOLVE)
CONTRIBUTING.md
[style] ~22-~22: Consider using a different verb for a more formal wording.
Context: ...ed information about linting standards, fixing issues, and CI integration, see: - [Cod...
(FIX_RESOLVE)
docs/docs/reference/tools/ci-workflows.md
[uncategorized] ~16-~16: The official name of this software platform is spelled with a capital “H”.
Context: ... Overview ### Lint Workflow File: .github/workflows/ci.yml (lint job) **Trigger...
(GITHUB)
[uncategorized] ~42-~42: The official name of this software platform is spelled with a capital “H”.
Context: ...# Script Validation Workflow File: .github/workflows/ci.yml (validate-scripts job...
(GITHUB)
🔇 Additional comments (14)
docs/docs/guidelines/coding-style.md (4)
101-120: Well-structured linting documentation.The local linting commands section clearly documents the workflow contributors should follow. The commands align with what the CI workflow executes.
122-135: Clear explanation of linter responsibilities.Good separation of concerns between ESLint (code quality) and editorconfig-checker (style consistency). This helps contributors understand which tool to consult when fixing specific issues.
137-148: Helpful fix guidance with editor setup recommendations.The auto-fix vs manual fix distinction and EditorConfig plugin recommendations will help contributors resolve issues efficiently.
150-165: Good handling of special cases and current status.Documenting Makefile tab requirements and the tip about existing violations addresses contributor concerns appropriately. The tip manages expectations about pre-existing issues, which aligns with the PR objective to add linting while deferring violation remediation to follow-up PRs.
docs/docs/reference/tools/ci-workflows.md (5)
1-6: Good frontmatter and metadata.Proper sidebar positioning, descriptive title, and relevant keywords for discoverability.
14-36: Lint workflow documentation accurately reflects CI configuration.The documented steps, triggers, and failure conditions match the actual workflow implementation in
.github/workflows/ci.yml.
40-58: Script validation workflow documentation is accurate.The smart detection logic described matches the actual implementation with
scriptsInfochecking and path-based detection.
117-121: Conditional execution documentation is accurate.The described behavior matches the workflow's
if: steps.check_changes.outputs.scripts_changed == 'true'condition.
130-140: Good forward-looking section and contribution guidance.The future enhancements list sets expectations, and the info callout appropriately directs contributors to open issues first.
.github/workflows/ci.yml (3)
10-32: Lint job implementation meets acceptance criteria.The job correctly:
- Runs on
ubuntu-latest- Uses Node.js 22 with npm caching
- Executes
npm ci,npm run lint, andnpm run lint:stylein sequence- Will fail (non-zero exit) when linting errors are detected
49-76: Script change detection logic is well-implemented.The detection correctly handles:
- Both pull_request and push events with appropriate SHA selection
- Force-push scenarios via
git merge-basescriptsInfochanges in package.json files- Script directory changes
87-98: No issues found. The syntaxuses: ./.github/workflows/commenter.ymlwithwith:parameters is correct for reusable workflows. Thecommenter.ymlfile properly defineson: workflow_call:and accepts inputs via thewith:block, which is the standard pattern for reusable workflows in GitHub Actions. The file is correctly placed in.github/workflows/.Likely an incorrect or invalid review comment.
CONTRIBUTING.md (2)
6-18: Good balance between brief guidance and detailed docs.The quick-start commands provide immediate value while keeping the root CONTRIBUTING.md concise. This aligns well with the project's convention of detailed docs in the Docusaurus site. Based on learnings, the root-level docs should remain brief and point to the Docusaurus site.
20-31: Helpful documentation links and support guidance.The links to detailed documentation and the "Questions?" section with discussion/issue options provide good contributor support pathways. This addresses the reviewer feedback about providing a place for contributors to ask for guidance on linting issues.
Ryan-Millard
left a comment
There was a problem hiding this comment.
This is great, and I'd like to merge it, but I'm worried that it will always fail given the current linting setup (my fault for doing it poorly).
Please will you run the commands given by the output below and verify that they do not conflict with each other:
[14:17] ~/projects/Img2Num $ ./img2num help lint
> imgtonum@0.0.0 help
> node scripts/help.js lint
────────────────────────────────────────────────────────────────────────────────
Img2Num CLI Scripts
Also see: https://ryan-millard.github.io/Img2Num/info/docs/category/-project-scripts
Type 'a' to list all, 'q' to quit.
────────────────────────────────────────────────────────────────────────────────
lint (Linting)
- Run ESLint to check for code issues
-- fix Automatically fix fixable issues
-- style Check style rules only
> eslint .
lint:fix (Linting)
- Run ESLint and automatically fix issues
> eslint . --fix
lint:style (Linting)
- Check all files against .editorconfig rules
> editorconfig-checker
[14:18] ~/projects/Img2Num $ ./img2num help format
> imgtonum@0.0.0 help
> node scripts/help.js format
────────────────────────────────────────────────────────────────────────────────
Img2Num CLI Scripts
Also see: https://ryan-millard.github.io/Img2Num/info/docs/category/-project-scripts
Type 'a' to list all, 'q' to quit.
────────────────────────────────────────────────────────────────────────────────
format (Formatting)
- Format all files with Prettier and clang-format
> npm run format-js && npm run format-wasm
format-js (Formatting)
- Format all non-C++ files with Prettier
> prettier --write .
format-wasm (Formatting)
- Format all C++ files with clang-format
> node scripts/format-wasm.js
[14:18] ~/projects/Img2Num $Currently, the code in the repository is poorly formatted according to ./img2num lint:style and ./img2num format. Please will you have a look at it and fix the files and conflicts between their configurations.
Additionally, I think we need a new file, .editorconfig-checker.json, to configure editorconfig-checker properly as it doesn't currently ignore the correct folders and a whole list of other problems. Please will you fix that.
Ultimately, I think the problem we have right now is that the setup of clang-format and the .editorconfig file. They seem to want different formats, which causes failures.
|
@Ryan-Millard I've investigated the linting conflicts as requested. Here's what I found: Current situation:
What I've done:
Questions before proceeding:
I want to make sure I take the right approach before creating a large commit. What would you prefer? |
@LostSkyWalker-1401 thank you so much! Unpushed changesPlease will you push the changes that you mentioned because I can't see them.👇
Answers to your questions1. Should I commit all 66 files that
|
|
@Ryan-Millard I've pushed the requested changes! Here's the update: ✅ Completed:
📊 Current Status:
🔍 Remaining Conflicts:The 220 errors fall into these categories:
🤔 Next Steps - Need Your Input:Since these are all pre-existing issues, I have a few options: Option A: Adjust
Option B: Disable specific checks in
Option C: Fix remaining 220 violations manually
My recommendation: Option A or B. The files are now properly formatted by Prettier/clang-format. We should adjust the checker to match the formatters, not vice versa. What would you prefer? I'm happy to implement whichever approach you think is best! |
- Add lint job to ci.yml that runs ESLint and editorconfig-checker - Configure lint job to run on pull_request and push to main - Update CONTRIBUTING.md with comprehensive linting documentation - Include instructions for running lints locally and fixing issues - Document current linting status and CI integration Resolves Ryan-Millard#141
…dback - Simplify root CONTRIBUTING.md and link to detailed docs - Add comprehensive linting section to coding-style.md - Create new ci-workflows.md documenting GitHub Actions workflows - Update Questions section to link to discussions/issues instead of draft PRs Addresses review feedback from @Ryan-Millard in Ryan-Millard#146
- Fix line endings (CRLF -> LF) in all modified files - Add final newlines to ci.yml, CONTRIBUTING.md, and docs files - Fix indentation in markdown numbered lists - Add sidebar_position: 2 to ci-workflows.md Addresses feedback from @Ryan-Millard in Ryan-Millard#146
- Exclude build directories (dist, build, docs/build) - Exclude node_modules and lock files - Exclude all CMake build directories in wasm modules - Exclude binary files (.ase, .min.js, .min.css)
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/ci.yml (1)
87-98: Fix PR comment condition to prevent spurious comments when validation is skipped.The condition on line 88 is incomplete. When
scripts_changedis false, the validate step is skipped, butsteps.validate.outputs.validation_exit_codereturns an empty string (not undefined). This means the conditionsteps.validate.outputs.validation_exit_code != '0'evaluates to true even though validation never ran, causing:
- The comment step to execute unnecessarily
- An attempt to read the non-existent
validation.logfile- A workflow failure
Add the scripts_changed check to the condition:
- name: Comment on PR if validation fails - if: steps.validate.outputs.validation_exit_code != '0' && github.event_name == 'pull_request' + if: steps.check_changes.outputs.scripts_changed == 'true' && steps.validate.outputs.validation_exit_code != '0' && github.event_name == 'pull_request' uses: ./.github/workflows/commenter.yml(The workflow syntax
./.github/workflows/commenter.ymlis correct for local reusable workflows and matches the documented usage in commenter.yml itself.)
🧹 Nitpick comments (4)
src/components/WasmImageProcessor.jsx (1)
104-104: Consider extracting the nested ternary for readability.The four-level nested ternary on a single line is functionally correct but challenging to parse quickly. Extracting to a helper function or breaking into multiple lines would improve maintainability.
🔎 Optional refactor to improve readability
- const minimumAllowedMinArea = area > 100_000_000 ? 25 : area > 10_000_000 ? 20 : area > 1_000_000 ? 15 : 10; + const getMinimumAllowedMinArea = (area) => { + if (area > 100_000_000) return 25; + if (area > 10_000_000) return 20; + if (area > 1_000_000) return 15; + return 10; + }; + const minimumAllowedMinArea = getMinimumAllowedMinArea(area);Or keep it inline with early returns:
+ let minimumAllowedMinArea; + if (area > 100_000_000) { + minimumAllowedMinArea = 25; + } else if (area > 10_000_000) { + minimumAllowedMinArea = 20; + } else if (area > 1_000_000) { + minimumAllowedMinArea = 15; + } else { + minimumAllowedMinArea = 10; + } - const minimumAllowedMinArea = area > 100_000_000 ? 25 : area > 10_000_000 ? 20 : area > 1_000_000 ? 15 : 10;scripts/handle-changelog.js (1)
60-60: Excellent addition — Prevents script failure when output directory is missing.Creating the
outputDirwithrecursive: truebefore writing ensures the script won't crash when the directory doesn't exist. This is particularly important sincecompleteChangelogPathis written at line 34 before this check, which would have failed if the directory was missing.Suggested improvement: Consider moving this directory creation earlier (before line 28) to guarantee the directory exists before the first write operation at line 34:
🔎 Proposed earlier directory creation
const changelogPath = 'CHANGELOG.md'; const outputDir = 'docs/changelog'; +// Ensure output folder exists +if (!fs.existsSync(outputDir)) fs.mkdirSync(outputDir, { recursive: true }); + if (!fs.existsSync(changelogPath)) { console.log('[changelog] No CHANGELOG.md found. Skipping.'); process.exit(0); } const content = fs.readFileSync(changelogPath, 'utf8'); // Write to docs/changelog/complete-changelog.md const completeChangelogPath = path.join(outputDir, 'complete-changelog.md');Then remove the duplicate check at line 60.
docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/introduction/index.md (1)
40-42: Optional: Tighten wording on line 41."shows the exact same sinusoid" can be shortened to "shows the same sinusoid" for conciseness.
docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/how-fourier-transforms-work/index.md (1)
118-124: Optional: Reduce repeated "just" and rephrase "reason is because".Lines 119 and 121 both use "just" in close proximity, and line 120's "reason is because" is redundant.
Consider: "The FFT is a fast algorithm for computing the DFT. FFTs appear everywhere because they are computationally efficient—essentially just a fast implementation of the DFT."
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (68)
.editorconfig-checker.json.github/workflows/ci.ymlCONTRIBUTING.mdREADME.mddocker-compose.ymldocs/changelogSidebarGenerator.jsdocs/docs/guidelines/_category_.jsondocs/docs/guidelines/coding-style.mddocs/docs/guidelines/commits.mddocs/docs/guidelines/issues.mddocs/docs/guidelines/pull-requests.mddocs/docs/index.mddocs/docs/introduction/getting-started.mddocs/docs/project-scripts/help-scripts/index.mddocs/docs/project-scripts/help-scripts/scripts-guide.mddocs/docs/reference/react/_category_.jsondocs/docs/reference/react/components/Tooltip/index.mddocs/docs/reference/react/components/Tooltip/tests.mddocs/docs/reference/react/components/_category_.jsondocs/docs/reference/tools/_category_.jsondocs/docs/reference/tools/ci-workflows.mddocs/docs/reference/wasm/_category_.jsondocs/docs/reference/wasm/development-workflow.mddocs/docs/reference/wasm/how-to-add-a-module.mddocs/docs/reference/wasm/modules/_category_.jsondocs/docs/reference/wasm/modules/image/_category_.jsondocs/docs/reference/wasm/modules/image/fft_iterative/_category_.jsondocs/docs/reference/wasm/modules/image/fft_iterative/api.mddocs/docs/reference/wasm/modules/image/fft_iterative/explained.mddocs/docs/reference/wasm/modules/image/fft_iterative/implementation.mddocs/docs/reference/wasm/modules/image/fft_iterative/overview.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/continuous-fourier-transform/index.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/discrete-time-signals-and-the-dft/index.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/fourier-series--the-bridge/index.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/how-fourier-transforms-work/index.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/index.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/introduction/index.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/keywords.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/why-img2num-uses-the-dft/index.mddocs/docs/reference/wasm/modules/image/overview.mddocs/docs/reference/wasm/overview.mddocs/docs/reference/wasm/setup-and-dependencies.mddocs/docs/reference/wasm/troubleshooting-and-optimizations.mddocs/docs/reference/wasm/using-wasm-in-react.mddocs/docusaurus.config.jsdocs/scripts/help.jsscripts/build-wasm.jsscripts/handle-changelog.jsscripts/help.jsscripts/lib/cli-fuzzy.jsscripts/lib/colors.jsscripts/lib/read-packageJson-scripts.jsscripts/validate-scripts.jssrc/components/NavBar.jsxsrc/components/Tooltip.jsxsrc/components/Tooltip.test.jsxsrc/components/WasmImageProcessor.jsxsrc/pages/About/Author.jsxsrc/pages/About/CTA.jsxsrc/pages/About/Motivation.jsxsrc/pages/About/TechStack.jsxsrc/pages/About/WhatIsThis.jsxsrc/pages/Credits/ContributorsCreditsCard.jsxsrc/pages/Credits/DependencyCreditsCard.jsxsrc/pages/Credits/StaticCreditsCard.jsxsrc/test/setup.jsvite.config.jsvitest.config.js
💤 Files with no reviewable changes (1)
- src/pages/About/Author.jsx
✅ Files skipped from review due to trivial changes (35)
- src/pages/About/Motivation.jsx
- src/components/Tooltip.test.jsx
- docs/docs/reference/wasm/modules/image/fft_iterative/implementation.md
- vite.config.js
- src/pages/About/WhatIsThis.jsx
- docs/docs/reference/react/components/Tooltip/tests.md
- docs/docs/reference/wasm/modules/image/fft_iterative/overview.md
- src/pages/Credits/DependencyCreditsCard.jsx
- docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/why-img2num-uses-the-dft/index.md
- docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/discrete-time-signals-and-the-dft/index.md
- scripts/lib/read-packageJson-scripts.js
- .editorconfig-checker.json
- vitest.config.js
- docs/docs/guidelines/commits.md
- docs/docs/reference/wasm/setup-and-dependencies.md
- src/pages/About/CTA.jsx
- scripts/lib/cli-fuzzy.js
- docs/docs/reference/wasm/development-workflow.md
- scripts/help.js
- docs/docs/reference/react/components/Tooltip/index.md
- docs/docs/guidelines/pull-requests.md
- docs/docusaurus.config.js
- docs/docs/reference/wasm/modules/category.json
- docs/docs/reference/wasm/how-to-add-a-module.md
- src/test/setup.js
- src/pages/Credits/StaticCreditsCard.jsx
- src/components/NavBar.jsx
- docs/docs/reference/wasm/overview.md
- docs/docs/guidelines/category.json
- docs/docs/reference/wasm/modules/image/fft_iterative/explained.md
- docs/docs/reference/react/category.json
- docs/docs/reference/wasm/using-wasm-in-react.md
- docs/docs/reference/tools/category.json
- docs/scripts/help.js
- docker-compose.yml
🧰 Additional context used
🧠 Learnings (5)
📚 Learning: 2025-12-20T20:11:28.422Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-20T20:11:28.422Z
Learning: In the Img2Num repository, all documentation should be properly organized in the docs/docs/ folder structure following the Docusaurus conventions, either as a dedicated category or integrated into existing categories like project-scripts.
Applied to files:
docs/docs/introduction/getting-started.mddocs/docs/index.mddocs/docs/reference/tools/ci-workflows.mdCONTRIBUTING.mdREADME.md
📚 Learning: 2025-12-17T22:39:25.711Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-17T22:39:25.711Z
Learning: In the Img2Num repository, all documentation must be placed in the docs/docs/ folder following the Docusaurus structure, not at the repository root.
Applied to files:
docs/docs/index.mdCONTRIBUTING.mdREADME.md
📚 Learning: 2025-12-17T22:39:25.711Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-17T22:39:25.711Z
Learning: In the Img2Num repository, avoid creating strangely-named markdown files (like COMPREHENSIVE_TEST_REPORT.md, DELIVERABLES.md, etc.) at the root level.
Applied to files:
docs/docs/index.mdCONTRIBUTING.mdREADME.md
📚 Learning: 2025-12-17T22:39:25.711Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-17T22:39:25.711Z
Learning: In the Img2Num repository, do not create multiple markdown files at the repository root. The README.md at root should remain brief and point to the Docusaurus site.
Applied to files:
docs/docs/index.mdCONTRIBUTING.mdREADME.md
📚 Learning: 2025-12-17T21:35:30.143Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-17T21:35:30.143Z
Learning: In the Img2Num project, files that import React hooks must use the `.jsx` extension (not `.js`), as `npm run dev` fails otherwise. This is a build configuration requirement.
Applied to files:
CONTRIBUTING.mddocs/docs/guidelines/coding-style.mdREADME.md
🧬 Code graph analysis (1)
src/components/WasmImageProcessor.jsx (2)
src/components/Tooltip.jsx (1)
Tooltip(5-35)src/components/LoadingHedgehog.jsx (1)
LoadingHedgehog(16-214)
🪛 LanguageTool
docs/docs/reference/tools/ci-workflows.md
[uncategorized] ~16-~16: The official name of this software platform is spelled with a capital “H”.
Context: ... Overview ### Lint Workflow File: .github/workflows/ci.yml (lint job) **Trigger...
(GITHUB)
[uncategorized] ~45-~45: The official name of this software platform is spelled with a capital “H”.
Context: ...# Script Validation Workflow File: .github/workflows/ci.yml (validate-scripts job...
(GITHUB)
CONTRIBUTING.md
[style] ~22-~22: Consider using a different verb for a more formal wording.
Context: ...ed information about linting standards, fixing issues, and CI integration, see: - [Co...
(FIX_RESOLVE)
docs/docs/guidelines/coding-style.md
[style] ~173-~173: Consider using a different verb for a more formal wording.
Context: ...ges lint-clean. Don't feel obligated to fix unrelated issues! :::
(FIX_RESOLVE)
README.md
[style] ~133-~133: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...thub.io/Img2Num/info/docs/reference)) - Very large images or heavy explanations — use the ...
(EN_WEAK_ADJECTIVE)
docs/docs/project-scripts/help-scripts/scripts-guide.md
[uncategorized] ~99-~99: The official name of this software platform is spelled with a capital “H”.
Context: ...integration A GitHub Actions workflow (.github/workflows/ci.yml) was added to: - Det...
(GITHUB)
docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/introduction/index.md
[style] ~41-~41: ‘exact same’ might be wordy. Consider a shorter alternative.
Context: ...n-time-and-frequency-domains) shows the exact same sinusoid plotted in both the time and f...
(EN_WORDINESS_PREMIUM_EXACT_SAME)
[style] ~119-~119: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...s practical implementation" The FFT is just a fast algorithm for computing the DFT:...
(REP_BE_JUST)
[style] ~120-~120: The word “because” means “for the reason that” and thus introduces redundancy.
Context: ... The only reason FFTs appear everywhere is because they are essentially just fast DFTs...
(REASON_IS_BECAUSE)
🪛 markdownlint-cli2 (0.18.1)
docs/docs/introduction/getting-started.md
136-136: Code block style
Expected: indented; Actual: fenced
(MD046, code-block-style)
149-149: Code block style
Expected: indented; Actual: fenced
(MD046, code-block-style)
159-159: Code block style
Expected: indented; Actual: fenced
(MD046, code-block-style)
docs/docs/guidelines/coding-style.md
82-82: Code block style
Expected: fenced; Actual: indented
(MD046, code-block-style)
87-87: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
docs/docs/reference/wasm/troubleshooting-and-optimizations.md
29-29: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔇 Additional comments (43)
docs/docs/reference/wasm/modules/image/overview.md (1)
1-51: ✅ Clean formatting pass for editorconfig compliance.The changes are purely whitespace and indentation adjustments (blank lines after headings, list alignment) with no content modifications. Markdown structure and API documentation remain intact.
docs/docs/reference/wasm/_category_.json (1)
9-9: LGTM! Valid JSON syntax fix.The trailing comma after the closing brace was invalid JSON syntax. Removing it ensures the file is correctly parsed by standard JSON parsers.
src/pages/Credits/ContributorsCreditsCard.jsx (1)
9-10: LGTM! Clean formatting improvement.The conversion from a multi-line arrow function to a single-line implicit return is a clean formatting improvement. The logic remains identical, and the single-line format is idiomatic for simple transformations like this chunk helper.
src/pages/About/TechStack.jsx (1)
7-7: LGTM! Formatting change aligns with project standards.The anchor attributes have been consolidated to a single line as part of the project-wide formatting normalization. Security attributes (
rel="noopener noreferrer") remain correctly in place.scripts/lib/colors.js (3)
7-23: LGTM! Quote normalization applied.The conversion from double to single quotes in the Colors enum aligns with the ESLint rules being introduced in this PR. No functional changes.
28-44: LGTM! Consistent quote style in ANSI codes mapping.The quote normalization in the codes mapping is consistent with the Colors enum changes and maintains the correct ANSI escape sequences.
67-67: LGTM! Final newline added per editorconfig standards.The trailing newline satisfies the
insert_final_newlineeditorconfig rule being enforced in this PR.docs/docs/project-scripts/help-scripts/scripts-guide.md (1)
1-170: Documentation structure and content are well-aligned with PR objectives.The changes to this file are primarily formatting and structural improvements that enhance readability without altering semantic meaning. The documentation accurately reflects the script validation and CI integration features introduced in the PR, with clear examples, proper code block formatting, and logical organization.
The file maintains consistency with the schema documentation and provides comprehensive guidance on:
- Adding/updating scripts with proper
scriptsInfoentries- Using the
validate-scriptstool and its CI integration- Understanding the refactored
helpCLI- Contributing to the codebase
All references to files, workflows, and utilities are consistent with the PR context.
src/components/Tooltip.jsx (1)
10-19: LGTM! Clean refactor to ternary expression.The refactor from if-else to a ternary expression is more concise and idiomatic for conditional rendering. The logic is preserved: valid React elements are cloned with tooltip attributes, while other children are wrapped in a keyboard-accessible span. The implementation correctly handles both cases.
src/components/WasmImageProcessor.jsx (1)
65-65: LGTM! Formatting changes align with linting objectives.All formatting adjustments (inlined callbacks, compressed JSX elements, whitespace normalization) are syntactically correct and preserve existing behavior. These changes support the PR's goal of establishing consistent code style across the project.
Also applies to: 149-149, 162-162, 171-171, 176-176, 190-190, 193-193
docs/docs/index.md (1)
38-39: LGTM!The blank line improves readability by providing visual separation before the issue links list.
docs/docs/reference/react/components/_category_.json (1)
9-9: LGTM! Valid JSON syntax fix.Removing the trailing comma ensures the file conforms to standard JSON syntax, which does not allow trailing commas.
docs/docs/guidelines/issues.md (1)
10-30: LGTM! Documentation improvements enhance clarity.The table reformatting improves alignment and readability, while the expanded Guidelines section with actionable bullet points and the tip admonition provide valuable guidance for contributors.
docs/docs/reference/wasm/modules/image/_category_.json (1)
9-9: LGTM! Valid JSON syntax fix.Removing the trailing comma ensures proper JSON syntax conformance.
docs/docs/reference/wasm/troubleshooting-and-optimizations.md (2)
11-24: LGTM! Formatting improvements enhance readability.The indentation adjustments improve the visual structure and consistency of the documentation.
43-45: LGTM! Documentation improvements.The formatting adjustments maintain consistency with the rest of the document.
docs/docs/introduction/getting-started.md (1)
10-12: LGTM — Formatting improvements align with linting standards.The spacing and formatting changes improve consistency and readability without altering the documentation content.
Note on static analysis hints: The markdownlint warnings about "code block style" (lines 136, 149, 159) are pedantic style preferences. Since the PR's focus is on establishing baseline linting and these blocks are properly formatted, they can be addressed in follow-up cleanup if the team standardizes on indented vs. fenced code blocks.
Also applies to: 56-56, 124-124, 129-163, 364-364
scripts/build-wasm.js (1)
110-110: LGTM — Consistent quote style and formatting.The changes normalize string literals to single quotes and simplify the
emcmakeinvocation formatting, both improving code consistency without affecting behavior.Also applies to: 209-209
docs/docs/project-scripts/help-scripts/index.md (1)
29-29: LGTM — Improved spacing consistency.The added blank lines enhance readability and align with markdown formatting best practices.
Also applies to: 42-42, 48-48
docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/keywords.md (2)
15-15: LGTM — Useful addition to the keywords list.Adding the CFT (Continuous Fourier Transform) keyword provides helpful context for readers, especially given the related CFT documentation referenced in the AI summary.
11-11: LGTM — Formatting improvements enhance readability.The spacing and blank line adjustments improve the visual structure and consistency of the mathematical definitions and conventions.
Also applies to: 21-21, 52-57, 68-87, 101-124, 135-135
scripts/handle-changelog.js (1)
2-4: LGTM — Consistent quote style throughout.The normalization to single quotes improves code consistency and aligns with the linting standards introduced in this PR.
Also applies to: 9-9, 11-11, 13-13, 17-18, 21-22, 25-25, 28-28, 34-34, 49-49, 55-55, 72-73, 80-81, 83-83, 85-85
docs/docs/guidelines/coding-style.md (2)
7-20: LGTM! Clear and comprehensive style rules.The expanded General Rules section now explicitly covers all key formatting requirements (line endings, final newline, max line length) aligned with
.editorconfig. The additions improve clarity for contributors.
108-174: Excellent comprehensive linting documentation!This new section thoroughly covers:
- Local linting commands (
npm run lint,npm run lint:fix,npm run lint:style)- What each linter checks (ESLint and editorconfig-checker)
- How to fix issues (auto-fix vs. manual)
- Editor setup guidance with links
- Special cases (Makefiles, binaries)
- CI integration workflow
- Current status tip to set contributor expectations
The documentation aligns perfectly with the CI workflow additions and provides clear guidance for contributors.
README.md (2)
68-68: LGTM! Formatting improvements align with style guidelines.The whitespace and formatting changes improve consistency:
- Added blank lines after headings (lines 68, 136)
- Consolidated multi-line bullets into single lines (96-97, 119-122)
- Normalized spacing in various sections
These changes align with
.editorconfigrules and markdown best practices without altering content.Also applies to: 96-97, 119-122, 131-133, 136-136, 142-143
105-109: Documentation links are correctly updated and match the Docusaurus structure.The URL changes align with the actual site configuration:
- Getting started is correctly under
/introduction/getting-started- Changelog has been properly moved from
/docs/changelog/to/changelog(per configuration)- Guidelines category, reference guides, and documentation root paths are all correct
All documentation files exist at the expected locations and routing is properly configured in
docusaurus.config.js.docs/docs/reference/tools/ci-workflows.md (1)
1-151: Excellent CI/CD workflow documentation!This new reference page thoroughly documents:
- Lint workflow with ESLint and editorconfig-checker
- Script validation workflow with smart detection
- Local verification commands for contributors
- Troubleshooting guidance for common CI failures
- Workflow configuration details (Node.js 22, caching, conditional execution)
- Best practices and future enhancements
The
sidebar_position: 2setting properly positions this page in the navigation. The structure and content align well with the CI workflow changes and provide clear guidance for contributors.docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/fourier-series--the-bridge/index.md (1)
26-31: Excellent enhancements to the Fourier series documentation!The expanded content significantly improves the educational value:
Figure additions (lines 26-31, 40-45, 48-53):
- Each figure now includes embedded images with expandable Python code
- Provides visual learning aids alongside theoretical explanations
Mathematical expansions:
- Detailed explanation of complex coefficients, magnitude, and phase (lines 65-86)
- Added "Understanding Magnitude and Phase" section with triangle visualization (lines 92-134)
- Expanded Real Fourier Series Form with coefficient relationships (lines 142-156)
- Enhanced Fourier Coefficients section with visual analogies (lines 158-186)
The mathematical content is accurate (Euler's formula, Pythagorean theorem, arctangent), and the progressive explanation style (intuition → formulas → visualization) effectively bridges theory and practice.
Also applies to: 40-45, 48-53, 65-186
docs/docs/reference/wasm/modules/image/fft_iterative/_category_.json (1)
9-9: LGTM! Valid JSON syntax fix.Removing the trailing comma ensures the JSON is strictly valid according to the JSON specification.
docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/index.md (1)
10-14: LGTM! Documentation improvements.The added blank line improves readability, and the new prerequisite items (complex numbers and systems concepts) provide clearer guidance for readers.
scripts/validate-scripts.js (4)
2-3: LGTM! Quote normalization.The change from double quotes to single quotes aligns with JavaScript/ESLint style conventions.
14-14: LGTM! Consistent quote style.String literal normalization to single quotes maintains consistency.
30-30: LGTM! Quote normalization.Consistent use of single quotes for string literals.
81-84: LGTM! Path normalization improvement.Using
path.resolve()explicitly converts relative paths to absolute paths, making the script more robust regardless of the current working directory.CONTRIBUTING.md (1)
7-33: LGTM! Clear and helpful contributor guidance.The new linting section provides:
- Quick-start commands for common linting tasks
- Links to detailed Docusaurus documentation (addressing previous reviewer feedback)
- Clear guidance on where to ask questions
This aligns well with the PR objectives and maintains the repository's preference for keeping root-level docs brief while pointing to the comprehensive Docusaurus site.
Based on learnings, this approach correctly keeps the root CONTRIBUTING.md brief and directs contributors to the detailed documentation in the docs/docs/ folder structure.
docs/docs/reference/wasm/modules/image/fft_iterative/api.md (3)
24-24: LGTM! Improved emphasis.Adding italic formatting to "same-size in / same-size out" makes this important behavioral constraint more noticeable.
32-32: LGTM! Well-documented API addition.The
pad_to_pow_twofunction is properly documented with:
- Clear signature showing it modifies both the vector and the size parameter
- Accurate description of its purpose
- Consistent formatting with other API entries
This aligns well with the power-of-two padding warning documented at the top of the file.
39-42: LGTM! Formatting improvement.The added blank line after the
:::info Notestag improves visual separation and readability.docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/continuous-fourier-transform/index.md (1)
17-54: LGTM!The CFT equations, note block, and danger block are properly formatted. Mathematical content is correct, and the additions enhance clarity without introducing errors.
.github/workflows/ci.yml (4)
10-31: LGTM! Clean lint job implementation.The lint job structure is well-implemented and meets all the requirements:
- Runs on correct triggers (pull_request and push to main)
- Uses npm caching for performance
- Executes both ESLint and editorconfig-checker
- Will fail the workflow on lint errors (default behavior)
49-76: LGTM! Robust change detection logic.The change detection implementation correctly:
- Handles both PR and push events
- Uses
git merge-baseto handle force-pushes- Checks for
scriptsInfoin package.json diffs- Detects changes in scripts directories
- Sets the output variable properly
78-85: LGTM! Proper conditional execution and exit code capture.The validation step correctly:
- Runs only when scripts change
- Uses
PIPESTATUS[0]to capture the npm exit code before the pipe- Uses
set -o pipefailto ensure errors propagate- Logs output for the PR comment
37-39: AI summary inconsistency: fetch-depth not removed.The AI summary states "Removed fetch-depth: 0 from the checkout step," but the code shows
fetch-depth: 0is still present and unchanged (no~marker on line 39). The full git history is correctly maintained for the git diff operations in the change detection logic.
- Format 66 files with npm run format - Prettier formatted all JS/React/Markdown files - clang-format formatted all C++ files - This establishes consistent formatting baseline for lint checks
- Remove ** glob patterns (not supported in regex) - Use explicit paths for build directories
57a3f9c to
44d3483
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/fourier-series--the-bridge/index.md (1)
1-186: Fix line length violations to comply with 120-character limit.Eight lines exceed the 120-character editorconfig constraint and must be wrapped (lines 23, 62, 81, 95, 131, 139, 151, 173). All referenced Python script files exist and are correct.
docs/docs/guidelines/coding-style.md (1)
66-87: Fix C++ code block closing delimiter.The C++ implementation example code block (opened with
```cppon line 66) is closed with four backticks on line 87, but Markdown requires matching three-backtick delimiters. This was previously flagged and needs correction.🔎 Proposed fix
-```` +```
♻️ Duplicate comments (3)
docs/docs/index.md (1)
43-43: Remove leading spaces from closing admonition delimiter.The closing
:::still has leading whitespace, which violates Docusaurus admonition syntax. The delimiter must appear at the start of the line with no indentation.🔎 Proposed fix
- ::: +:::docs/docs/reference/wasm/troubleshooting-and-optimizations.md (1)
29-36: Add language identifier to fenced code block.The code block is still missing a language specifier, which was flagged in a previous review. Add
bashorshellafter the opening fence for proper syntax highlighting and documentation quality.🔎 Proposed fix
- ``` + ```bash emcc ... \ -O3 \ --closure 1 \Based on static analysis hints from markdownlint-cli2.
docs/changelogSidebarGenerator.js (1)
43-44: Line length violation conflicts with PR objectives.Line 43 exceeds the 120-character limit (121 characters per prior review) and violates the
.editorconfigrule being enforced by this PR. This was flagged in a previous review but remains unfixed.Inconsistency: The PR objectives state "Files modified in this PR were adjusted... so PR files pass
npm run lint:style", but this modified file appears to still have the violation.Please verify whether:
- This file passes
npm run lint:stylelocally- The CI lint job will pass with this violation
- If there's an exclusion or configuration that allows this
If the line length check is enforced, apply the fix from the previous review:
🔎 Proposed fix: break into multiple lines
- return [...(indexItem ? [indexItem] : []), ...sortedReleaseItems, ...(mainChangelogItem ? [mainChangelogItem] : [])]; + return [ + ...(indexItem ? [indexItem] : []), + ...sortedReleaseItems, + ...(mainChangelogItem ? [mainChangelogItem] : []) + ];#!/bin/bash # Verify if this file passes editorconfig-checker # Run editorconfig-checker on this specific file npx editorconfig-checker docs/changelogSidebarGenerator.js # Also check line length specifically echo "Line 43 character count:" sed -n '43p' docs/changelogSidebarGenerator.js | wc -c
🧹 Nitpick comments (5)
src/pages/Credits/StaticCreditsCard.jsx (1)
1-2: Inconsistent import style: align file extension usage.Line 2 now includes the explicit
.jsxextension while line 1 does not. For consistency and maintainability, both imports should follow the same pattern.🔎 Suggested fix for consistency
If the linting rules or project conventions require explicit extensions, update both imports:
-import GlassCard from '@components/GlassCard'; -import Tooltip from '@components/Tooltip.jsx'; +import GlassCard from '@components/GlassCard.jsx'; +import Tooltip from '@components/Tooltip.jsx';Alternatively, if explicit extensions are not required, remove it from line 2:
import GlassCard from '@components/GlassCard'; -import Tooltip from '@components/Tooltip.jsx'; +import Tooltip from '@components/Tooltip';docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/introduction/index.md (2)
40-44: Minor wording clarity at line 41.Replace "exact same" with a shorter alternative such as "the same" or "identical" to reduce wordiness.
🔎 Proposed fix
-Below, [Figure 1](#figure-1-a-densely-sampled-sinusoid-to-approximate-a-continuous-signal-plotted-in-time-and-frequency-domains) -shows the exact same sinusoid plotted in both the time and frequency domain. +Below, [Figure 1](#figure-1-a-densely-sampled-sinusoid-to-approximate-a-continuous-signal-plotted-in-time-and-frequency-domains) +shows the same sinusoid plotted in both the time and frequency domain.
115-124: Reduce repetition and redundancy in lines 119–120.The phrase "just a fast algorithm" appears twice in close proximity, and "The only reason… is because…" is redundant. Consolidate for clarity:
🔎 Proposed fix
-The FFT is just a fast algorithm for computing the DFT: they are mathematically identical. -The only reason FFTs appear everywhere is because they are essentially just **fast** DFTs: +The FFT is a fast algorithm for computing the DFT; they are mathematically identical. +FFTs appear everywhere because they provide fast, practical computation of DFTs:docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/fourier-series--the-bridge/index.md (1)
176-185: Minor style inconsistency in LaTeX fraction formatting.Line 182 uses spaced fractions (
\frac{ b_k }{ a_k }) while earlier fractions (e.g., line 88) omit spaces (\frac{b}{a}). Consider standardizing to the no-space style for consistency.🔎 Proposed fix
- \phi_k &= \tan^{-1}(\frac{ b_k }{ a_k }) + \phi_k &= \tan^{-1}\left(\frac{b_k}{a_k}\right)Also consider adding
\left(and\right)parentheses for better LaTeX rendering (as used in line 119).README.md (1)
131-133: Consider simplifying intensifier phrasing.Line 133 uses "very large" which is an over-used intensifier. Consider replacing with a more direct description like "Large images" or "Heavy images" to tighten the prose.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (62)
.editorconfig-checker.json.github/workflows/ci.ymlCONTRIBUTING.mdREADME.mddocker-compose.ymldocs/changelogSidebarGenerator.jsdocs/docs/guidelines/_category_.jsondocs/docs/guidelines/coding-style.mddocs/docs/guidelines/commits.mddocs/docs/guidelines/issues.mddocs/docs/index.mddocs/docs/project-scripts/help-scripts/index.mddocs/docs/project-scripts/help-scripts/scripts-guide.mddocs/docs/reference/react/_category_.jsondocs/docs/reference/react/components/Tooltip/index.mddocs/docs/reference/react/components/Tooltip/tests.mddocs/docs/reference/tools/_category_.jsondocs/docs/reference/tools/ci-workflows.mddocs/docs/reference/wasm/_category_.jsondocs/docs/reference/wasm/development-workflow.mddocs/docs/reference/wasm/how-to-add-a-module.mddocs/docs/reference/wasm/modules/_category_.jsondocs/docs/reference/wasm/modules/image/_category_.jsondocs/docs/reference/wasm/modules/image/fft_iterative/_category_.jsondocs/docs/reference/wasm/modules/image/fft_iterative/api.mddocs/docs/reference/wasm/modules/image/fft_iterative/explained.mddocs/docs/reference/wasm/modules/image/fft_iterative/implementation.mddocs/docs/reference/wasm/modules/image/fft_iterative/overview.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/continuous-fourier-transform/index.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/discrete-time-signals-and-the-dft/index.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/fourier-series--the-bridge/index.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/how-fourier-transforms-work/index.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/index.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/introduction/index.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/keywords.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/why-img2num-uses-the-dft/index.mddocs/docs/reference/wasm/modules/image/overview.mddocs/docs/reference/wasm/overview.mddocs/docs/reference/wasm/setup-and-dependencies.mddocs/docs/reference/wasm/troubleshooting-and-optimizations.mddocs/docs/reference/wasm/using-wasm-in-react.mddocs/scripts/help.jsscripts/build-wasm.jsscripts/handle-changelog.jsscripts/help.jsscripts/lib/cli-fuzzy.jsscripts/lib/colors.jsscripts/lib/read-packageJson-scripts.jsscripts/validate-scripts.jssrc/components/Tooltip.jsxsrc/components/Tooltip.test.jsxsrc/components/WasmImageProcessor.jsxsrc/pages/About/Author.jsxsrc/pages/About/CTA.jsxsrc/pages/About/Motivation.jsxsrc/pages/About/TechStack.jsxsrc/pages/About/WhatIsThis.jsxsrc/pages/Credits/ContributorsCreditsCard.jsxsrc/pages/Credits/DependencyCreditsCard.jsxsrc/pages/Credits/StaticCreditsCard.jsxvite.config.jsvitest.config.js
💤 Files with no reviewable changes (1)
- src/pages/About/Author.jsx
✅ Files skipped from review due to trivial changes (8)
- vite.config.js
- docs/docs/reference/react/components/Tooltip/tests.md
- src/components/Tooltip.test.jsx
- docs/docs/reference/wasm/modules/image/fft_iterative/overview.md
- src/pages/About/Motivation.jsx
- docs/docs/reference/wasm/how-to-add-a-module.md
- docs/docs/guidelines/category.json
- docs/docs/reference/wasm/development-workflow.md
🚧 Files skipped from review as they are similar to previous changes (37)
- src/components/Tooltip.jsx
- docs/docs/reference/wasm/modules/image/overview.md
- docs/docs/reference/react/components/Tooltip/index.md
- scripts/handle-changelog.js
- scripts/lib/colors.js
- scripts/lib/read-packageJson-scripts.js
- docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/keywords.md
- docs/docs/reference/wasm/modules/image/fft_iterative/implementation.md
- docs/docs/reference/wasm/modules/image/fft_iterative/category.json
- .editorconfig-checker.json
- scripts/validate-scripts.js
- docs/docs/reference/react/category.json
- scripts/build-wasm.js
- docs/docs/guidelines/issues.md
- docs/docs/reference/wasm/using-wasm-in-react.md
- docs/docs/reference/wasm/overview.md
- docs/docs/reference/wasm/modules/image/category.json
- docs/docs/guidelines/commits.md
- docs/docs/reference/wasm/modules/category.json
- docker-compose.yml
- vitest.config.js
- docs/docs/reference/wasm/modules/image/fft_iterative/explained.md
- docs/docs/reference/wasm/modules/image/fft_iterative/api.md
- .github/workflows/ci.yml
- src/pages/About/CTA.jsx
- docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/why-img2num-uses-the-dft/index.md
- src/pages/Credits/ContributorsCreditsCard.jsx
- docs/docs/reference/tools/category.json
- scripts/lib/cli-fuzzy.js
- docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/discrete-time-signals-and-the-dft/index.md
- docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/index.md
- src/pages/About/TechStack.jsx
- docs/docs/project-scripts/help-scripts/index.md
- docs/scripts/help.js
- src/pages/Credits/DependencyCreditsCard.jsx
- src/components/WasmImageProcessor.jsx
- docs/docs/reference/wasm/setup-and-dependencies.md
🧰 Additional context used
🧠 Learnings (5)
📚 Learning: 2025-12-20T20:11:28.422Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-20T20:11:28.422Z
Learning: In the Img2Num repository, all documentation should be properly organized in the docs/docs/ folder structure following the Docusaurus conventions, either as a dedicated category or integrated into existing categories like project-scripts.
Applied to files:
docs/docs/index.mdCONTRIBUTING.mdREADME.mddocs/docs/reference/tools/ci-workflows.md
📚 Learning: 2025-12-17T22:39:25.711Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-17T22:39:25.711Z
Learning: In the Img2Num repository, all documentation must be placed in the docs/docs/ folder following the Docusaurus structure, not at the repository root.
Applied to files:
docs/docs/index.mdCONTRIBUTING.mdREADME.md
📚 Learning: 2025-12-17T22:39:25.711Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-17T22:39:25.711Z
Learning: In the Img2Num repository, avoid creating strangely-named markdown files (like COMPREHENSIVE_TEST_REPORT.md, DELIVERABLES.md, etc.) at the root level.
Applied to files:
docs/docs/index.mdCONTRIBUTING.mdREADME.md
📚 Learning: 2025-12-17T22:39:25.711Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-17T22:39:25.711Z
Learning: In the Img2Num repository, do not create multiple markdown files at the repository root. The README.md at root should remain brief and point to the Docusaurus site.
Applied to files:
docs/docs/index.mdCONTRIBUTING.mdREADME.md
📚 Learning: 2025-12-17T21:35:30.143Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-17T21:35:30.143Z
Learning: In the Img2Num project, files that import React hooks must use the `.jsx` extension (not `.js`), as `npm run dev` fails otherwise. This is a build configuration requirement.
Applied to files:
CONTRIBUTING.mddocs/docs/guidelines/coding-style.mdREADME.md
🧬 Code graph analysis (2)
scripts/help.js (1)
scripts/lib/read-packageJson-scripts.js (1)
readPackageJsonScripts(11-32)
src/pages/Credits/StaticCreditsCard.jsx (1)
src/components/Tooltip.jsx (1)
Tooltip(5-35)
🪛 LanguageTool
CONTRIBUTING.md
[style] ~22-~22: Consider using a different verb for a more formal wording.
Context: ...ed information about linting standards, fixing issues, and CI integration, see: - [Co...
(FIX_RESOLVE)
docs/docs/guidelines/coding-style.md
[style] ~173-~173: Consider using a different verb for a more formal wording.
Context: ...ges lint-clean. Don't feel obligated to fix unrelated issues! :::
(FIX_RESOLVE)
README.md
[style] ~133-~133: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...thub.io/Img2Num/info/docs/reference)) - Very large images or heavy explanations — use the ...
(EN_WEAK_ADJECTIVE)
docs/docs/project-scripts/help-scripts/scripts-guide.md
[uncategorized] ~99-~99: The official name of this software platform is spelled with a capital “H”.
Context: ...integration A GitHub Actions workflow (.github/workflows/ci.yml) was added to: - Det...
(GITHUB)
docs/docs/reference/tools/ci-workflows.md
[uncategorized] ~16-~16: The official name of this software platform is spelled with a capital “H”.
Context: ... Overview ### Lint Workflow File: .github/workflows/ci.yml (lint job) **Trigger...
(GITHUB)
[uncategorized] ~45-~45: The official name of this software platform is spelled with a capital “H”.
Context: ...# Script Validation Workflow File: .github/workflows/ci.yml (validate-scripts job...
(GITHUB)
docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/introduction/index.md
[style] ~41-~41: ‘exact same’ might be wordy. Consider a shorter alternative.
Context: ...n-time-and-frequency-domains) shows the exact same sinusoid plotted in both the time and f...
(EN_WORDINESS_PREMIUM_EXACT_SAME)
[style] ~119-~119: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...s practical implementation" The FFT is just a fast algorithm for computing the DFT:...
(REP_BE_JUST)
[style] ~120-~120: The word “because” means “for the reason that” and thus introduces redundancy.
Context: ... The only reason FFTs appear everywhere is because they are essentially just fast DFTs...
(REASON_IS_BECAUSE)
🪛 markdownlint-cli2 (0.18.1)
docs/docs/guidelines/coding-style.md
82-82: Code block style
Expected: fenced; Actual: indented
(MD046, code-block-style)
87-87: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
docs/docs/reference/wasm/troubleshooting-and-optimizations.md
29-29: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔇 Additional comments (23)
src/pages/About/WhatIsThis.jsx (1)
13-13: LGTM! Clean formatting adjustment.The anchor tag has been reformatted to a single line while preserving all attributes, including the security-conscious
rel="noopener noreferrer"for the external link. This formatting change aligns with the PR's linting and code style objectives.docs/docs/reference/wasm/_category_.json (1)
9-9: LGTM—JSON syntax corrected.Removing the trailing comma makes this valid standard JSON per RFC 8259. Trailing commas are not permitted after the last property in a JSON object. This fix aligns with the PR's linting objectives and is likely what automated linting tools flagged.
src/pages/Credits/StaticCreditsCard.jsx (1)
46-61: LGTM! Formatting changes align with linting objectives.The formatting adjustments to the Tooltip-wrapped anchor tags comply with the project's linting rules. These changes are purely cosmetic with no impact on functionality or user experience, and they successfully align with the PR's goal of passing
npm run lint:style.docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/continuous-fourier-transform/index.md (1)
17-27: Excellent pedagogical clarity enhancement.Adding explicit CFT and Inverse CFT equations (lines 19–21 and 25–27) strengthens the mathematical rigor of the prerequisite material. The note block formatting and expanded danger note (lines 50–54) further improve clarity by connecting frequency-domain magnitude to prior sections.
docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/fourier-series--the-bridge/index.md (4)
7-16: Image and Python script imports are well-structured.All imports follow Docusaurus conventions correctly. The raw-loader pattern for Python scripts enables clean embedding of code examples, and image imports are properly declared for JSX usage.
25-53: Figures with embedded images and code references are properly structured.Each figure includes appropriate
<img>tags with descriptive alt text and collapsible code blocks usingCodeBlockcomponent. The pattern is consistent across all three figures.
65-91: Mathematical notation and explanation are clear and well-formatted.Proper use of LaTeX for equations (display and inline), clear variable definitions, and the note about DC component (lines 78–82) appropriately clarifies a potential confusion point.
92-134: Collapsible details section provides intuitive coefficient interpretation.The visual approach using a complex plane triangle and step-by-step breakdown of magnitude/phase via Pythagoras and arctangent is pedagogically sound. The "Key points" subsection (lines 110–126) effectively reinforces the trigonometric intuition.
scripts/help.js (1)
1-23: LGTM! Quote style normalization aligns with linting standards.The changes consistently normalize quote style from double to single quotes throughout the file, which aligns with the PR's linting and formatting objectives. No functional changes were introduced.
docs/docs/project-scripts/help-scripts/scripts-guide.md (1)
1-168: LGTM! Formatting adjustments align with style guidelines.All changes are formatting-only (indentation, line breaks, list structure) with no content modifications. These adjustments are consistent with the EditorConfig and linting standards introduced in this PR.
docs/docs/reference/tools/ci-workflows.md (7)
1-7: LGTM! Frontmatter is properly configured.The frontmatter includes appropriate metadata and the
sidebar_position: 2aligns with the maintainer's request to ensure this page renders after the overview.
14-40: LGTM! Lint workflow documentation is accurate and complete.The documentation clearly describes the lint job's triggers, steps, checks, and failure conditions. This aligns well with the PR objectives and provides useful guidance for contributors.
43-64: LGTM! Script validation workflow documentation is clear and accurate.The documentation effectively explains the conditional execution and smart detection features of the validate-scripts job. The steps and triggers are clearly outlined.
67-79: LGTM! Local verification instructions are helpful and accurate.The commands provided allow contributors to verify their changes locally before pushing, which aligns with the PR's goal of integrating linting into the development workflow.
81-107: LGTM! Troubleshooting guidance is comprehensive and practical.The troubleshooting section provides clear, actionable solutions for common CI failures. The step-by-step instructions and command examples will help contributors quickly resolve issues.
109-132: LGTM! Workflow configuration details are accurate and informative.The section correctly documents the Node.js version, caching strategy, and conditional execution logic. The YAML example provides helpful context for understanding the workflow setup.
134-151: LGTM! Best practices and future roadmap are well-documented.The best practices provide sensible guidance for contributors, and the future enhancements section sets clear expectations for CI evolution. The contributing note appropriately encourages discussion before implementation.
README.md (1)
105-109: Well-organized link updates to Docusaurus site.The Essential links section now correctly points to the centralized Docusaurus documentation site, aligning with the repository's documentation structure and making the README brief and maintainable.
CONTRIBUTING.md (1)
7-33: Code Quality section appropriately delegates to Docusaurus docs.The new "Code Quality and Linting" section provides quick-start commands and clear references to the Docusaurus documentation for detailed guidance, maintaining a minimal root CONTRIBUTING.md as intended. The structure is clear and user-friendly.
docs/docs/guidelines/coding-style.md (2)
9-19: General Rules section properly updated with linting standards.The updated general rules clearly document LF line endings, final newline insertion, and maximum line length, providing a strong foundation for the linting section below. This establishes clear, consistent expectations.
108-174: Comprehensive linting documentation addresses PR objectives.The new "Linting and Style Checks" section is well-structured, covering local command execution, linter responsibilities, fixing strategies, editor setup, special cases (Makefiles), and CI integration. This provides clear guidance for contributors and aligns with the PR's goal of establishing automated linting checks. The tip about current status manages expectations appropriately.
docs/changelogSidebarGenerator.js (2)
7-7: LGTM! Function signature consolidation is clean.The single-line function signature is well within the 120-character limit and improves readability.
28-28: LGTM! Version parsing consolidation is appropriate.The consolidated destructuring and parsing logic is within the line length limit and maintains clarity.
- Increase max_line_length to 150 for HTML files - Add LICENSE* pattern to catch all LICENSE files - Add .tsx to JavaScript/React file patterns - Configure editorconfig-checker to skip markdown detailed validation - Resolves conflicts between Prettier's 3-space nested lists and 2-space rule This allows formatters and linters to coexist without conflicts.
- Fixed trailing whitespace in CSS and test files - Formatted markdown documentation files - Reduced lint errors from 258 to 178
- Exclude Python (.py), Windows scripts (.bat, .ps1), bash (img2num), C++ (.cpp, .h) - These files are handled by their respective formatters (Python, clang-format) - Increase max_line_length to 200 for JS/JSX/HTML (allows long import/meta tags) - Keep strict checking for JSON, YAML, and core project files This allows each formatter to handle its domain without conflicts.
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/docs/introduction/getting-started.md (1)
36-36: Fix heading level inconsistency across OS installation sections.The Windows section uses
#### Installing Docker(line 36), but macOS (line 129) and Linux (line 145) use###. Since these are parallel sections at the same nesting depth within TabItems, they should use matching heading levels. This breaks document outline consistency.🔎 Proposed fix
<TabItem value="macos" label="macOS"> -### Installing Docker on macOS +#### Installing Docker on macOS 1. Download and install **Docker Desktop** from [https://www.docker.com/products/docker-desktop](https://www.docker.com/products/docker-desktop).<TabItem value="linux" label="Linux"> -### Installing Docker on Linux +#### Installing Docker on Linux 1. Install Docker and Docker Compose via your package manager. For Ubuntu/Debian:Also applies to: 129-129, 145-145
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (35)
.editorconfig.editorconfig-checker.jsondocs/docs/guidelines/pull-requests.mddocs/docs/introduction/getting-started.mddocs/docs/reference/react/components/GlassCard/index.mddocs/docs/reference/react/components/NavBar/index.mddocs/docs/reference/react/components/NavBar/testing.mddocs/docs/reference/react/components/ThemeSwitch/tests.mddocs/docs/reference/react/css/global/variables/theme-independent.mddocs/docs/reference/react/css/global/variables/theme/best-practice.mddocs/docs/reference/react/css/global/variables/theme/dark.mddocs/docs/reference/react/css/global/variables/theme/extending.mddocs/docs/reference/react/css/global/variables/theme/light.mddocs/docs/reference/react/hooks/useTheme/index.mddocs/docs/reference/react/hooks/useTheme/tests.mddocs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/complexity-and-memory.mddocs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/connected-components.mddocs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/faq.mddocs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/limitations-and-pitfalls.mddocs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/overview.mddocs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/testing-and-debugging-suggestions.mddocs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/variants-and-improvements.mddocs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/walkthrough-and-usage.mddocs/docusaurus.config.jsdocs/src/components/ColorSwatch.jsxindex.htmlsrc/components/NavBar.jsxsrc/components/NavBar.module.csssrc/components/NavBar.test.jsxsrc/components/ThemeSwitch.jsxsrc/components/ThemeSwitch.test.jsxsrc/global-styles/variables.csssrc/hooks/useGoogleAnalytics.jssrc/hooks/useTheme.test.jsxsrc/test/setup.js
💤 Files with no reviewable changes (2)
- docs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/variants-and-improvements.md
- docs/src/components/ColorSwatch.jsx
✅ Files skipped from review due to trivial changes (12)
- docs/docs/reference/react/css/global/variables/theme/best-practice.md
- docs/docs/reference/react/components/NavBar/testing.md
- src/components/NavBar.jsx
- docs/docs/reference/react/css/global/variables/theme-independent.md
- src/hooks/useTheme.test.jsx
- docs/docusaurus.config.js
- docs/docs/reference/react/css/global/variables/theme/extending.md
- docs/docs/reference/react/components/NavBar/index.md
- index.html
- src/components/NavBar.test.jsx
- src/test/setup.js
- docs/docs/reference/react/hooks/useTheme/index.md
🚧 Files skipped from review as they are similar to previous changes (2)
- .editorconfig
- .editorconfig-checker.json
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-12-20T20:11:28.422Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-20T20:11:28.422Z
Learning: In the Img2Num repository, all documentation should be properly organized in the docs/docs/ folder structure following the Docusaurus conventions, either as a dedicated category or integrated into existing categories like project-scripts.
Applied to files:
docs/docs/introduction/getting-started.mddocs/docs/reference/react/components/GlassCard/index.md
📚 Learning: 2025-12-17T21:35:30.143Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-17T21:35:30.143Z
Learning: In the Img2Num project, files that import React hooks must use the `.jsx` extension (not `.js`), as `npm run dev` fails otherwise. This is a build configuration requirement.
Applied to files:
docs/docs/reference/react/components/GlassCard/index.md
🧬 Code graph analysis (2)
src/components/ThemeSwitch.jsx (2)
src/components/Tooltip.jsx (1)
Tooltip(5-35)src/hooks/useTheme.js (2)
theme(4-17)toggleTheme(37-39)
src/hooks/useGoogleAnalytics.js (1)
src/components/NavBar.jsx (1)
useLocation(27-27)
🪛 LanguageTool
docs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/testing-and-debugging-suggestions.md
[grammar] ~13-~13: Use a hyphen to join words.
Context: ...es that exercise corner cases: - Single pixel islands - Long 1-pixel-wide arms (...
(QB_NEW_EN_HYPHEN)
docs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/faq.md
[style] ~31-~31: ‘exactly the same’ might be wordy. Consider a shorter alternative.
Context: ...n, left, or right** - All pixels have exactly the same RGBA values Diagonal adjacency **doe...
(EN_WORDINESS_PREMIUM_EXACTLY_THE_SAME)
🪛 markdownlint-cli2 (0.18.1)
docs/docs/guidelines/pull-requests.md
16-16: Bare URL used
(MD034, no-bare-urls)
docs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/walkthrough-and-usage.md
71-71: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔇 Additional comments (30)
docs/docs/reference/react/components/GlassCard/index.md (1)
18-24: Documentation improvement looks good.The expanded bullet list clearly outlines what contributors need to provide, making the "Help Wanted" section more actionable. The formatting change improves readability.
docs/docs/reference/react/hooks/useTheme/tests.md (1)
1-104: LGTM! Formatting improvements align with linting goals.All changes are formatting-only adjustments (whitespace, line wrapping, indentation) that improve readability and consistency without altering content or semantics. Markdown syntax, code blocks, and links remain correct throughout.
src/hooks/useGoogleAnalytics.js (1)
1-9: LGTM! Formatting changes align with ESLint quote rules.The quote-style changes (double → single) are purely stylistic and do not affect functionality. The GA tracking logic remains correct: gtag function existence check, localhost exclusion, and page_view event triggering are all preserved.
docs/docs/reference/react/css/global/variables/theme/dark.md (2)
13-24: Tables are correctly formatted and content is preserved.The Colors table is well-structured with proper markdown alignment, all hex color values are valid, and ColorSwatch components are correctly bound to their respective values. No semantic changes to the documented tokens.
28-35: Glass effect table structure is consistent with the light theme variant.Proper 4-column layout matching the corresponding light.md table. All RGBA values are syntactically correct and ColorSwatch previews are accurate.
docs/docs/reference/react/css/global/variables/theme/light.md (2)
13-24: Colors table formatting and content are correct.All five columns are properly aligned, hex values are valid, and ColorSwatch bindings match their respective color variables. Formatting aligns with the dark theme variant.
28-36: Glass effect table is consistently formatted across both theme files.The 4-column structure (Variable, Value, Preview, Description) matches dark.md and is clean and maintainable. All RGBA values are syntactically valid.
docs/docs/guidelines/pull-requests.md (3)
1-50: Well-structured PR guidance documentation.The additions to this file significantly enhance contributor clarity on PR workflow, conflict avoidance, and quality expectations. The new sections (branch creation, commit guidelines reference, push/merge-conflict guidance, PR tips block) are well-formatted using Docusaurus directives (:::danger, :::tip) and provide actionable guidance.
15-15: Verify the relative link path.Line 15 references
[previous section](../commits). Please confirm that acommits.mdfile exists in the parentdocs/guidelines/directory; otherwise, update the link path to point to the correct location.
16-16: Static analysis flagged line 16 as a bare URL (MD034); likely a false positive.The static analysis tool flagged line 16 for
no-bare-urls(MD034). After review, line 15 contains a properly formatted markdown link[previous section](../commits), not a bare URL. This appears to be a tool quirk with relative links or line-count variance. No action required unless the tool consistently flags this pattern—in which case, verify tool configuration or suppress the rule for this file if warranted.src/components/ThemeSwitch.test.jsx (1)
20-29: LGTM!The multi-line formatting of the mock icon components improves readability and aligns with the PR's linting standardization goals. The mock implementations correctly preserve the
classNameprop anddata-testidattributes used by the test assertions.src/components/ThemeSwitch.jsx (1)
20-25: LGTM!The multi-line formatting of the button props improves readability. The component logic remains correct—dynamic aria-label and tooltip content properly reflect the current theme state.
src/global-styles/variables.css (2)
22-39: LGTM!Lowercase hex color normalization is a valid style convention. CSS hex values are case-insensitive, so this change has no functional impact while improving consistency across the codebase.
58-78: LGTM!Dark theme color variables consistently normalized to lowercase hex, matching the light theme formatting above.
src/components/NavBar.module.css (4)
58-60: LGTM!Multi-line transition formatting improves readability while preserving the same transition behavior.
214-228: LGTM!Splitting the grouped
nth-childtransition-delay rules into individual blocks improves maintainability. The staggered animation timing (0.03s increments) is preserved.
250-273: LGTM!Hex color values normalized to lowercase (
#f8eacd), consistent with the color casing standardization applied invariables.css.
284-288: Verify the.externalLinkIconselector placement.The
.externalLinkIconclass is defined outside the@media (max-width: 768px)block, making it apply globally. This appears intentional, but please confirm this selector should not be scoped within the media query.docs/docs/introduction/getting-started.md (2)
147-154: Verify Docker package names for current Ubuntu/Debian releases.The Linux installation step uses
docker.ioanddocker-compose. Verify thatdocker-compose(as a standalone package) is still the correct package name for the Ubuntu/Debian versions you're targeting. Modern releases may usedocker-compose-plugin(packaged with docker.io) or the newerdocker-composev2 as part of the Docker CLI. Confirm the instructions reflect current best practices.
563-564: Verify documentation cross-reference paths exist in Docusaurus structure.Lines 563–564 reference
../../project-scripts/overviewand../../category/guidelinesas relative paths. Confirm these paths exist in the final Docusaurus documentation structure after the reorganization described in the PR objectives (moved to docs/docs/guidelines/coding-style.md and docs/docs/reference/tools/ci-workflows.md). If paths have changed, update the references accordingly.docs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/overview.md (1)
26-26: Formatting standardizations look good.The shift from asterisk (
*) to hyphen (-) for bullet points and italic formatting updates are valid markdown improvements. These changes align with the linting/formatting objectives of the PR.Also applies to: 61-62, 66-67
docs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/testing-and-debugging-suggestions.md (1)
9-27: New testing guidance is well-structured and helpful.The new sections (synthetic test images, label visualization, unit tests, instrumentation) provide concrete, actionable guidance that complements the algorithm documentation. Content is clear and aligns with the function's core concepts (region sizes, connectivity, recoloring).
docs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/complexity-and-memory.md (1)
14-16: Technical content is accurate and well-explained.The new prose on time complexity (O(N) flood-fill + merge), memory usage (O(N) labels array + regions vector), and cache behavior (potential improvements via scanline two-pass or union-find) is clear and correct. The explanations properly contextualize the algorithm's performance characteristics without over-claiming.
Also applies to: 19-21, 24-25
docs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/faq.md (1)
1-387: Excellent documentation polish and clarity improvements.The FAQ has been substantially expanded and restructured for clarity. Sections are well-organized, technical concepts are clearly explained, and the added structure (bullet lists, details blocks, examples) makes the content accessible without sacrificing precision. Editorial changes throughout enhance readability and understanding of the algorithm's design decisions.
docs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/limitations-and-pitfalls.md (1)
1-47: Clear and valuable clarifications on algorithm limitations.The expanded sections provide helpful detail on pitfalls and edge cases (holes in bounding boxes, order-dependent behavior, performance optimization opportunities). Explanations are precise and technical, making the document more useful for implementers and users. The added notes about potential extensions (custom equality-checker, detection methods) and performance considerations are well-placed.
docs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/connected-components.md (5)
32-42: SVG formatting is safe and maintains visual consistency.The SVG has been reformatted for readability (one rect per line) without altering its structure or rendering behavior. The output should remain visually identical in the rendered documentation.
48-58: Excellent clarity improvements to the algorithm explanation.The rewording breaks up dense paragraphs into clearer, more digestible statements. The new note block (lines 54–58) explicitly documents the iteration order and stopping behavior—a valuable clarification that wasn't emphasized before and helps readers understand the implementation's actual behavior.
66-107: Mathematical formatting enhances readability without altering correctness.The equations are well-structured with explicit line breaks and improved spacing. The addition of W and H variable definitions (lines 102–107) makes the bounding-box geometry clearer. Math notation and symbolism are correct and properly rendered in Markdown/Docusaurus format.
109-112: Tip block is a helpful addition for readers seeking implementation details.Directing readers to the Region struct source code encourages deeper understanding and makes the documentation more actionable for developers exploring the codebase.
124-126: Clarification on merging strategy is important and now explicit.The distinction that the algorithm performs "pixel-wise recoloring" rather than formal graph merging is now clear. This accurately reflects the implementation and sets correct expectations about neighbor selection behavior.
- Add missing asterisk prefix to JSDoc comment lines - Resolves final 3 linting errors - All linting checks now pass! ✅
|
@Ryan-Millard Excellent news! All linting conflicts have been resolved! 🎉 ✅ Final Status: 0 errorsJourney:
📊 What was done:
🎯 Result:The linting infrastructure is now fully operational and conflict-free! The CI will:
All future PRs will have clean linting checks. Ready to merge! 🚀 |
Hey @LostSkyWalker-1401, thank you so much! I'm reviewing it now. |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/hooks/useTheme.test.jsx (1)
57-63: Consider using consistent mock structure for maintainability.The simplified
window.matchMediamock here (and on lines 79-85) is missing properties present in thebeforeEachsetup (lines 30-41):media,onchange, anddispatchEvent. While tests currently pass, consistent mock structures improve maintainability and prevent potential failures if tests are extended to use these properties.🔎 Proposed fix for consistent mock structure
- window.matchMedia = vi.fn().mockImplementation(() => ({ - matches: true, - addListener: vi.fn(), - removeListener: vi.fn(), - addEventListener: vi.fn(), - removeEventListener: vi.fn(), - })); + window.matchMedia = vi.fn().mockImplementation((query) => ({ + matches: true, + media: query, + onchange: null, + addListener: vi.fn(), + removeListener: vi.fn(), + addEventListener: vi.fn(), + removeEventListener: vi.fn(), + dispatchEvent: vi.fn(), + }));Apply the same structure to lines 79-85 as well.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (11)
.editorconfig-checker.jsondocs/docs/reference/react/hooks/useTheme/tests.mddocs/sidebars.jspackage.jsonscripts/format-wasm.jsscripts/lib/cli-fuzzy.jsscripts/lib/read-packageJson-scripts.jsscripts/validate-scripts.jssrc/components/NavBar.jsxsrc/components/NavBar.test.jsxsrc/hooks/useTheme.test.jsx
✅ Files skipped from review due to trivial changes (1)
- docs/sidebars.js
🚧 Files skipped from review as they are similar to previous changes (7)
- scripts/validate-scripts.js
- src/components/NavBar.test.jsx
- .editorconfig-checker.json
- src/components/NavBar.jsx
- docs/docs/reference/react/hooks/useTheme/tests.md
- scripts/lib/cli-fuzzy.js
- scripts/lib/read-packageJson-scripts.js
🧰 Additional context used
🧬 Code graph analysis (1)
src/hooks/useTheme.test.jsx (1)
src/hooks/useTheme.js (2)
theme(4-17)toggleTheme(37-39)
🔇 Additional comments (5)
src/hooks/useTheme.test.jsx (1)
7-17: LGTM! Clean formatting improvements.The JSX indentation adjustments improve readability and align with the formatting standards applied throughout this PR.
scripts/format-wasm.js (2)
29-29: Clear and informative completion message.The conditional log message appropriately reflects the mode of operation.
12-27: Check mode implementation looks correct.The
--checkflag integration is well-implemented:
--dry-run --Werrorare official clang-format flags that work together;--dry-runperforms a dry-run without modifying files, and--Werrormakes any formatting warnings return non-zero exit code, correctly failing CI.stdio: 'inherit'ensures output is visible in CI logs.- Error handling properly exits with code 1.
Optional: Add per-file logging in check mode
For better CI log visibility, consider logging each file checked successfully:
if (checkOnly) { execSync(`clang-format --dry-run --Werror "${file}"`, { stdio: 'inherit' }); + console.log(`Checked: ${file}`); return; }package.json (2)
69-85: Excellent documentation clarity.The updated descriptions clearly distinguish between scripts that modify files and check-only variants. The consistent wording across format, format-js, and format-wasm script families makes the intent immediately clear to developers and CI maintainers.
149-153: Script wiring is correct and consistent.The check variants are properly implemented:
format:checkchains both formatters, matching the pattern of the regularformatscript.format-js:checkcorrectly uses Prettier's native--checkflag.format-wasm:checkpasses--checkto the script, coordinating with the changes inscripts/format-wasm.js.The
&&chaining ensures CI fails fast on the first formatting violation.
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
README.md (1)
131-137: Consider softening language to match tone.Line 133 uses "very large images" as an intensifier. This phrasing can be strengthened by using more specific or direct language (e.g., "large images" or "extended explanations").
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
README.md
🧰 Additional context used
🧠 Learnings (5)
📚 Learning: 2025-12-17T22:39:25.711Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-17T22:39:25.711Z
Learning: In the Img2Num repository, do not create multiple markdown files at the repository root. The README.md at root should remain brief and point to the Docusaurus site.
Applied to files:
README.md
📚 Learning: 2025-12-20T20:11:28.422Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-20T20:11:28.422Z
Learning: In the Img2Num repository, all documentation should be properly organized in the docs/docs/ folder structure following the Docusaurus conventions, either as a dedicated category or integrated into existing categories like project-scripts.
Applied to files:
README.md
📚 Learning: 2025-12-17T22:39:25.711Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-17T22:39:25.711Z
Learning: In the Img2Num repository, all documentation must be placed in the docs/docs/ folder following the Docusaurus structure, not at the repository root.
Applied to files:
README.md
📚 Learning: 2025-12-17T21:35:30.143Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-17T21:35:30.143Z
Learning: In the Img2Num project, files that import React hooks must use the `.jsx` extension (not `.js`), as `npm run dev` fails otherwise. This is a build configuration requirement.
Applied to files:
README.md
📚 Learning: 2025-12-17T22:39:25.711Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-17T22:39:25.711Z
Learning: In the Img2Num repository, avoid creating strangely-named markdown files (like COMPREHENSIVE_TEST_REPORT.md, DELIVERABLES.md, etc.) at the root level.
Applied to files:
README.md
🪛 LanguageTool
README.md
[style] ~133-~133: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...thub.io/Img2Num/info/docs/reference)) - Very large images or heavy explanations — use the ...
(EN_WEAK_ADJECTIVE)
🔇 Additional comments (2)
README.md (2)
119-121: LGTM on updated contribution guidelines.The guidelines now properly direct contributors to the centralized docs site (coding style, commit rules, and templates). This aligns well with the PR objective to consolidate documentation in Docusaurus.
Based on learnings, this change follows the pattern of keeping the root README brief and pointing users to the docs site for detailed guidance.
1-9: LGTM on CAUTION block and TODO comment.The breaking change notice for PR #93 is appropriately positioned at the top of the README with a clear, dated TODO for removal. This provides visibility and context for users of the project.
Ryan-Millard
left a comment
There was a problem hiding this comment.
This is amazing! Thank you so much for all of the work you put into this PR - it's definitely going to help us out.
I've left some small change requests on individual files - please will you implement them. @CodeRabbit has also done that, so please will you have a look at all of the comments it has left so far. Not all of them need to be implemented, please just resolve them.
|
@CodeRabbit full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (14)
docs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/walkthrough-and-usage.md (1)
74-76: Remove the orphaned code fence (duplicate of previous review comment).Lines 74–76 contain a stray code fence with no language specifier and no content after the
</Tabs>closing tag. This was flagged in the previous review and should be removed to produce valid markdown.🔎 Proposed fix
</Tabs> - ```docs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/testing-and-debugging-suggestions.md (1)
13-13: [Duplicate] Compound modifier needs a hyphen.This issue was already flagged in a previous review comment. Line 13 should read "Single-pixel islands" instead of "Single pixel islands."
docs/docs/index.md (1)
43-43: Remove leading spaces from the closing:::delimiter.The closing
:::directive must not have leading whitespace according to Docusaurus admonition syntax. The line should start with:::(no leading spaces).🔎 Proposed fix
- ::: +:::docs/docs/reference/wasm/troubleshooting-and-optimizations.md (1)
29-36: Add language specifier to fenced code block.The code block is missing a language identifier. Add
bashorshellafter the opening fence for proper syntax highlighting.🔎 Proposed fix
- ``` + ```bash emcc ... \.editorconfig (1)
51-51: Addtsextension as requested by maintainer.The previous review comment from Ryan-Millard requested adding
tsto this pattern. The current change addedtsxbut is still missingts.🔎 Proposed fix
-[*.{js,jsx,tsx}] +[*.{js,ts,jsx,tsx}]docs/changelogSidebarGenerator.js (1)
43-44: Line exceeds max length limit.Line 43 exceeds the 120-character limit specified in
.editorconfig. This conflicts with the new linting enforcement being introduced in this PR.🔎 Proposed fix: break into multiple lines
- return [...(indexItem ? [indexItem] : []), ...sortedReleaseItems, ...(mainChangelogItem ? [mainChangelogItem] : [])]; + return [ + ...(indexItem ? [indexItem] : []), + ...sortedReleaseItems, + ...(mainChangelogItem ? [mainChangelogItem] : []), + ];README.md (3)
73-73: Fix self-closing div tag to properly contain badge content.Line 73 uses a self-closing div tag (
<div align="center" />), which creates an empty container. The badges that follow (lines 75–81) are outside this div and will not be centered.🔎 Proposed fix
-<div align="center" /> +<div align="center">Ensure there is a matching
</div>after the badge block (after line 81).
84-84: Fix self-closing div tag to properly contain badge content.Line 84 uses a self-closing div tag (
<div align="center" />), which creates an empty container. The badges that follow (lines 86–92) are outside this div and will not be centered.🔎 Proposed fix
-<div align="center" /> +<div align="center">Ensure there is a matching
</div>after the badge block (after line 92).
105-109: Correct documentation link paths.Several documentation links have incorrect URL paths:
- Line 105: Link text shows
getting-started/but href points tointroduction/getting-started(mismatch causes confusion)- Line 106: Path
category/-guidelines/is incorrect — should beguidelines- Line 109: Missing
/docspath segment; should behttps://ryan-millard.github.io/Img2Num/info/docs/changelog/🔎 Proposed fixes
-- Quick start - [https://ryan-millard.github.io/Img2Num/info/docs/getting-started/](https://ryan-millard.github.io/Img2Num/info/docs/introduction/getting-started) -+ Quick start - [https://ryan-millard.github.io/Img2Num/info/docs/introduction/getting-started](https://ryan-millard.github.io/Img2Num/info/docs/introduction/getting-started) -- Guidelines - [https://ryan-millard.github.io/Img2Num/info/docs/category/-guidelines/](https://ryan-millard.github.io/Img2Num/info/docs/category/-guidelines) -+ Guidelines - [https://ryan-millard.github.io/Img2Num/info/docs/guidelines](https://ryan-millard.github.io/Img2Num/info/docs/guidelines) -- Changelog - [https://ryan-millard.github.io/Img2Num/info/docs/changelog/](https://ryan-millard.github.io/Img2Num/info/changelog) ++ Changelog - [https://ryan-millard.github.io/Img2Num/info/docs/changelog/](https://ryan-millard.github.io/Img2Num/info/docs/changelog/)docs/docs/reference/react/components/ThemeSwitch/tests.md (1)
123-124: Fix the broken documentation link (unresolved from prior review).The link
[ThemeSwitch Component](../)at line 123 targets a directory without anindex.mdfile and will not resolve correctly in Docusaurus. This was flagged in the prior review and remains unaddressed. Change it to reference the component documentation explicitly:- - [ThemeSwitch Component](../) + - [ThemeSwitch Component](./index.md)Line 124's
[useTheme Hook](../../../hooks/useTheme)is valid and requires no changes.docs/docs/guidelines/coding-style.md (3)
82-82: Fix indentation in code block (already flagged).Line 82 has leading indentation that causes markdownlint to interpret it as an indented code block within the fenced block. This issue was already identified in a previous review with a proposed solution.
87-87: Fix code block closing delimiter (already flagged).Line 87 uses 4 backticks to close a code block that was opened with 3 backticks. This issue was already identified in a previous review.
126-126: Fix bash code block closing delimiter (already flagged).Line 126 uses 4 backticks to close a code block that was opened with 3 backticks on line 114. This issue was already identified in a previous review.
src/components/NavBar.jsx (1)
79-80: Duplicate issue: incorrect eslint suppression comment.Same issue as lines 67-68: the
iconvariable is used, not unused, and "Supress" is misspelled.Apply the same fix as suggested for the internal links section above.
🧹 Nitpick comments (6)
docs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/faq.md (1)
31-31: Consider simplifying "exactly the same RGBA values".Per static analysis, the phrase "exactly the same RGBA values" may be unnecessarily wordy. Given this PR adds linting and code quality infrastructure, consider rephrasing for conciseness—e.g., "identical RGBA values" or "matching RGBA values."
docs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/limitations-and-pitfalls.md (1)
24-25: Consider clarifying the phrase "it is not anintelligent check."The intent here is that the chosen large neighbor depends on scan order rather than any heuristic prioritization—could be slightly more explicit. For example: "...which means the choice is determined by implementation (scan order), not by any intelligent prioritization heuristic."
src/components/WasmImageProcessor.jsx (1)
104-104: Consider extracting nested ternary for readability.The single-line nested ternary with four branches is dense and harder to parse. While it passes linting, extracting it into a named helper function or breaking it into multiple lines could improve maintainability.
🔎 Optional refactor: extract to helper function
+ const getMinimumAllowedMinArea = (area) => { + if (area > 100_000_000) return 25; + if (area > 10_000_000) return 20; + if (area > 1_000_000) return 15; + return 10; + }; + const area = width * height; // Prevents minArea from being too small - const minimumAllowedMinArea = area > 100_000_000 ? 25 : area > 10_000_000 ? 20 : area > 1_000_000 ? 15 : 10; + const minimumAllowedMinArea = getMinimumAllowedMinArea(area); const minArea = Math.ceil(Math.max(area / 10_000, minimumAllowedMinArea));src/pages/Credits/DependencyCreditsCard.jsx (1)
32-33: RenamecacheTimetogcTimefor React Query v5 compatibility.The project uses @tanstack/react-query v5.90.14, where
cacheTimewas renamed togcTime. While the current code continues to work, it will trigger deprecation warnings. Update line 33 to usegcTime: ONE_WEEKinstead..editorconfig-checker.json (1)
1-40: Document the exclusion strategy for future maintainers.The extensive exclusion list aligns with the PR's goal of avoiding conflicts between editorconfig-checker and domain-specific formatters (Prettier for markdown, clang-format for C++, etc.). However, the configuration lacks inline comments explaining this rationale.
🔎 Suggested documentation additions
{ + // Exclude files handled by other formatters to avoid conflicts: + // - Prettier: .md, .mdx + // - clang-format: .cpp, .h + // - Domain-specific: .py, .bat, .ps1 + // Also exclude build artifacts, lock files, and binary assets "Exclude": [ "node_modules", "dist",Alternatively, document the strategy in
docs/docs/guidelines/coding-style.mdordocs/docs/reference/tools/ci-workflows.md.Note: The
"Disable": { "EndOfLine": false, ... }pattern means checks are enabled (double negative). Consider renaming to"Enable"in a future update if the tool supports it, or add a comment clarifying the semantics.src/components/NavBar.jsx (1)
1-1: React import may be unnecessary.The explicit
Reactimport is only needed here forReact.createElement(). If you switch to standard JSX icon rendering (as suggested above), this import can be simplified back to just importinguseState.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (99)
.editorconfig.editorconfig-checker.json.github/workflows/ci.ymlCONTRIBUTING.mdREADME.mddocker-compose.ymldocs/changelogSidebarGenerator.jsdocs/docs/guidelines/_category_.jsondocs/docs/guidelines/coding-style.mddocs/docs/guidelines/commits.mddocs/docs/guidelines/issues.mddocs/docs/guidelines/pull-requests.mddocs/docs/index.mddocs/docs/introduction/getting-started.mddocs/docs/project-scripts/help-scripts/index.mddocs/docs/project-scripts/help-scripts/scripts-guide.mddocs/docs/reference/react/_category_.jsondocs/docs/reference/react/components/GlassCard/index.mddocs/docs/reference/react/components/NavBar/index.mddocs/docs/reference/react/components/NavBar/testing.mddocs/docs/reference/react/components/ThemeSwitch/tests.mddocs/docs/reference/react/components/Tooltip/index.mddocs/docs/reference/react/components/Tooltip/tests.mddocs/docs/reference/react/css/global/variables/theme-independent.mddocs/docs/reference/react/css/global/variables/theme/best-practice.mddocs/docs/reference/react/css/global/variables/theme/dark.mddocs/docs/reference/react/css/global/variables/theme/extending.mddocs/docs/reference/react/css/global/variables/theme/light.mddocs/docs/reference/react/hooks/useTheme/index.mddocs/docs/reference/react/hooks/useTheme/tests.mddocs/docs/reference/tools/_category_.jsondocs/docs/reference/tools/ci-workflows.mddocs/docs/reference/wasm/_category_.jsondocs/docs/reference/wasm/development-workflow.mddocs/docs/reference/wasm/how-to-add-a-module.mddocs/docs/reference/wasm/modules/_category_.jsondocs/docs/reference/wasm/modules/image/_category_.jsondocs/docs/reference/wasm/modules/image/fft_iterative/_category_.jsondocs/docs/reference/wasm/modules/image/fft_iterative/api.mddocs/docs/reference/wasm/modules/image/fft_iterative/explained.mddocs/docs/reference/wasm/modules/image/fft_iterative/implementation.mddocs/docs/reference/wasm/modules/image/fft_iterative/overview.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/continuous-fourier-transform/index.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/discrete-time-signals-and-the-dft/index.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/fourier-series--the-bridge/index.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/how-fourier-transforms-work/index.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/index.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/introduction/index.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/keywords.mddocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/why-img2num-uses-the-dft/index.mddocs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/complexity-and-memory.mddocs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/connected-components.mddocs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/faq.mddocs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/limitations-and-pitfalls.mddocs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/overview.mddocs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/testing-and-debugging-suggestions.mddocs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/variants-and-improvements.mddocs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/walkthrough-and-usage.mddocs/docs/reference/wasm/modules/image/overview.mddocs/docs/reference/wasm/overview.mddocs/docs/reference/wasm/setup-and-dependencies.mddocs/docs/reference/wasm/troubleshooting-and-optimizations.mddocs/docs/reference/wasm/using-wasm-in-react.mddocs/docusaurus.config.jsdocs/scripts/help.jsdocs/sidebars.jsdocs/src/components/ColorSwatch.jsxindex.htmlpackage.jsonscripts/build-wasm.jsscripts/format-wasm.jsscripts/handle-changelog.jsscripts/help.jsscripts/lib/cli-fuzzy.jsscripts/lib/colors.jsscripts/lib/read-packageJson-scripts.jsscripts/validate-scripts.jssrc/components/NavBar.jsxsrc/components/NavBar.module.csssrc/components/NavBar.test.jsxsrc/components/ThemeSwitch.jsxsrc/components/ThemeSwitch.test.jsxsrc/components/Tooltip.jsxsrc/components/Tooltip.test.jsxsrc/components/WasmImageProcessor.jsxsrc/global-styles/variables.csssrc/hooks/useGoogleAnalytics.jssrc/hooks/useTheme.test.jsxsrc/pages/About/Author.jsxsrc/pages/About/CTA.jsxsrc/pages/About/Motivation.jsxsrc/pages/About/TechStack.jsxsrc/pages/About/WhatIsThis.jsxsrc/pages/Credits/ContributorsCreditsCard.jsxsrc/pages/Credits/DependencyCreditsCard.jsxsrc/pages/Credits/StaticCreditsCard.jsxsrc/test/setup.jsvite.config.jsvitest.config.js
💤 Files with no reviewable changes (3)
- docs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/variants-and-improvements.md
- src/pages/About/Author.jsx
- docs/src/components/ColorSwatch.jsx
🧰 Additional context used
🧠 Learnings (5)
📚 Learning: 2025-12-20T20:11:28.422Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-20T20:11:28.422Z
Learning: In the Img2Num repository, all documentation should be properly organized in the docs/docs/ folder structure following the Docusaurus conventions, either as a dedicated category or integrated into existing categories like project-scripts.
Applied to files:
docs/docs/introduction/getting-started.mddocs/docs/reference/tools/ci-workflows.mddocs/docs/index.mdREADME.mdCONTRIBUTING.mddocs/docs/reference/react/components/GlassCard/index.mddocs/docs/reference/wasm/overview.md
📚 Learning: 2025-12-17T22:39:25.711Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-17T22:39:25.711Z
Learning: In the Img2Num repository, do not create multiple markdown files at the repository root. The README.md at root should remain brief and point to the Docusaurus site.
Applied to files:
docs/docs/reference/tools/ci-workflows.mddocs/docs/index.mdREADME.mddocs/docs/guidelines/commits.mdCONTRIBUTING.md
📚 Learning: 2025-12-17T22:39:25.711Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-17T22:39:25.711Z
Learning: In the Img2Num repository, all documentation must be placed in the docs/docs/ folder following the Docusaurus structure, not at the repository root.
Applied to files:
docs/docs/reference/tools/ci-workflows.mddocs/docs/index.mdREADME.mdCONTRIBUTING.mddocs/docs/reference/wasm/overview.md
📚 Learning: 2025-12-17T22:39:25.711Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-17T22:39:25.711Z
Learning: In the Img2Num repository, avoid creating strangely-named markdown files (like COMPREHENSIVE_TEST_REPORT.md, DELIVERABLES.md, etc.) at the root level.
Applied to files:
docs/docs/reference/tools/ci-workflows.mddocs/docs/index.mdREADME.mdCONTRIBUTING.md
📚 Learning: 2025-12-17T21:35:30.143Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-17T21:35:30.143Z
Learning: In the Img2Num project, files that import React hooks must use the `.jsx` extension (not `.js`), as `npm run dev` fails otherwise. This is a build configuration requirement.
Applied to files:
README.mddocs/docs/guidelines/commits.mdCONTRIBUTING.md.editorconfigdocs/docs/reference/react/components/GlassCard/index.mddocs/docs/guidelines/coding-style.mddocs/docs/reference/wasm/overview.mddocs/docs/reference/react/_category_.json
🧬 Code graph analysis (9)
src/components/Tooltip.test.jsx (1)
src/components/Tooltip.jsx (1)
Tooltip(5-35)
src/hooks/useTheme.test.jsx (1)
src/hooks/useTheme.js (2)
theme(4-17)toggleTheme(37-39)
src/pages/Credits/StaticCreditsCard.jsx (1)
src/components/Tooltip.jsx (1)
Tooltip(5-35)
scripts/validate-scripts.js (1)
scripts/lib/read-packageJson-scripts.js (1)
JSON(12-12)
src/components/WasmImageProcessor.jsx (2)
src/components/Tooltip.jsx (1)
Tooltip(5-35)src/components/LoadingHedgehog.jsx (1)
LoadingHedgehog(16-214)
src/components/ThemeSwitch.jsx (2)
src/components/Tooltip.jsx (1)
Tooltip(5-35)src/hooks/useTheme.js (2)
theme(4-17)toggleTheme(37-39)
src/hooks/useGoogleAnalytics.js (1)
src/components/NavBar.jsx (1)
useLocation(27-27)
scripts/lib/cli-fuzzy.js (1)
scripts/lib/colors.js (3)
colorText(54-58)Colors(6-24)Colors(6-24)
src/components/NavBar.test.jsx (1)
src/components/NavBar.jsx (1)
NavBar(25-96)
🪛 LanguageTool
docs/docs/reference/tools/ci-workflows.md
[uncategorized] ~16-~16: The official name of this software platform is spelled with a capital “H”.
Context: ... Overview ### Lint Workflow File: .github/workflows/ci.yml (lint job) **Trigger...
(GITHUB)
[uncategorized] ~45-~45: The official name of this software platform is spelled with a capital “H”.
Context: ...# Script Validation Workflow File: .github/workflows/ci.yml (validate-scripts job...
(GITHUB)
README.md
[style] ~133-~133: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...thub.io/Img2Num/info/docs/reference)) - Very large images or heavy explanations — use the ...
(EN_WEAK_ADJECTIVE)
docs/docs/project-scripts/help-scripts/scripts-guide.md
[uncategorized] ~99-~99: The official name of this software platform is spelled with a capital “H”.
Context: ...integration A GitHub Actions workflow (.github/workflows/ci.yml) was added to: - Det...
(GITHUB)
docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/introduction/index.md
[style] ~41-~41: ‘exact same’ might be wordy. Consider a shorter alternative.
Context: ...n-time-and-frequency-domains) shows the exact same sinusoid plotted in both the time and f...
(EN_WORDINESS_PREMIUM_EXACT_SAME)
[style] ~119-~119: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...s practical implementation" The FFT is just a fast algorithm for computing the DFT:...
(REP_BE_JUST)
[style] ~120-~120: The word “because” means “for the reason that” and thus introduces redundancy.
Context: ... The only reason FFTs appear everywhere is because they are essentially just fast DFTs...
(REASON_IS_BECAUSE)
CONTRIBUTING.md
[style] ~22-~22: Consider using a different verb for a more formal wording.
Context: ...ed information about linting standards, fixing issues, and CI integration, see: - [Co...
(FIX_RESOLVE)
docs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/faq.md
[style] ~31-~31: ‘exactly the same’ might be wordy. Consider a shorter alternative.
Context: ...n, left, or right** - All pixels have exactly the same RGBA values Diagonal adjacency **doe...
(EN_WORDINESS_PREMIUM_EXACTLY_THE_SAME)
docs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/testing-and-debugging-suggestions.md
[grammar] ~13-~13: Use a hyphen to join words.
Context: ...es that exercise corner cases: - Single pixel islands - Long 1-pixel-wide arms (...
(QB_NEW_EN_HYPHEN)
docs/docs/guidelines/coding-style.md
[style] ~173-~173: Consider using a different verb for a more formal wording.
Context: ...ges lint-clean. Don't feel obligated to fix unrelated issues! :::
(FIX_RESOLVE)
🪛 markdownlint-cli2 (0.18.1)
docs/docs/introduction/getting-started.md
136-136: Code block style
Expected: indented; Actual: fenced
(MD046, code-block-style)
149-149: Code block style
Expected: indented; Actual: fenced
(MD046, code-block-style)
159-159: Code block style
Expected: indented; Actual: fenced
(MD046, code-block-style)
docs/docs/guidelines/coding-style.md
82-82: Code block style
Expected: fenced; Actual: indented
(MD046, code-block-style)
87-87: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
docs/docs/reference/wasm/troubleshooting-and-optimizations.md
29-29: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
docs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/walkthrough-and-usage.md
71-71: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔇 Additional comments (114)
src/test/setup.js (1)
1-86: Minor formatting cleanups align with PR linting objectives.The changes in this file are purely stylistic adjustments from Prettier formatting, with no impact on test behavior or mock functionality:
- ResizeObserver methods are now inlined (lines 49–52)
- matchMedia mock parameter formatting updated (line 76)
- ImageData constructor line formatting preserved (line 38)
All mocks remain functionally identical and the test setup logic is unchanged.
vite.config.js (1)
44-45: LGTM!The comment spacing adjustments on lines 44-45 are consistent with the PR's code formatting initiative (Prettier and style standardization). No functional changes to the server configuration values or behavior.
src/pages/About/CTA.jsx (1)
9-9: LGTM—trailing whitespace removed.This formatting change aligns with the PR's linting and style-enforcement objectives. No functional impact.
docs/docs/reference/react/css/global/variables/theme-independent.md (1)
41-44: Table formatting improvements applied.The Z-index layers table has been reformatted for consistent alignment. No content or values were changed.
docs/docs/reference/react/css/global/variables/theme/dark.md (2)
13-24: Colors table formatting improved.The Colors — Dark mode table has been reformatted for consistent column alignment. All color values, descriptions, and usage information are preserved.
28-36: Glass effect table formatting improved.The Glass effect — Dark mode table has been reformatted for consistent column alignment. All effect values and descriptions are preserved.
docs/docs/reference/react/css/global/variables/theme/light.md (2)
13-24: Colors table formatting improved.The Colors — Light mode table has been reformatted for consistent column alignment. All color values, descriptions, and usage information are preserved.
28-36: Glass effect table formatting improved.The Glass effect — Light mode table has been reformatted for consistent column alignment. All effect values and descriptions are preserved.
docs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/overview.md (1)
26-26: Documentation clarifications approved.The wording refinements across preconditions, postconditions, and usage guidance improve clarity without altering meaning or structure.
Also applies to: 61-67
docs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/complexity-and-memory.md (1)
14-25: Content additions strengthen the technical documentation.The expanded explanations of time complexity (O(N) flood-fill and merge pass), memory usage (labels array and regions vector), and cache behavior (BFS queue access patterns and optimization hints) provide valuable detail for developers using this module.
docs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/faq.md (1)
13-375: Documentation improvements are clear and well-structured.The emphasis changes, restructured bullet points, clarified definitions, and corrected escape sequences improve readability and accuracy across this FAQ. No functional or structural issues detected.
docs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/connected-components.md (3)
32-42: SVG formatting improvements enhance readability.The reformatted SVG block (attributes on separate lines, improved whitespace) maintains identical visual output while improving source maintainability. The changes are appropriate for documentation.
48-52: Clarified iteration behavior and merging strategy.The expanded prose and note block effectively document the iteration order and the first-neighbor stopping condition. This addition improves algorithmic clarity for readers.
Also applies to: 54-58
66-108: Mathematical notation formatting is clear and well-organized.The improved spacing around equations, explicit blockquote formatting for definitions, and expanded explanatory text enhance readability without altering the mathematical content.
docs/docs/reference/wasm/modules/image/mergeSmallRegionsInPlace/limitations-and-pitfalls.md (2)
1-47: Well-structured and thorough documentation of limitations.This addition effectively documents genuine pitfalls and edge cases of the
mergeSmallRegionsInPlacefunction. Each section clearly explains the limitation, its implications, and practical workarounds (where applicable). The inclusion of the preserved TODO comment (lines 33–36) is particularly helpful for future contributors.
12-12: Verify British/American English consistency.The file uses British English spelling ("colour," "neighbour") throughout. Confirm that this aligns with the project's CONTRIBUTING.md or coding-style guide. If the codebase standardizes on American English (e.g., "color," "neighbor"), these should be updated for consistency.
Also applies to: 19-19, 24-24
src/pages/Credits/ContributorsCreditsCard.jsx (1)
9-10: LGTM! Formatting change aligns with project linting standards.The condensed single-line arrow function preserves the chunking logic correctly and passes the project's linting checks. The function properly handles all edge cases (empty arrays, partial chunks, etc.).
src/components/WasmImageProcessor.jsx (2)
65-65: LGTM: Clean single-line callback.The reformatted
handleSelectis idiomatic and maintains the same behavior.
149-149: LGTM: Consistent JSX formatting.The JSX elements have been reformatted to single lines consistently throughout the component. These changes improve compactness without affecting readability or behavior.
Also applies to: 162-162, 171-171, 176-176, 190-190, 193-193
src/pages/About/Motivation.jsx (1)
13-13: LGTM — Formatting improvement.The anchor attributes are now on a single line, consistent with the formatting applied across similar components in this PR.
docs/docs/reference/react/css/global/variables/theme/best-practice.md (1)
7-20: LGTM — Admonition formatting refinement.The blank lines and indentation adjustments improve markdown structure consistency and align with the linting rules applied across documentation.
docs/docs/reference/wasm/modules/image/overview.md (1)
12-50: LGTM — Documentation formatting improvements.The added blank lines improve readability and structure throughout the document, consistent with the broader documentation cleanup in this PR.
docs/docs/reference/react/components/GlassCard/index.md (1)
19-19: LGTM — Spacing improvement.The blank line improves separation between the introductory sentence and the bulleted list below.
docs/docs/reference/wasm/how-to-add-a-module.md (1)
10-18: LGTM — Indentation consistency improvements.The adjusted indentation for the nested list item and code block improves markdown structure and aligns with linting rules.
src/pages/About/TechStack.jsx (1)
7-7: LGTM: JSX formatting normalized.The anchor attributes are now consolidated on a single line, consistent with the PR's linting and formatting improvements.
docs/docs/index.md (1)
39-39: LGTM: Blank line improves readability.The added blank line after the "Issue links:" heading improves document structure.
src/hooks/useTheme.test.jsx (2)
11-14: LGTM: JSX formatting normalized.The TestComponent JSX indentation has been adjusted for consistency with linting standards. No logic changes.
57-63: LGTM: Mock object formatting improved.The
window.matchMediamock implementations are now expanded across multiple lines for better readability. The mock behavior remains unchanged.Also applies to: 79-85
docs/docs/reference/wasm/setup-and-dependencies.md (1)
118-118: LGTM: Blank line improves document structure.The added blank line after the "The build script:" heading improves readability and separation from the numbered list that follows.
docs/docs/reference/wasm/overview.md (1)
31-33: LGTM: Markdown list formatting normalized.The bullet list markers have been updated for consistency with markdown linting standards. The content remains unchanged.
scripts/validate-scripts.js (2)
2-3: LGTM!Quote style normalization to single quotes aligns with the PR's linting and formatting goals.
82-85: LGTM!The simplified
path.resolve('./package.json')calls work correctly since this script is invoked via npm from the repository root. The behavior remains equivalent to the previous implementation.vitest.config.js (1)
15-15: LGTM!Formatting-only change; the coverage exclusion paths remain identical.
docs/docs/reference/tools/_category_.json (1)
9-9: LGTM!Correct fix—trailing commas are invalid in standard JSON. This ensures the file parses correctly.
docs/docs/reference/wasm/troubleshooting-and-optimizations.md (2)
11-24: LGTM!Markdown formatting improvements (list indentation, bullet formatting) look good and enhance readability.
43-48: LGTM!Formatting adjustments maintain content clarity.
docs/docs/project-scripts/help-scripts/index.md (2)
29-33: LGTM!Good addition documenting the
q + enterquit command—improves CLI discoverability for users.
41-48: Verify admonition closing syntax.The
:::closing tag on line 48 appears to be indented and on the same line as the preceding list item. In Docusaurus, admonition closing tags typically need to be on their own line without leading indentation to render correctly.🔎 Proposed fix
- `write-translations` and `write-heading-ids` are useful for internationalization and stable MDX anchors. - ::: + +:::docs/docs/reference/react/_category_.json (1)
9-9: LGTM!Trailing comma removal ensures valid JSON syntax.
src/pages/Credits/DependencyCreditsCard.jsx (1)
29-29: LGTM!Formatting-only change; the URL construction logic remains correct and unchanged.
index.html (2)
67-69: LGTM — Function declaration correctly supportsarguments.The change from arrow function syntax to a function declaration is correct and necessary. Arrow functions don't have their own
argumentsbinding, so this ensures thegtagwrapper properly forwards arguments todataLayer.push.
74-74: LGTM — Trailing comma improves diff clarity.Standard formatting improvement that makes future edits cleaner.
docs/sidebars.js (1)
7-12: LGTM — JSDoc formatting improvement.The comment block now follows standard JSDoc conventions with leading asterisks, improving consistency with documentation tooling.
docs/docs/reference/react/hooks/useTheme/tests.md (1)
31-102: LGTM — Documentation formatting improvements.The formatting changes improve readability and consistency:
- Added blank lines for better visual separation
- Semicolons added to code examples for completeness
- Consistent bullet point formatting
No changes to the actual test documentation content or guidance.
scripts/lib/colors.js (1)
7-67: LGTM — Quote style consistency.The change from double to single quotes aligns with JavaScript best practices and likely matches the project's ESLint configuration. The trailing newline follows POSIX text file conventions.
No functional changes to the color utility exports.
docs/docs/reference/wasm/modules/image/_category_.json (1)
1-10: LGTM! Valid JSON syntax fix.Removing the trailing comma after the last property ensures strict JSON compliance per RFC 8259.
docs/docs/reference/wasm/modules/image/fft_iterative/_category_.json (1)
1-10: LGTM! Valid JSON syntax fix.Trailing comma removed from last property, ensuring strict JSON compliance.
docs/docs/reference/wasm/_category_.json (1)
1-10: LGTM! Consistent JSON syntax fix.This change aligns with the same trailing comma fix applied to other category JSON files in this PR.
docs/docs/reference/wasm/using-wasm-in-react.md (2)
28-30: LGTM! Formatting consistency improved.The list formatting is now more consistent with standard Markdown practices.
43-48: LGTM! Improved readability without semantic changes.The expanded multi-line format for promise handling and cleanup is more explicit and readable. The behavior remains functionally equivalent:
mounted && setModule(m)→if (mounted) setModule(m)(same short-circuit logic)- Cleanup function expansion is purely stylistic
scripts/build-wasm.js (2)
110-110: LGTM! Quote style aligned with linting rules.The change from double quotes to single quotes ensures consistency with the ESLint configuration being introduced in this PR.
209-209: LGTM! Improved readability.Collapsing the short argument array to a single line improves readability while maintaining the same functionality.
docs/docs/reference/wasm/modules/_category_.json (1)
8-8: LGTM! Valid JSON syntax improvement.Removing the trailing comma ensures strict JSON compliance, as trailing commas are not permitted in JSON.
docker-compose.yml (2)
14-15: LGTM! Consistent quote style.The quote style normalization (double → single) maintains identical behavior while improving consistency with the PR's formatting standards.
17-19: LGTM! Consistent quote style.Port mapping quote normalization maintains identical behavior while aligning with formatting standards.
docs/docs/reference/react/css/global/variables/theme/extending.md (2)
11-21: LGTM! Improved formatting.The CSS code block reformatting enhances readability while preserving semantic content.
24-28: LGTM! Improved formatting.The CSS code block reformatting maintains semantic content while improving consistency.
src/hooks/useGoogleAnalytics.js (2)
8-9: LGTM! Consistent string quote style.The quote normalization and spacing adjustments maintain identical behavior while improving code consistency.
1-2: LGTM! Consistent import quote style.The quote normalization improves consistency across the import statements.
CONTRIBUTING.md (1)
7-33: LGTM! Well-structured linting guidance.The new section provides clear quick-start commands and appropriately delegates detailed documentation to the Docusaurus site. All linked documentation pages exist, and the referenced npm scripts are properly defined in package.json.
scripts/lib/read-packageJson-scripts.js (1)
1-32: LGTM! Style normalization aligns with linting standards.The quote style changes (double→single) and final newline addition are consistent with the PR's linting infrastructure goals. No functional changes.
docs/docs/reference/react/hooks/useTheme/index.md (1)
1-201: LGTM! Formatting improvements enhance consistency.The changes include spacing normalization, table alignment, and hex color lowercasing. All are standard formatting practices with no content changes.
scripts/help.js (1)
1-23: LGTM! Style normalization plus helpful documentation reference.The quote style changes align with linting standards, and the added "Also see:" URL provides users with additional context for project scripts.
docs/docs/project-scripts/help-scripts/scripts-guide.md (1)
1-167: LGTM! Formatting refinements improve readability.The list restructuring, indentation adjustments, and spacing normalization enhance document consistency without changing content.
scripts/format-wasm.js (1)
12-29: Check mode implementation looks correct and is properly documented.The
--checkflag support enables CI validation viaclang-format --dry-run --Werror. The error handling and exit codes are appropriate. Verification confirms the script is documented inpackage.jsonwith theformat-wasm:checktask, which includes a clear description of the dry-run behavior.docs/docs/reference/wasm/development-workflow.md (1)
13-15: LGTM: Clean formatting adjustments.The indentation and whitespace changes improve consistency throughout the documentation without altering any content or meaning.
Also applies to: 97-102, 108-110
docs/docusaurus.config.js (1)
18-27: LGTM: Formatting normalization.The reformatting to single-line expressions maintains identical logic while improving consistency with the project's style guidelines.
Also applies to: 140-140, 154-154
docs/scripts/help.js (1)
1-2: LGTM: Quote style normalization.The conversion from double quotes to single quotes aligns with the project's linting standards without changing any functional behavior.
Also applies to: 4-6, 9-9, 21-21
scripts/handle-changelog.js (2)
60-60: Good defensive coding: directory creation added.The addition of directory creation logic ensures
docs/changelogexists before writing files, preventing potential errors if the directory was removed or never created.
1-9: LGTM: Quote style normalization.The conversion to single quotes throughout the file aligns with the project's linting standards without affecting functionality.
Also applies to: 17-18, 21-22, 25-34, 49-56, 63-86
.editorconfig (1)
58-58: LGTM: Editorconfig adjustments align with linting goals.The increased
max_line_lengthvalues for JS/JSX/TSX (200) and HTML (200), the added Prettier note for markdown, the wildcard LICENSE pattern, and the final newline setting all support the PR's linting infrastructure goals.Also applies to: 93-93, 100-105, 148-151
scripts/lib/cli-fuzzy.js (1)
1-194: LGTM! Formatting standardization aligns with linting objectives.All changes in this file are purely stylistic:
- String literals standardized to single quotes
- Arrow function parameters wrapped in parentheses for consistency
- Trailing newline properly added
These changes improve code consistency and align with the ESLint/Prettier conventions being enforced in this PR. No functional behavior is affected.
src/components/NavBar.module.css (1)
1-288: LGTM! CSS formatting improvements with no functional changes.All changes in this file are formatting-only:
- CSS transitions expanded to multi-line format for better readability
- Hex color values standardized to lowercase (e.g.,
#F8EACD→#f8eacd)- Minor structural adjustments to rule boundaries
These changes improve code consistency and maintainability without affecting the rendered styles or behavior.
docs/docs/reference/wasm/modules/image/fft_iterative/implementation.md (1)
83-90: LGTM! Documentation formatting improved.The reformatting of bullet points (lines 83-84 and 88-90) consolidates multi-line text into single-line entries, improving readability without altering the technical content or meaning.
docs/docs/guidelines/issues.md (1)
10-30: Documentation improvements to issues.md are clear and well-structured.The reformatted templates table is easier to scan, and the new Guidelines section provides actionable direction. The tip block effectively emphasizes the value of consistent issue reporting.
docs/docs/guidelines/_category_.json (1)
1-7: No issues with configuration.The category metadata is correct and properly configured for Docusaurus.
docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/index.md (1)
9-14: Excellent addition of complex numbers to prerequisites.Complex numbers and Euler's formula are foundational for understanding FFT. The addition is well-placed at the top of the prerequisites list, properly formatted, and accurately reflects what readers must grasp before diving into iterative FFT theory.
src/pages/Credits/StaticCreditsCard.jsx (2)
2-2: Verify module resolution handles the.jsxfile extension in the import path.The import statement includes an explicit
.jsxextension. While this might work depending on bundler configuration, it's unconventional for JavaScript imports and could cause module resolution issues. Most React projects configure path resolution to handle imports without explicit file extensions.Verify that this import resolves correctly and consider removing the
.jsxextension to align with standard React import practices:-import Tooltip from '@components/Tooltip.jsx'; +import Tooltip from '@components/Tooltip';
45-49: Tooltip formatting updates look good.The collapsed single-line Tooltip blocks maintain all content and behavior while improving readability through standard formatting conventions. No functional changes detected.
Also applies to: 51-55, 57-61
docs/docs/reference/react/components/ThemeSwitch/tests.md (1)
30-31: Markdown formatting updates are correct.All list item and content reformatting maintains semantic meaning and aligns with markdown style guidelines. No functional changes to documentation.
Also applies to: 35-36, 41-42, 46-46, 50-50, 54-57, 99-102, 106-111
docs/docs/reference/wasm/modules/image/fft_iterative/overview.md (1)
30-32: Markdown formatting is correct.The reflowed list items maintain content and structure while improving formatting consistency. No functional changes detected.
docs/docs/reference/react/components/Tooltip/tests.md (1)
1-47: Documentation formatting is clean and consistent.All changes align with the PR's linting standards (blank lines after headers, markdown structure, code block formatting). Content remains accurate and helpful for contributors writing Tooltip tests.
docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/discrete-time-signals-and-the-dft/index.md (1)
1-81: Mathematical documentation formatting is correct and consistent.Bullet marker normalization (
*→-), blank line spacing after admonition headers, and indentation adjustments align with markdown and editorconfig standards applied across the repository. All mathematical formulas and pedagogical content remain accurate and unchanged.src/components/Tooltip.test.jsx (1)
1-80: Test logic is intact; formatting is linting-compliant.All changes are syntax formatting (semicolons on imports, statements, and closing parentheses) aligned with the PR's ESLint standards. Test structure and logic remain unchanged—all five test cases continue to validate Tooltip behavior (default state, hover, mouse leave, focus, and focus loss). Test patterns are compatible with React 19.2.3 and @testing-library/react 16.3.0. No functional impact.
src/components/Tooltip.jsx (1)
10-19: LGTM: Cleaner ternary expression.The refactored conditional rendering is more concise while preserving the exact same behavior—valid React elements receive cloned data attributes, and non-element children are wrapped in a focusable span. Accessibility is maintained.
src/components/ThemeSwitch.jsx (1)
20-29: LGTM: Formatting refinement.The template string adjustments and multi-line button props improve readability without altering behavior. The theme toggle logic, accessibility attributes, and icon rendering remain functionally identical.
docs/docs/reference/wasm/modules/image/fft_iterative/explained.md (1)
44-44: LGTM: Markdown formatting cleanup.The blank lines after headings and adjusted table indentation improve readability without changing any content, mathematical notation, or algorithmic explanations.
Also applies to: 50-59, 96-96
docs/docs/reference/react/components/Tooltip/index.md (1)
6-6: LGTM: Enhanced documentation structure.The formatting improvements, expanded explanations, and enhanced accessibility guidance significantly improve the documentation's clarity and usability. All code examples remain syntactically correct and the component behavior descriptions are accurate.
Also applies to: 12-12, 17-17, 26-26, 35-35, 42-42, 49-49, 61-61, 71-71, 82-86, 93-93, 99-99, 105-105, 113-116, 119-144, 146-151
src/pages/About/WhatIsThis.jsx (1)
13-15: LGTM: Single-line anchor formatting.The collapsed anchor tag preserves all attributes including security-critical
rel="noopener noreferrer", maintains the Tooltip wrapper, and introduces no behavioral changes.src/global-styles/variables.css (1)
22-87: LGTM! Color formatting normalized.The hex color codes have been consistently lowercased across both light and dark themes with no semantic changes to color values. This aligns with the formatting enforcement introduced by the new linting workflow.
src/components/ThemeSwitch.test.jsx (1)
20-29: LGTM! Mock formatting improved.The icon mock components have been reformatted to multi-line JSX while preserving all functional behavior (testids, className props, and rendering output). This is a formatting-only change with no impact on test semantics.
docs/docs/guidelines/commits.md (1)
8-100: LGTM! Documentation formatting enhanced.The formatting improvements (added info block, consistent table alignment, adjusted whitespace) enhance readability without changing the semantic content of the commit guidelines.
docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/continuous-fourier-transform/index.md (1)
18-59: LGTM! Improved documentation readability.The added blank lines around equations, notes, and figures enhance visual separation and readability without changing any content or semantics.
src/components/NavBar.test.jsx (3)
1-1: LGTM — Import cleanup.Removing unused
afterEachimport is appropriate, as it's not referenced anywhere in the test file.
20-21: LGTM — Clean refactor.Simplifying the helper to a single-line return improves readability while preserving functionality.
336-345: LGTM — Correct test expectation.The updated expectation correctly reflects that the Info icon appears twice in the NavBar (once in the "About" internal link and once in the "Docs" external link).
docs/docs/guidelines/coding-style.md (1)
108-174: LGTM — Comprehensive linting guidance.The new "Linting and Style Checks" section provides clear, actionable guidance for contributors. It covers local linting commands, auto-fix capabilities, editor setup, special cases, and CI integration. The status tip appropriately sets expectations about existing violations.
docs/docs/guidelines/pull-requests.md (1)
7-50: LGTM — Excellent documentation improvements.The additions provide clear, actionable guidance for contributors:
- Branch creation example with conventional naming
- Proactive merge conflict prevention with
git pull origin main- Specific PR requirements (title, summary, issue references)
- Best practices (small focused PRs, screenshots for UI changes, avoid mixing unrelated changes)
These improvements will help contributors submit higher-quality PRs.
docs/docs/introduction/getting-started.md (2)
10-12: LGTM — Import formatting cleanup.Removing extraneous spaces from image import statements improves consistency and readability.
143-163: LGTM — Helpful Linux installation guidance.The new Linux Docker installation section provides clear, correct commands for Ubuntu/Debian users, including system service setup and group membership. The note about logging out for group changes to take effect is appropriately included.
docs/docs/reference/wasm/modules/image/fft_iterative/api.md (1)
24-42: LGTM — API documentation update.The addition of the
pad_to_pow_twoAPI entry properly documents the padding function that implements the power-of-two requirement described in the warning block. The function signature and description are clear and consistent with the rest of the API documentation.docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/introduction/index.md (1)
1-185: Documentation formatting improvements look good.The presentational changes improve consistency and readability without altering the mathematical content or learning objectives. The use of underscores for emphasis and additional spacing around sections enhances the document structure.
docs/docs/reference/react/components/NavBar/testing.md (1)
1-268: Test documentation formatting improvements look good.The table reformatting and code example spacing enhance readability while preserving all test descriptions and examples. The changes align well with the broader documentation refresh effort.
docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/how-fourier-transforms-work/index.md (1)
1-203: Mathematical documentation improvements look good.The restructuring of the CFT vs DFT comparison into a clearer two-column table format and the addition of the explicit DFT inverse formula enhance the educational value of the documentation without altering the mathematical correctness.
docs/docs/reference/tools/ci-workflows.md (1)
1-151: Excellent CI/CD documentation.This comprehensive documentation covers all aspects of the new lint and script validation workflows, including:
- Clear trigger conditions and workflow steps
- Local verification commands that match the CI environment
- Practical troubleshooting guidance
- Configuration details for maintainability
- Best practices for contributors
The placement in
docs/docs/reference/tools/and thesidebar_position: 2setting align with project documentation conventions. The static analysis hints about "Github" vs "GitHub" capitalization in file paths are false positives—.github/workflows/is the correct directory name in GitHub repositories.Based on learnings, documentation placement follows Docusaurus conventions correctly.
docs/docs/reference/react/components/NavBar/index.md (1)
52-253: LGTM! Documentation formatting improvements.The table formatting adjustments, blank line additions, and multiline object literal structure (lines 212-217) improve readability and align with the source code changes. All modifications are presentational with no technical concerns.
package.json (2)
69-85: LGTM! Script definitions support CI format checking.The added format:check variants correctly wire non-modifying format validation for both JavaScript (Prettier) and C++ (clang-format) files. Descriptions clearly distinguish modifying vs. check-only operations, supporting the CI workflow requirements.
149-153: LGTM! Check scripts correctly implemented.The format:check, format-js:check, and format-wasm:check scripts are properly wired with appropriate flags and orchestration. This implementation supports the maintainer's request for format checking in CI.
docs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/keywords.md (2)
11-39: LGTM! Comprehensive keyword additions.The new keyword entries (CFT, Complex Exponential, DC Component, rFFT, Nyquist Frequency, Phase Spectrum, Sampling Rate, Spectral Leakage, Windowing, fftshift, FT) are technically accurate and provide valuable reference material for FFT documentation.
52-135: LGTM! Formatting improvements enhance consistency.The Tabs component and mathematical equation formatting adjustments improve readability without changing technical content. All conventions remain correctly documented.
.github/workflows/ci.yml (3)
10-31: LGTM! Lint job structure is solid.The new lint job correctly implements the CI linting requirements with proper Node.js setup, npm caching, ESLint, and editorconfig-checker. The job will fail appropriately on lint violations.
33-98: LGTM! Conditional script validation is well-implemented.The change detection logic correctly identifies script-related modifications (package.json scriptsInfo changes, scripts/ directory changes) and conditionally runs validation only when needed. The action version updates (v6) and conditional execution pattern are appropriate.
10-31: Addformat:checkstep to the lint workflow.The
npm run format:checkscript exists and checks Prettier and clang-format compliance without modifying files. This would complement the existing ESLint and editorconfig-checker validations in the lint job.🔎 Proposed addition
- name: Run editorconfig-checker run: npm run lint:style + + - name: Check formatting + run: npm run format:checkdocs/docs/reference/wasm/modules/image/fft_iterative/prerequisite-theory/fourier-series--the-bridge/index.md (1)
26-186: LGTM! Excellent documentation enhancements.The additions significantly improve the educational value of this Fourier Series documentation:
- Image embeds with collapsible code blocks (Figures 1-3) enhance reproducibility
- Expanded mathematical explanations for complex coefficients, magnitude, and phase improve clarity
- The visual analogy section (lines 92-134) with the complex plane triangle effectively illustrates
$X_k$ interpretation- Real/complex form relationships and conversion formulas are accurately presented
All mathematical notation and technical content appear correct.
- Add npm run format:check to CI lint job - Add TypeScript (.ts) to .editorconfig patterns - Restore npm ci step in CI workflow - Simplify root CONTRIBUTING.md to link to docs - Fix admonition closing syntax in why-img2num-uses-the-dft - Run Prettier on modified markdown files - Resolve merge conflicts from maintainer's commits Addresses feedback from @Ryan-Millard
|
@Ryan-Millard All requested changes have been implemented! ✅ Changes Made:
✅ All Checks Pass:
Ready for final review and merge! 🚀 |
Ryan-Millard
left a comment
There was a problem hiding this comment.
Thank you so much for all of the time and dedication that you put into this pull request, it will definitely impact this repository positively.🦔
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
docs/docs/introduction/getting-started.mddocs/docs/reference/wasm/troubleshooting-and-optimizations.md
🚧 Files skipped from review as they are similar to previous changes (1)
- docs/docs/reference/wasm/troubleshooting-and-optimizations.md
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-12-20T20:11:28.422Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 0
File: :0-0
Timestamp: 2025-12-20T20:11:28.422Z
Learning: In the Img2Num repository, all documentation should be properly organized in the docs/docs/ folder structure following the Docusaurus conventions, either as a dedicated category or integrated into existing categories like project-scripts.
Applied to files:
docs/docs/introduction/getting-started.md
📚 Learning: 2026-01-04T15:34:04.654Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 146
File: docs/docs/reference/react/components/ThemeSwitch/tests.md:123-124
Timestamp: 2026-01-04T15:34:04.654Z
Learning: In Docusaurus documentation, relative directory links (e.g., ../ or ../../../hooks/useTheme) resolve to index.md within the target directory. Do not require or force linking to index.md explicitly; such relative links remain valid and should not be changed when reviewing docs under the docs directory.
Applied to files:
docs/docs/introduction/getting-started.md
🪛 markdownlint-cli2 (0.18.1)
docs/docs/introduction/getting-started.md
136-136: Code block style
Expected: indented; Actual: fenced
(MD046, code-block-style)
149-149: Code block style
Expected: indented; Actual: fenced
(MD046, code-block-style)
159-159: Code block style
Expected: indented; Actual: fenced
(MD046, code-block-style)
🔇 Additional comments (3)
docs/docs/introduction/getting-started.md (3)
136-136: Dismiss markdownlint code-block-style warnings—false positives for Docusaurus.The static analysis flags lines 136, 149, and 159 as using fenced code blocks when indented style is expected (MD046). However, in Docusaurus/MDX contexts, fenced code blocks with triple backticks are the standard and required format; indented code blocks do not render correctly in JSX/MDX. These warnings are false positives and can be safely ignored.
Also applies to: 149-149, 159-159
10-12: Header level normalization and image import spacing: approved.The changes normalize image import spacing (lines 10–12) and standardize Docker installation section headers from level 4 to level 3 (lines 36, 129, 145), which improves document hierarchy and readability within Docusaurus. Text wrapping and whitespace adjustments are consistent with the PR's formatting goals.
Also applies to: 36-36, 56-57, 129-129, 145-145
564-564: Relative link reference is valid; no change needed.The link at line 564 uses a relative path (
../../project-scripts/overview) which resolves correctly to the target directory's index.md in Docusaurus. Per learnings, relative directory links of this form are valid and do not require explicitindex.mdsuffixes.
|
Thanks again for these CI and contributing doc improvements, @LostSkyWalker-1401, they really help the project and make it easier for new contributors to get started! I'd like to give you Triage access (if you'd like) for this repository so you can help manage and maintain CI-related workflows, contributing documentation, and related issues/PRs. This would include:
There’s no pressure to accept this proposition - it’s entirely optional, and you can step back anytime. I just wanted to offer the chance since you’ve already done great work in this area.
|
…yan-Millard#146) * feat(ci): add linting job to CI workflow and update contributing docs - Add lint job to ci.yml that runs ESLint and editorconfig-checker - Configure lint job to run on pull_request and push to main - Update CONTRIBUTING.md with comprehensive linting documentation - Include instructions for running lints locally and fixing issues - Document current linting status and CI integration Resolves Ryan-Millard#141 * docs: move linting documentation to Docusaurus and address review feedback - Simplify root CONTRIBUTING.md and link to detailed docs - Add comprehensive linting section to coding-style.md - Create new ci-workflows.md documenting GitHub Actions workflows - Update Questions section to link to discussions/issues instead of draft PRs Addresses review feedback from @Ryan-Millard in Ryan-Millard#146 * fix: resolve linting errors in PR files and add sidebar position - Fix line endings (CRLF -> LF) in all modified files - Add final newlines to ci.yml, CONTRIBUTING.md, and docs files - Fix indentation in markdown numbered lists - Add sidebar_position: 2 to ci-workflows.md Addresses feedback from @Ryan-Millard in Ryan-Millard#146 * chore: remove accidentally created files * fix(docs): correct code block indentation in ci-workflows.md * chore: remove accidentally created file from working tree * feat(config): add editorconfig-checker exclusions - Exclude build directories (dist, build, docs/build) - Exclude node_modules and lock files - Exclude all CMake build directories in wasm modules - Exclude binary files (.ase, .min.js, .min.css) * style: apply Prettier and clang-format to entire codebase - Format 66 files with npm run format - Prettier formatted all JS/React/Markdown files - clang-format formatted all C++ files - This establishes consistent formatting baseline for lint checks * fix(config): correct editorconfig-checker regex patterns - Remove ** glob patterns (not supported in regex) - Use explicit paths for build directories * fix: align editorconfig with Prettier output to resolve lint conflicts - Increase max_line_length to 150 for HTML files - Add LICENSE* pattern to catch all LICENSE files - Add .tsx to JavaScript/React file patterns - Configure editorconfig-checker to skip markdown detailed validation - Resolves conflicts between Prettier's 3-space nested lists and 2-space rule This allows formatters and linters to coexist without conflicts. * style: run Prettier to fix trailing whitespace - Fixed trailing whitespace in CSS and test files - Formatted markdown documentation files - Reduced lint errors from 258 to 178 * fix: exclude formatters' domains and increase line length limits - Exclude Python (.py), Windows scripts (.bat, .ps1), bash (img2num), C++ (.cpp, .h) - These files are handled by their respective formatters (Python, clang-format) - Increase max_line_length to 200 for JS/JSX/HTML (allows long import/meta tags) - Keep strict checking for JSON, YAML, and core project files This allows each formatter to handle its domain without conflicts. * fix: correct JSDoc formatting in sidebars.js - Add missing asterisk prefix to JSDoc comment lines - Resolves final 3 linting errors - All linting checks now pass! ✅ * fix(linting & formatting): resolve errors & improve config * feat(format scripts): add check scripts to avoid altering files in CI * fix(README.md): close HTML tags * feat(ci): add format:check to lint workflow and address review feedback - Add npm run format:check to CI lint job - Add TypeScript (.ts) to .editorconfig patterns - Restore npm ci step in CI workflow - Simplify root CONTRIBUTING.md to link to docs - Fix admonition closing syntax in why-img2num-uses-the-dft - Run Prettier on modified markdown files - Resolve merge conflicts from maintainer's commits Addresses feedback from @Ryan-Millard * fix(file formatting): address CodeRabbit remarks --------- Co-authored-by: Ryan-Millard <millardryandevon@gmail.com>
Description
This PR adds automated linting CI to the project and comprehensive contributor documentation for code quality checks.
Closes #141
Changes Made
CI Workflow
lintjob to.github/workflows/ci.ymlpull_requestandpushtomainnpm run lint(ESLint) andnpm run lint:style(editorconfig-checker)validate-scriptsjobDocumentation
CONTRIBUTING.mdwith:Testing
Local Testing
npm cisuccessfullynpm run lint- passes with no errorsnpm run lint:style- detects 233 existing violations (expected, not fixed in this PR)CI Testing
Once this PR is merged, the CI will automatically validate all future PRs.
Acceptance Criteria Met
.github/workflows/ci.ymlcontains a working lint job that runs onpull_requestandpushtomainnpm ci,npm run lint, andnpm run lint:styleCONTRIBUTING.mdwith local commands and instructionsFollow-up Work
As noted in #141, fixing existing lint violations will be done in separate PRs:
npm run lint:fix)This PR establishes the infrastructure to prevent new violations from being introduced.
Additional Notes
validate-scriptsjob alongside newlintjobSummary by CodeRabbit
New Features
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.