![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
prettier-plugin-md-title-case
Advanced tools
Make Prettier convert your Markdown headings to title-case.
Make sure that your Markdown headings stay consistent no matter who writes them.
A plugin that makes Prettier convert your markdown headings to title case using the title-case npm package.
Features
Caveat
This plugin overrides the built-in Prettier parser for markdown
. This means that it is incompatible with other plugins that do the same; only the last loaded plugin that exports one of those parsers will function.
npm install --save-dev prettier-plugin-md-title-case
Note that prettier
is a peer dependency, so make sure you have it installed in your project. Prettier 2 is not supported as this package is written with ESM syntax.
Configure Prettier to use the plugin according to the Plugins docs, for example by adding it to the plugins
config:
// prettier.config.js
/** @type {import('prettier').Config} */
export default {
plugins: ['prettier-plugin-md-title-case'],
};
It doesn't support inline HTML headings.
You can pass the supported options of title-case
(see npmjs.com/package/title-case#options) to your Prettier config as a JSON-stringified object via the titleCase
option.
// prettier.config.js
/** @type {import('title-case').Options} */
const titleCaseOptions = { locale: 'en_US' };
/** @type {import('prettier').Config} */
export default {
plugins: ['prettier-plugin-md-title-case'],
titleCase: JSON.stringify(titleCaseOptions),
};
If it doesn't work, you can try to prefix your prettier
command with DEBUG=true
(or any truthy value) which will make this plugin print runtime exception logs.
This plugin acts outside of Prettier's scope because "Prettier only prints code. It does not transform it.", and technically converting the case is a code transformation. In my opinion however, Markdown is just markup and not really code, and it doesn't change the AST of the Markdown file (just the content of some text node values). Therefore the practical benefits outweigh sticking with the philosophy in this case.
MIT.
FAQs
Make Prettier convert your Markdown headings to title-case.
We found that prettier-plugin-md-title-case demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.