chore: align deps, dogfood setup, fix lint:fix, YAML indent - #54
Conversation
|
Warning Review limit reached
Next review available in: 55 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
Walkthrough
ChangesLint tooling and repository formatting
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
Well, they aren't currently used by this repository, only expected to be used by consumers of what we publish. So as far as I can tell, as that adding them as devDependencies does is suppress some peerDependency warnings, and adds some unused devDependencies Or maybe you wanted to set them up so that this repository is using husky and lint-staged? |
Updates peerDependencies and devDependencies to match: - Upgrade TypeScript compiler version range constraint from ~5.7 to ~6.0 in devDependencies and peerDependencies - Update lockfile with resolved package additions and structure changes
5af5a63 to
b35328a
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@package.json`:
- Around line 43-48: Update the package.json lint:fix script to invoke
lint:prettier:fix instead of lint:prettier, and ensure lint:prettier:fix runs
Prettier with --write against the intended repository scope, including the root
if appropriate.
🪄 Autofix (Beta)
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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a349a9cd-4fff-4732-a9a8-95d9e8273d2b
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (2)
.husky/pre-commitpackage.json
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@prettier.config.mjs`:
- Around line 30-39: Update the lint-staged glob entries in package.json and the
corresponding README examples to include both yaml and yml alongside css, json,
md, and scss, ensuring staged YAML files are checked by the pre-commit workflow.
🪄 Autofix (Beta)
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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: cca5f31f-d23f-4da3-9a5d-206273c896ce
📒 Files selected for processing (11)
.github/ISSUE_TEMPLATE/bug_report.yml.github/ISSUE_TEMPLATE/other.yml.github/ISSUE_TEMPLATE/question.yml.github/ISSUE_TEMPLATE/rfc.yml.github/PULL_REQUEST_TEMPLATE.mdCHANGELOG.mdCONTRIBUTING.mdREADME.mdbin/setup.mjspackage.jsonprettier.config.mjs
* Configure husky and lint-staged * Simplify / improve scripts in packages.json
- Call lint:prettier:fix from lint:fix instead of passing --write to lint:prettier - Add lint:prettier:fix script with prettier --write . scope matching lint:prettier - Update setup script and README to match
0562d2e to
40b1356
Compare
- Align lint-staged with the Prettier YAML override added for 2-space indent - Update setup script and README examples so consumer projects get the same glob
About the Contributor
This pull request is posted on behalf of SuperFly.tv.
Type of Contribution
This is a: Code improvement
Current Behaviour
Before this PR:
huskyandlint-stagedwere peer dependencies but not explicitdevDependenciesin this repo, which could lead to environment differences in the local workspace.~5.7in dev and peer dependencies.package.json"prettier"key, scoped lint targets) rather than the consumer layout produced bysofie-code-standard-preset-setup.lint:fixasyarn lint:prettier --write, which expands toprettier --check . --writeand does not reliably apply fixes.New Behaviour
husky(^9) andlint-staged(^17) explicitly underdevDependenciesto align with their peer dependency ranges.~6.0under bothdevDependenciesandpeerDependencies.sofie-code-standard-preset-setupon this repo to dogfood the consumer layout (husky, lint-staged, standard lint scripts,.editorconfig, etc.)..husky/pre-commitrunninglint-staged.lint:fixto calllint:prettier:fixinstead of passing--writetolint:prettier.lint:prettier:fix(prettier --write .) to match thelint:prettierscope (prettier --check .).lint:fix/lint:prettier:fixfix inbin/setup.mjsand the README manual-setup / migration docs.*.yaml/*.ymlfiles always use 2-space indentation (code files remain tab-indented withtabWidth: 4).yarn.lock.lint:fixon all files in the repo, including markdown and YAML.Dogfooding note: the setup script sets
"prettier": "@sofie-automation/code-standard-preset/prettier.config.mjs"in consumer projects (correct — it resolves vianode_modules). In this repo we use"prettier": "./prettier.config.mjs"instead, because the package cannot reference itself throughnode_modules.yarn lintpasses locally with that override.Testing Instructions
yarn lintin this repo and confirm it passes (dogfooding with local./prettier.config.mjsoverride).yarn lint:prettier:fixand confirm YAML files (e.g..github/workflows/*.yaml) use 2-space indentation.@sofie-automation/code-standard-presetinstalled, runyarn sofie-code-standard-preset-setup(or--forceon an existing project) and verifypackage.jsoncontains:"lint:prettier:fix": "prettier --write .""lint:fix": "yarn lint:eslint --fix && yarn lint:prettier:fix"yarn lint:fixin that consumer project and confirm Prettier writes fixes (not just checks).Affected areas
sofie-code-standard-presetdev dependency alignment and local dogfooding setupprettier.config.mjsYAML indentation overridebin/setup.mjsgenerated lint scripts for consumer projectsTime Frame
Not urgent.
Other Information
Commits in this PR (will be squashed before merge):
chore: align devDependencies with peerDependencies versionschore: Update ourselves using setup scriptfix(setup): use lint:prettier:fix for lint:fixIndent YAML with 2 spaceschore: Format non-code files to match styleFiles changed:
.github/ISSUE_TEMPLATE/*,.github/PULL_REQUEST_TEMPLATE.md,.husky/pre-commit,CHANGELOG.md,CONTRIBUTING.md,README.md,bin/setup.mjs,package.json,prettier.config.mjs,yarn.lockStatus