prettier-plugin-stylex-key-sort
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

prettier-plugin-stylex-key-sort

Prettier plugin that sorts StyleX keys according to StyleX property priorities.

Installation

npm install --save-dev prettier-plugin-stylex-key-sort

Usage

With .prettierrc

{
  "plugins": ["prettier-plugin-stylex-key-sort"]
}

npx prettier --write '**/*.{ts,js,tsx,jsx}'

Without config

npx prettier --write '**/*.{ts,js,tsx,jsx}' --plugin=prettier-plugin-stylex-key-sort

Options

minKeys

  • Minimum number of keys required after which the sort is enforced
  • Default value: 2
{
  "plugins": ["prettier-plugin-stylex-key-sort"],
  "minKeys": 2
}

validImports

  • Possible string from where you can import StyleX modules
  • Default value: ["@stylexjs/stylex", "stylex"]
{
  "plugins": ["prettier-plugin-stylex-key-sort"],
  "validImports": ["stlx"]
}

Contributing

  • Any contributions are welcome
  • Please open an issue if you encounter any bugs
  • Make sure an issue exists before you create a pull request
  • Act according to the code of conduct when contributing to the project

Package Sidebar

Install

npm i prettier-plugin-stylex-key-sort

Weekly Downloads

11

Version

1.0.1

License

MIT

Unpacked Size

28.6 kB

Total Files

11

Last publish

Collaborators

  • nedjulius