diff --git a/.vscode/settings.json b/.vscode/settings.json index 3661ecf9c2a..0d76bedafc6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -16,5 +16,8 @@ "[markdown]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, - "vitest.disableWorkspaceWarning": true + "vitest.disableWorkspaceWarning": true, + "editor.codeActionsOnSave": { + "source.organizeImports": "never" + } } diff --git a/eslint.config.js b/eslint.config.js index 93c1c6dff3c..f6997e29ff1 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -136,6 +136,25 @@ export default tseslint.config( }, ], 'import/no-relative-packages': 'error', + 'import/order': [ + 'error', + { + groups: [ + 'builtin', // Node.js built-in modules + 'external', // External npm packages + 'internal', // Internal modules (aliases, monorepo packages) + 'parent', // Parent directory imports + 'sibling', // Same directory imports + 'index', // Index file imports + 'type', // Type-only imports + ], + 'newlines-between': 'never', + alphabetize: { + order: 'asc', + caseInsensitive: true, + }, + }, + ], 'no-cond-assign': 'error', 'no-debugger': 'error', 'no-duplicate-case': 'error',