Prettier plugin that sorts StyleX keys according to StyleX property priorities.
npm install --save-dev prettier-plugin-stylex-key-sort
{
"plugins": ["prettier-plugin-stylex-key-sort"]
}
npx prettier --write '**/*.{ts,js,tsx,jsx}'
npx prettier --write '**/*.{ts,js,tsx,jsx}' --plugin=prettier-plugin-stylex-key-sort
- Minimum number of keys required after which the sort is enforced
-
Default value:
2
{
"plugins": ["prettier-plugin-stylex-key-sort"],
"minKeys": 2
}
- Possible string from where you can import StyleX modules
-
Default value:
["@stylexjs/stylex", "stylex"]
{
"plugins": ["prettier-plugin-stylex-key-sort"],
"validImports": ["stlx"]
}
- 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