docs: update README and templates for v4.0.0#53
Draft
rjmunro wants to merge 4 commits into
Draft
Conversation
…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.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-presetrepository had outdated documentation, an old hyphenated PR template name (.github/PULL-REQUEST-TEMPLATE.md), and.prettierrc.jsonwas rewritten instead of deleted.New Behaviour
README.mdfor v4.0.0, documenting all breaking changes and new features.README.mdstructure and clarity..github/PULL_REQUEST_TEMPLATE.mdto match the standard GitHub-documented filename..prettierrc.jsonto be deleted rather than rewritten.Testing Instructions
Verify that the
README.mdis 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