Skip to content

docs: update README and templates for v4.0.0#53

Draft
rjmunro wants to merge 4 commits into
Sofie-Automation:mainfrom
rjmunro:rjmunro/update-docs
Draft

docs: update README and templates for v4.0.0#53
rjmunro wants to merge 4 commits into
Sofie-Automation:mainfrom
rjmunro:rjmunro/update-docs

Conversation

@rjmunro
Copy link
Copy Markdown
Contributor

@rjmunro rjmunro commented Jun 4, 2026

About the Contributor

This pull request is posted on behalf of SuperFly.tv.

Type of Contribution

This is a: Documentation improvement / Code improvement

Current Behaviour

Before this PR, the sofie-code-standard-preset repository had outdated documentation, an old hyphenated PR template name (.github/PULL-REQUEST-TEMPLATE.md), and .prettierrc.json was rewritten instead of deleted.

New Behaviour

  • Fully updated the README.md for v4.0.0, documenting all breaking changes and new features.
  • Improved README.md structure and clarity.
  • Renamed the pull request template to .github/PULL_REQUEST_TEMPLATE.md to match the standard GitHub-documented filename.
  • Configured .prettierrc.json to be deleted rather than rewritten.

Testing Instructions

  • I have added one or more unit tests for this PR
  • I have updated the relevant unit tests
  • No unit test changes are needed for this PR

Verify that the README.md is correct, the PR template filename is standard, and that standard configurations build nicely.

Affected areas

Documentation, PR templates, and repository standard configuration files.

Time Frame

Not urgent, ready for merging.

Other Information

Status

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests have been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

rjmunro added 4 commits June 3, 2026 17:02
…ew features

BREAKING CHANGES:
- Node 22 is now the minimum supported version (up from Node 20)
- TypeScript ~6.0 peerDependency required (up from ~5.7)
- husky@^9 and lint-staged@^17 required as peerDependencies
- Must switch prettier config from .prettierrc.json to prettier.config.mjs
- Lint script names standardised (lint:raw => lint:eslint, lint-fix => lint:fix)
- lint-staged now uses check-only commands; covers .mjs/.cjs files
- Declare yarn v4 as required (not just assumed); note the setup script
  enforces this and the generated scripts use yarn directly
- Explain why .editorconfig is always overwritten: the preset's copy is
  canonical since there was no standard file to update from previously
- De-duplicate the "commit then lint:fix then commit again" instructions
  into a single shared "Next steps" section, removing repetition between
  the automated and manual setup paths
- Rename "Additional configuration" to "Next steps" to better reflect
  that it follows on from both setup paths
- Replace "build off the generated config" with "extend the generated
  config" in the ESLint customisation section
- Replace the "Jest config" section with a "Test runner" section that
  recommends Vitest for new projects (with testRunner: 'vitest' option
  in generateEslintConfig), while keeping Jest fully documented for
  existing projects
Previously the setup script tried to rewrite .prettierrc.json to contain
a string reference to the preset's prettier.config.mjs. This was wrong:
Prettier 3 treats .prettierrc.json as a JSON config object, so a string
value there doesn't work as expected, and auto-discovers plugins from
node_modules (causing "could not be loaded" errors for optional peer
plugins like prettier-plugin-ember-template-tag).

The correct fix is to delete .prettierrc.json entirely and rely on the
package.json "prettier" key pointing to prettier.config.mjs (which has
an explicit plugins list and no auto-discovery).

New behaviour:
- Without --force: warn that .prettierrc.json exists and will shadow the
  preset config, and instruct the user to delete it manually
- With --force: delete .prettierrc.json automatically

Also update the README to reflect this.
GitHub's documentation consistently uses `PULL_REQUEST_TEMPLATE.md`
(underscore) as the example filename. While the hyphen variant
(`PULL-REQUEST-TEMPLATE.md`) also appears to work in practice, this rename
aligns with the documented convention.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2fa674fc-7022-40da-9e05-a505756ce4c9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant