all: smoother root directory (fixes #10250) - #10120
Conversation
- move Style-Guide.md to docs/, CONTRIBUTING.md to .github/, couchdb-setup.sh to scripts/ - rename browserslist to .browserslistrc; drop stale .mdlrc and dead root .eslintrc.json - remove dead npm scripts (webdriver-set-version, starthub-*) - restructure lint scripts as lint:html / lint:styles / lint:all (drop TSLint-era --type-check) - scope htmlhint to src/**/*.html; rewrite pre-push hook (CI and hook still gate on npm run lint) - clean stale .dockerignore entries; restore PouchDB test-db gitignore block Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VTD8MdrseE79A52E8jWPhr
|
@Mutugiii Just a note here that the legacy .eslint.json is where the rules we need to evaluate for reenabling are stored. We could move those comments into the newer ESLint file or keep that file until they're all finished. |
📝 WalkthroughWalkthroughThe PR updates browser targeting, lint scripts and guidance, CouchDB setup validation and paths, contributor documentation, style guidance, and repository configuration. ChangesRepository tooling and developer workflow
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 10
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/CONTRIBUTING.md:
- Line 3: Update the introductory description in CONTRIBUTING.md to hyphenate
the compound adjective, changing “team supported” to “team-supported” while
leaving the surrounding text unchanged.
- Line 30: Replace the generic link text with descriptive destination-specific
labels at all affected sites: use “Gitter community” in
.github/CONTRIBUTING.md:30-30, “EditorConfig installation instructions” in
docs/Style-Guide.md:4-4, and “Angular i18n documentation” in
docs/Style-Guide.md:53-53, while preserving each existing URL.
- Line 14: Update the references to “here” on lines 14 and 20 of the
contributing guide to use Markdown links, adding the concept overview target for
the planet learning reference and the intern onboarding exercise target for the
onboarding reference.
- Line 25: Update the Planet entry in the contributor documentation to remove
the outdated “Angular 7” claim, replacing it with the repository’s current
Angular version or omitting the version entirely while preserving the existing
project description and link.
In `@docs/Style-Guide.md`:
- Line 60: Rename the later duplicate section headings in the documentation:
update the second “Naming” heading and the second “Variables” heading to
accurately describe their respective content, while leaving the earlier headings
unchanged and preserving Markdown navigation uniqueness.
- Around line 223-229: Update the validator references in the form validation
section of docs/Style-Guide.md to remove the leading slash, using the
repository-relative paths src/app/validators/custom-validators.ts and
src/app/validators/validator.service.ts.
- Line 2: Update the introductory description in Style-Guide.md to hyphenate
“quick to read” as “quick-to-read,” leaving the rest of the text unchanged.
- Around line 13-18: Update the TSLint section in the style guide to describe
the current ESLint workflow using eslint.config.mjs and npm run lint. Replace
the outdated TSLint hook installation command with the changed-file linting
behavior and document the relevant current hook commands, removing obsolete
indentation guidance tied to TSLint.
- Line 15: Update every fenced code block in Style-Guide.md at the referenced
sections to include an accurate language identifier after its opening fence,
using identifiers such as text, typescript, or scss based on each block’s
contents, so all MD040 warnings are resolved.
- Around line 46-53: Update the “il8n” section in the Style Guide to use
Angular’s valid “i18n” syntax throughout: rename the heading and all explanatory
references, change the paragraph example to use i18n, and change the image
attribute example to i18n-title.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: f771a141-037a-415d-a340-2943f6ffa35a
📒 Files selected for processing (15)
.browserslistrc.dockerignore.eslintrc.json.github/CONTRIBUTING.md.gitignore.mdlrcAGENTS.mdREADME.mddesign/courses/README.mddocker/db-init/Dockerfiledocs/Style-Guide.mdeslint.config.mjsgit-hooks/pre-pushpackage.jsonscripts/couchdb-setup.sh
💤 Files with no reviewable changes (3)
- .mdlrc
- .dockerignore
- .eslintrc.json
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 10
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/CONTRIBUTING.md:
- Line 3: Update the introductory description in CONTRIBUTING.md to hyphenate
the compound adjective, changing “team supported” to “team-supported” while
leaving the surrounding text unchanged.
- Line 30: Replace the generic link text with descriptive destination-specific
labels at all affected sites: use “Gitter community” in
.github/CONTRIBUTING.md:30-30, “EditorConfig installation instructions” in
docs/Style-Guide.md:4-4, and “Angular i18n documentation” in
docs/Style-Guide.md:53-53, while preserving each existing URL.
- Line 14: Update the references to “here” on lines 14 and 20 of the
contributing guide to use Markdown links, adding the concept overview target for
the planet learning reference and the intern onboarding exercise target for the
onboarding reference.
- Line 25: Update the Planet entry in the contributor documentation to remove
the outdated “Angular 7” claim, replacing it with the repository’s current
Angular version or omitting the version entirely while preserving the existing
project description and link.
In `@docs/Style-Guide.md`:
- Line 60: Rename the later duplicate section headings in the documentation:
update the second “Naming” heading and the second “Variables” heading to
accurately describe their respective content, while leaving the earlier headings
unchanged and preserving Markdown navigation uniqueness.
- Around line 223-229: Update the validator references in the form validation
section of docs/Style-Guide.md to remove the leading slash, using the
repository-relative paths src/app/validators/custom-validators.ts and
src/app/validators/validator.service.ts.
- Line 2: Update the introductory description in Style-Guide.md to hyphenate
“quick to read” as “quick-to-read,” leaving the rest of the text unchanged.
- Around line 13-18: Update the TSLint section in the style guide to describe
the current ESLint workflow using eslint.config.mjs and npm run lint. Replace
the outdated TSLint hook installation command with the changed-file linting
behavior and document the relevant current hook commands, removing obsolete
indentation guidance tied to TSLint.
- Line 15: Update every fenced code block in Style-Guide.md at the referenced
sections to include an accurate language identifier after its opening fence,
using identifiers such as text, typescript, or scss based on each block’s
contents, so all MD040 warnings are resolved.
- Around line 46-53: Update the “il8n” section in the Style Guide to use
Angular’s valid “i18n” syntax throughout: rename the heading and all explanatory
references, change the paragraph example to use i18n, and change the image
attribute example to i18n-title.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: f771a141-037a-415d-a340-2943f6ffa35a
📒 Files selected for processing (15)
.browserslistrc.dockerignore.eslintrc.json.github/CONTRIBUTING.md.gitignore.mdlrcAGENTS.mdREADME.mddesign/courses/README.mddocker/db-init/Dockerfiledocs/Style-Guide.mdeslint.config.mjsgit-hooks/pre-pushpackage.jsonscripts/couchdb-setup.sh
💤 Files with no reviewable changes (3)
- .mdlrc
- .dockerignore
- .eslintrc.json
🛑 Comments failed to post (10)
.github/CONTRIBUTING.md (4)
3-3: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Fix the compound adjective.
Change
team supportedtoteam-supportedin Line 3.🧰 Tools
🪛 LanguageTool
[grammar] ~3-~3: Use a hyphen to join words.
Context: ...meaningful when it is personalized, team supported & community-based, globally co...(QB_NEW_EN_HYPHEN)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/CONTRIBUTING.md at line 3, Update the introductory description in CONTRIBUTING.md to hyphenate the compound adjective, changing “team supported” to “team-supported” while leaving the surrounding text unchanged.Source: Linters/SAST tools
14-14: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Add the missing link targets.
Lines 14 and 20 refer to “here” but contain no Markdown links. Add the concept overview link and the intern onboarding exercise link.
Also applies to: 20-20
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/CONTRIBUTING.md at line 14, Update the references to “here” on lines 14 and 20 of the contributing guide to use Markdown links, adding the concept overview target for the planet learning reference and the intern onboarding exercise target for the onboarding reference.
25-25: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
rg -n '"`@angular/`(core|cli)"|`@if`' package.json src/app/tasks/tasks.component.htmlRepository: open-learning-exchange/planet
Length of output: 640
Update the Angular version in the README.
The repository declares Angular Core 20.3.21 and CLI 20.3.26, and
src/app/tasks/tasks.component.htmluses Angular control-flow@ifsyntax. ReplaceAngular 7with the current Angular version, or remove the version claim if it is not needed.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/CONTRIBUTING.md at line 25, Update the Planet entry in the contributor documentation to remove the outdated “Angular 7” claim, replacing it with the repository’s current Angular version or omitting the version entirely while preserving the existing project description and link.
30-30: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Use descriptive link text for documentation links.
Replace generic
[here]labels with destination-specific labels.
.github/CONTRIBUTING.md#L30-L30: use a label such as[Gitter community].docs/Style-Guide.md#L4-L4: use a label such as[EditorConfig installation instructions].docs/Style-Guide.md#L53-L53: use a label such as[Angular i18n documentation].🧰 Tools
🪛 markdownlint-cli2 (0.23.2)
[warning] 30-30: Link text should be descriptive
(MD059, descriptive-link-text)
📍 Affects 2 files
.github/CONTRIBUTING.md#L30-L30(this comment)docs/Style-Guide.md#L4-L4docs/Style-Guide.md#L53-L53🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/CONTRIBUTING.md at line 30, Replace the generic link text with descriptive destination-specific labels at all affected sites: use “Gitter community” in .github/CONTRIBUTING.md:30-30, “EditorConfig installation instructions” in docs/Style-Guide.md:4-4, and “Angular i18n documentation” in docs/Style-Guide.md:53-53, while preserving each existing URL.Source: Linters/SAST tools
docs/Style-Guide.md (6)
2-2: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Use a hyphen in the description.
Change “quick to read” to “quick-to-read.”
🧰 Tools
🪛 LanguageTool
[grammar] ~2-~2: Use a hyphen to join words.
Context: ...n a more concise way so you have a quick to read reference guide. ## Editor Config I...(QB_NEW_EN_HYPHEN)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/Style-Guide.md` at line 2, Update the introductory description in Style-Guide.md to hyphenate “quick to read” as “quick-to-read,” leaving the rest of the text unchanged.Source: Linters/SAST tools
13-18: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Update the linting instructions to the current workflow.
This guide still instructs contributors to use TSLint and install a TSLint hook. The current workflow uses
eslint.config.mjs,npm run lint, and changed-file linting. Document the current commands and hook behavior instead.🧰 Tools
🪛 LanguageTool
[style] ~18-~18: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...with TSLint currently is that it is not very good at indentation rules. Please make sure...(EN_WEAK_ADJECTIVE)
🪛 markdownlint-cli2 (0.23.2)
[warning] 15-15: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/Style-Guide.md` around lines 13 - 18, Update the TSLint section in the style guide to describe the current ESLint workflow using eslint.config.mjs and npm run lint. Replace the outdated TSLint hook installation command with the changed-file linting behavior and document the relevant current hook commands, removing obsolete indentation guidance tied to TSLint.
15-15: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Add language identifiers to fenced code blocks.
Markdownlint reports MD040 at Lines 15, 21, 26, 31, and 62. Add an accurate language identifier such as
text,typescript, orscssafter each opening fence.Also applies to: 21-21, 26-26, 31-31, 62-62
🧰 Tools
🪛 markdownlint-cli2 (0.23.2)
[warning] 15-15: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/Style-Guide.md` at line 15, Update every fenced code block in Style-Guide.md at the referenced sections to include an accurate language identifier after its opening fence, using identifiers such as text, typescript, or scss based on each block’s contents, so all MD040 warnings are resolved.Source: Linters/SAST tools
46-53: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash set -euo pipefail echo "== repo files around Style-Guide ==" fd -a 'Style-Guide.md|README.md' . || true echo "== style-guide excerpt ==" if [ -f docs/Style-Guide.md ]; then nl -ba docs/Style-Guide.md | sed -n '1,90p' fi echo "== occurrences of il8n and i18n in tracked files ==" rg -n '\bil8n\b|\bi18n\b' --glob '!node_modules' --glob '!dist' --glob '!build' || true echo "== package Angular version hints ==" for f in package.json angular.json; do if [ -f "$f" ]; then echo "--- $f ---" sed -n '1,220p' "$f" fi done echo "== git diff stat/summary ==" git diff --stat || true git diff -- docs/Style-Guide.md | sed -n '1,180p' || trueRepository: open-learning-exchange/planet
Length of output: 454
🏁 Script executed:
#!/bin/bash set -euo pipefail echo "== style-guide excerpt ==" if [ -f docs/Style-Guide.md ]; then awk '{printf "%6d: %s\n", NR, $0}' docs/Style-Guide.md | sed -n '1,90p' fi echo "== occurrences of il8n and i18n in tracked files ==" rg -n '\bil8n\b|\bi18n\b' --glob '!node_modules' --glob '!dist' --glob '!build' || true echo "== Angular version/package hints ==" for f in package.json angular.json; do if [ -f "$f" ]; then echo "--- $f ---" sed -n '1,220p' "$f" fi done echo "== git diff stat/summary ==" git diff --stat || true git diff -- docs/Style-Guide.md | sed -n '1,180p' || trueRepository: open-learning-exchange/planet
Length of output: 6059
🌐 Web query:
Angular i18n attribute i18n-title documentation💡 Result:
In Angular, the i18n-title attribute is used to mark the title attribute of an HTML element for translation [1][2]. General Syntax: To mark an element's attribute for translation, you use the prefix i18n- followed by the name of the attribute you wish to translate [1][2]. For the title attribute, this becomes i18n-title. Example: <img [src]="logo" i18n-title title="Angular logo" alt="Angular logo" /> Key Details: 1. Purpose: When you add i18n-title to an element, the Angular compiler extracts the value of the corresponding title attribute as a translatable string [1][2]. 2. Customizing Metadata: You can assign a meaning, description, and custom ID to the translation by setting the value of the i18n-title attribute [1][2]. Example:
[1][2] 3. Attribute Binding Limitations: The i18n-title attribute is designed for static attribute values. It generally does not support dynamic translation for properties bound with the square bracket syntax (e.g., [title]="variable") [3][4]. For dynamic content, standard template translation approaches or manual handling with the $localize tag in your component code are typically required [1][5]. Official documentation on preparing component templates for internationalization can be found in the Angular developer guide [2].
Citations:
- 1: https://v17.angular.io/guide/i18n-common-prepare
- 2: https://angular.dev/guide/i18n/prepare
- 3: https://stackoverflow.com/questions/53099534/how-to-translate-dynamic-attributes-attr-in-angular-6
- 4: https://stackoverflow.com/questions/46314686/angular-4-i18n-for-custom-attributes
- 5: https://angular.dev/api/localize/init/$localize
Replace
il8nwith Angular’si18nattributes.The Angular i18n guide uses
i18nand custom attribute prefixes such asi18n-title;il8n/il8n-titleis not valid Angular i18n syntax. Update the sample<p il8n>,il8nsection text, and the<img il8n-title ...>example to usei18n/i18n-title.🧰 Tools
🪛 markdownlint-cli2 (0.23.2)
[warning] 53-53: Link text should be descriptive
(MD059, descriptive-link-text)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/Style-Guide.md` around lines 46 - 53, Update the “il8n” section in the Style Guide to use Angular’s valid “i18n” syntax throughout: rename the heading and all explanatory references, change the paragraph example to use i18n, and change the image attribute example to i18n-title.
60-60: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Remove duplicate section headings.
### Namingappears at Lines 19 and 60.### Variablesappears at Lines 80 and 108. Rename the later headings to describe their specific content so Markdown navigation is unambiguous.Also applies to: 108-108
🧰 Tools
🪛 markdownlint-cli2 (0.23.2)
[warning] 60-60: Multiple headings with the same content
(MD024, no-duplicate-heading)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/Style-Guide.md` at line 60, Rename the later duplicate section headings in the documentation: update the second “Naming” heading and the second “Variables” heading to accurately describe their respective content, while leaving the earlier headings unchanged and preserving Markdown navigation uniqueness.Source: Linters/SAST tools
223-229: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Use repository-relative validator paths.
Remove the leading
/from/src/app/validators/.... The leading slash suggests an absolute filesystem or site-root path. Usesrc/app/validators/....As per path instructions,
AGENTS.mddocuments these validator locations with repository-relative paths.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/Style-Guide.md` around lines 223 - 229, Update the validator references in the form validation section of docs/Style-Guide.md to remove the leading slash, using the repository-relative paths src/app/validators/custom-validators.ts and src/app/validators/validator.service.ts.Source: Path instructions
@paulbert I moved the commented-out rules to the new ESLint file. I also updated the PR, removing some of the updates that expanded the scope of the issue. This version is now ready for review |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/CONTRIBUTING.md:
- Line 30: Update the community support sentence in CONTRIBUTING.md to direct
contributors to the supported Discord channel instead of Gitter, including
replacing the link and channel wording while preserving the surrounding
guidance.
In `@docs/Style-Guide.md`:
- Line 4: Update the EditorConfig guidance in the opening paragraph of
Style-Guide.md to explain that editors discover and use the repository’s
.editorconfig file, recommending installation of an EditorConfig plugin only for
editors without native support. Replace the existing HTTP documentation link
with the HTTPS editorconfig.org URL.
- Line 55: Update the Angular i18n documentation link in the Style Guide to use
https://angular.dev/guide/i18n instead of the legacy angular.io URL, leaving the
surrounding text unchanged.
- Line 51: Update the i18n guidance in the style guide to remove the prohibition
against applying i18n to elements containing only interpolation placeholders.
Clarify that Angular supports interpolation inside i18n-marked elements and
preserve the example as valid translatable content.
🪄 Autofix
✅ Autofix completed
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 6c67b303-bef2-4055-9f3b-00cf67d7f146
📒 Files selected for processing (5)
.github/CONTRIBUTING.mdAGENTS.mddocs/Style-Guide.mdeslint.config.mjspackage.json
💤 Files with no reviewable changes (1)
- eslint.config.mjs
🚧 Files skipped from review as they are similar to previous changes (2)
- AGENTS.md
- package.json
Fixes Applied SuccessfullyFixed 3 file(s) based on 4 unresolved review comments. Files modified:
Commit: The changes have been pushed to the Time taken: |
Fixed 3 file(s) based on 4 unresolved review comments. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
Summary
This PR consolidates project tooling and documentation organization. It removes the legacy
.eslintrc.jsonconfiguration (the project now uses flat config viaeslint.config.mjs), reorganizes npm scripts for clarity, moves documentation and setup scripts into dedicated directories, and simplifies the pre-push hook.Key Changes
.eslintrc.json: The 302-line legacy ESLint configuration is no longer needed; the project uses flat config (eslint.config.mjs).package.json):lint-all→lint:allfor consistency with newlint:htmlandlint:stylesscripts.lint(ESLint),lint:styles(sass-lint),lint:html(htmlhint).webdriver-set-version,starthub-true,starthub-false).git-hooks/pre-push):run_lint()function.Style-Guide.md→docs/Style-Guide.md.github/CONTRIBUTING.mdcreated (renamed from existing location)couchdb-setup.sh→scripts/couchdb-setup.shREADME.md: Updated CouchDB setup command path and contributing guidelines link.AGENTS.md: Updatedlint-all→lint:alland clarified thatlint:allis not yet gating CI (style/html baselines have pre-existing failures).docker/db-init/Dockerfile: Updated script path toscripts/couchdb-setup.sh..mdlrc(markdown linter config, no longer used)..dockerignoreto remove references to.eslintrcand.travis.yml..gitignoreto exclude PouchDB test databases (courses_new/,local-*/).Implementation Details
The pre-push hook now uses a cleaner functional approach with
run_lint()accepting directory, label, and npm script name, reducing duplication and improving maintainability. The hook still runsnpm run lintin both root andgateway/before allowing a push, but the implementation is more straightforward.The
lint:allcommand is documented as a heavier check that includes style and HTML linting, but CI and the pre-push hook continue to run onlynpm run lintuntil the style/html linting baselines are cleared of pre-existing failures.https://claude.ai/code/session_01VTD8MdrseE79A52E8jWPhr
Summary by CodeRabbit
Documentation
Developer Experience