Skip to content

[v1.5.0] Remove default prettier import sorting

Latest
Compare
Choose a tag to compare
@Willem-Jaap Willem-Jaap released this 05 Dec 16:16
· 120 commits to master since this release

This release removes @trivago/prettier-plugin-sort-imports from the core package and exposes a new eslint-config-pixel/prettier/base export.
You can use this file as a base for your project specific prettier config like this:

module.exports = {
    ...require('eslint-config-pixel/prettier/base'),
    // Custom settings:
    plugins: ['@ianvs/prettier-plugin-sort-imports', 'prettier-plugin-tailwindcss'],
    importOrder: ['^react$', '^next$', '<THIRD_PARTY_MODULES>', '', '^~(.*)$'],
    importOrderParserPlugins: ['typescript', 'jsx', 'decorators-legacy'],
    importOrderTypeScriptVersion: '5.0.0',
};

The plugin is removed because you want to configure its settings on a per project basis. We recommend using @ianvs/prettier-plugin-sort-imports in favour of @trivago/prettier-plugin-sort-imports for prettier v3+ and ESM support.