Skip to content

[chores] Run prettier on all HTML files in the repo#497

Merged
nemesifier merged 1 commit intomasterfrom
prettier-check-all-html-files
Jan 24, 2026
Merged

[chores] Run prettier on all HTML files in the repo#497
nemesifier merged 1 commit intomasterfrom
prettier-check-all-html-files

Conversation

@nemesifier
Copy link
Member

Fixing formatting issues that are causing many different PRs to propose unrelated changes.

@coderabbitai
Copy link

coderabbitai bot commented Jan 24, 2026

📝 Walkthrough

Walkthrough

This PR applies consistent code style and configuration updates across the project. HTML files are reformatted with lowercase doctypes, normalized indentation, consistent quote usage, and whitespace adjustments. The lint-staged configuration in package.json and the run-qa-checks script are updated to broaden the HTML file coverage from "public/example_templates/\\/\.html" to "\\/\.html", expanding prettier checks to all HTML files in the project.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

javascript

🚥 Pre-merge checks | ✅ 1 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is minimal but addresses the core purpose. However, it lacks required template sections including checklist items, issue reference, and screenshots. Complete the PR description template by adding the checklist, issue reference (if applicable), and any relevant screenshots or additional context about the formatting fixes.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly describes the main change: running Prettier formatting on all HTML files in the repository.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e065cce and 450484a.

📒 Files selected for processing (5)
  • examples/load_data_geo_extent/index.html
  • examples/realtime_update/index.html
  • index.html
  • package.json
  • run-qa-checks
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,ts,css,scss,json}

📄 CodeRabbit inference engine (AGENTS.md)

Format code using openwisp-qa-format command with Python virtualenv enabled and yarn lint:fix (runs eslint --fix and prettier via lint-staged)

Files:

  • package.json
🧠 Learnings (8)
📓 Common learnings
Learnt from: CR
Repo: openwisp/netjsongraph.js PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-22T22:37:11.271Z
Learning: Applies to src/**/*.js : Husky pre-commit hooks automatically run lint-staged to format JavaScript files in `src/**/*.js` with prettier
Learnt from: CR
Repo: openwisp/netjsongraph.js PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-22T22:37:11.271Z
Learning: Applies to **/*.{js,ts,css,scss,json} : Format code using `openwisp-qa-format` command with Python virtualenv enabled and `yarn lint:fix` (runs eslint --fix and prettier via lint-staged)
Learnt from: CR
Repo: openwisp/netjsongraph.js PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-22T22:37:11.271Z
Learning: Avoid arbitrary formatting changes outside of the code formatting tools (openwisp-qa-format and yarn lint:fix)
Learnt from: CR
Repo: openwisp/netjsongraph.js PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-22T22:37:11.271Z
Learning: Run QA checks using `./run-qa-checks` before committing code
📚 Learning: 2026-01-22T22:37:11.271Z
Learnt from: CR
Repo: openwisp/netjsongraph.js PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-22T22:37:11.271Z
Learning: Applies to src/**/*.js : Husky pre-commit hooks automatically run lint-staged to format JavaScript files in `src/**/*.js` with prettier

Applied to files:

  • package.json
📚 Learning: 2026-01-22T22:37:11.271Z
Learnt from: CR
Repo: openwisp/netjsongraph.js PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-22T22:37:11.271Z
Learning: Applies to **/*.{js,ts,css,scss,json} : Format code using `openwisp-qa-format` command with Python virtualenv enabled and `yarn lint:fix` (runs eslint --fix and prettier via lint-staged)

Applied to files:

  • package.json
  • run-qa-checks
📚 Learning: 2026-01-04T08:00:40.936Z
Learnt from: dee077
Repo: openwisp/netjsongraph.js PR: 417
File: src/js/netjsongraph.util.js:1302-1341
Timestamp: 2026-01-04T08:00:40.936Z
Learning: In the netjsongraph.js codebase, the `== null` pattern is intentionally used to check for both null and undefined values in a single comparison, which is a well-established JavaScript idiom and should not be flagged for replacement with strict equality checks.

Applied to files:

  • index.html
📚 Learning: 2026-01-22T22:37:11.271Z
Learnt from: CR
Repo: openwisp/netjsongraph.js PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-22T22:37:11.271Z
Learning: Applies to test/netjsongraph.browser.test.js : Write browser tests in test/netjsongraph.browser.test.js using Chrome/ChromeDriver and run with `yarn test test/netjsongraph.browser.test.js`

Applied to files:

  • index.html
📚 Learning: 2026-01-20T16:51:06.213Z
Learnt from: codesankalp
Repo: openwisp/netjsongraph.js PR: 425
File: src/js/netjsongraph.render.js:1-26
Timestamp: 2026-01-20T16:51:06.213Z
Learning: In the netjsongraph.js project, imports from `echarts/lib/chart/*/install`, `echarts/lib/component/*/install`, and `echarts/lib/renderer/install*` paths produce better tree-shaking results than the public entry points (`echarts/charts`, `echarts/components`, `echarts/renderers`) in their webpack configuration. The project maintainer has tested both approaches and confirmed the `/lib/*/install` pattern yields smaller bundles.

Applied to files:

  • examples/realtime_update/index.html
📚 Learning: 2026-01-22T22:37:11.271Z
Learnt from: CR
Repo: openwisp/netjsongraph.js PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-22T22:37:11.271Z
Learning: Run QA checks using `./run-qa-checks` before committing code

Applied to files:

  • run-qa-checks
📚 Learning: 2026-01-22T22:37:11.271Z
Learnt from: CR
Repo: openwisp/netjsongraph.js PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-22T22:37:11.271Z
Learning: Avoid arbitrary formatting changes outside of the code formatting tools (openwisp-qa-format and yarn lint:fix)

Applied to files:

  • run-qa-checks
🔇 Additional comments (9)
examples/load_data_geo_extent/index.html (1)

1-1: LGTM!

The lowercase <!doctype html> is valid HTML5 and aligns with Prettier's default formatting. This is a standard formatting normalization.

package.json (1)

22-25: LGTM!

Broadening the lint-staged glob to **/*.html ensures all HTML files in the repository are formatted consistently on commit. This aligns with the PR objective and matches the corresponding update in run-qa-checks.

run-qa-checks (1)

7-8: LGTM!

The expanded glob pattern **/*.html is consistent with the lint-staged configuration in package.json. The error message correctly guides users to run the fix command with proper quoting.

index.html (4)

1-1: LGTM!

Standard Prettier formatting - lowercase doctype is valid HTML5.


36-42: LGTM!

Multi-line CSS transition property and double-quoted font-family improve readability and follow Prettier's default formatting rules.


145-147: LGTM!

Reformatted anchor tags with line breaks follow Prettier's HTML formatting for long lines.


255-276: LGTM!

JavaScript formatting changes (double quotes for strings, trailing commas) are consistent with Prettier defaults. The theme toggle functionality remains unchanged.

examples/realtime_update/index.html (2)

1-15: LGTM!

Standard Prettier formatting applied to the doctype, head section, and script tag with consistent indentation and attribute formatting.


18-55: LGTM!

JavaScript formatting normalized with double quotes and consistent indentation. The NetJSONGraph configuration and socket.io event handlers remain functionally unchanged.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai bot added the javascript Pull requests that update Javascript code label Jan 24, 2026
@nemesifier nemesifier merged commit 450484a into master Jan 24, 2026
7 checks passed
@nemesifier nemesifier deleted the prettier-check-all-html-files branch January 24, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant