Skip to content

Instantly share code, notes, and snippets.

@nirtamir2
Last active February 27, 2022 21:25
Show Gist options
  • Save nirtamir2/8833046af60233e5f5557d5bc2352579 to your computer and use it in GitHub Desktop.
Save nirtamir2/8833046af60233e5f5557d5bc2352579 to your computer and use it in GitHub Desktop.
module.exports = {
plugins: [
require.resolve("@trivago/prettier-plugin-sort-imports"),
require.resolve("prettier-plugin-packagejson"),
require.resolve("@nirtamir2/prettier-plugin-css-order"),
],
// @see https://github.com/trivago/prettier-plugin-sort-imports
importOrder: [
"^react$",
"<THIRD_PARTY_MODULES>",
// Internal modules
"^@core/(.*)$",
"^@server/(.*)$",
"^@ui/(.*)$",
"^@*/(.*)$",
// Relative imports
"^[./]",
],
overrides: [
{
files: "*.svg",
options: {
parser: "html",
},
},
],
};
@nirtamir2
Copy link
Author

The package.json script for prettier is

    "format": "prettier --write --ignore-unknown **",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment