prettier-plugin-ripple

raw JSON →
0.2.152 verified Sat Apr 25 auth: no javascript

A Prettier plugin for formatting Ripple (.ripple) files, version 0.2.152. It integrates with Prettier to provide consistent formatting for Ripple source files. The plugin requires Prettier >= 2.0.0 and the ripple package as peer dependencies. It is part of the Ripple ecosystem, a reactive UI library. Release frequency appears to be patch updates tied to ripple releases. Key differentiators: dedicated Prettier plugin for Ripple files, ensuring code style consistency across projects.

error The 'prettier-plugin-ripple' plugin failed to load: Cannot find module 'ripple'
cause Missing peer dependency: `ripple` is not installed.
fix
Run npm install ripple to install the missing peer dependency.
error Error: Invalid plugin in config: "prettier-plugin-ripple" is not a valid plugin name.
cause Plugin name typo or not installed; or Prettier version too old.
fix
Ensure the plugin is installed: npm install --save-dev prettier-plugin-ripple. Also check Prettier version is >=2.0.0.
error TypeError: Cannot read properties of undefined (reading 'options')
cause The ripple file contains syntax errors or unsupported Ripple version.
fix
Check the Ripple file for syntax errors and ensure the ripple package version matches the plugin's expected version.
gotcha The plugin only works with Prettier version 2.x or higher. Older versions are not supported.
fix Update Prettier to version 2.0.0 or later.
gotcha The plugin requires the `ripple` package to be installed as a peer dependency. Skipping it will cause parsing errors.
fix Install the `ripple` package alongside prettier-plugin-ripple.
gotcha The plugin is not compatible with Prettier 3.x's new module system if used in ESM projects without proper configuration.
fix Ensure your Prettier config is in CommonJS format or use dynamic import accordingly.
npm install prettier-plugin-ripple
yarn add prettier-plugin-ripple
pnpm add prettier-plugin-ripple

Install the plugin, configure Prettier to use it, and format a Ripple file.

// Install dependencies
npm install --save-dev prettier prettier-plugin-ripple

// Create .prettierrc.json
{
  "plugins": ["prettier-plugin-ripple"],
  "semi": true,
  "singleQuote": true,
  "tabWidth": 2
}

// Format a .ripple file
npx prettier --write input.ripple