Skip to content

Instantly share code, notes, and snippets.

@vantm
Created October 12, 2025 19:49
Show Gist options
  • Select an option

  • Save vantm/7801f1edbef1801bfc173f587b58f1d8 to your computer and use it in GitHub Desktop.

Select an option

Save vantm/7801f1edbef1801bfc173f587b58f1d8 to your computer and use it in GitHub Desktop.
import simpleImportSort from 'eslint-plugin-simple-import-sort';
const pkgs = [
// frontend packages
'^react$',
'^react/',
'^react-dom$',
'^react-dom/',
'^next$',
'^next/',
// backend packages
'^@nextjs/',
'^@prisma/',
];
export default {
plugins: {
'simple-import-sort': simpleImportSort,
},
rules: {
'import/order': 'off',
'sort-imports': 'off',
'simple-import-sort/imports': [
'error',
{
groups: [['^\\u0000', ...pkgs, '^', '^@repo/', '^@/', '^\\.']],
},
],
'simple-import-sort/exports': 'error',
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment