A Prettier plugin that sorts dictionary keys in CSpell configuration files, ensuring consistent ordering of words, flagWords, ignoreWords, etc. Version 0.3.0 requires Prettier ^3 and ships TypeScript types. It is the only dedicated plugin for alphabetizing CSpell dictionary entries, focusing on lint-time ordering rather than runtime linting. The plugin is actively maintained with a small scope (dictionary file sorting only; config sorting planned). Alternative: manual sorting or other generic JSON sorters that don't understand CSpell structure.
npm install prettier-plugin-cspellVerified import paths — ran on the pinned version, not inferred.
Installation and basic usage of prettier-plugin-cspell to alphabetically sort CSpell dictionary words.
Upgrade Prettier to ^3.0.0
Use dynamic import() or configure Prettier's plugins array with a string (e.g., 'prettier-plugin-cspell').
Current scope is limited; check documentation for planned features.
Place this plugin last in the plugins array to avoid conflicts.
Use dynamic import() in scripts, or reference the plugin by string name in Prettier config (e.g., 'prettier-plugin-cspell').
Run 'npm install -D prettier-plugin-cspell' and ensure it's in package.json.
Add 'plugins: ["prettier-plugin-cspell"]' to .prettierrc. Ensure the file has a supported extension (e.g., .json, .yaml) and is within Prettier's range.