Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"vitest.disableWorkspaceWarning": true
"vitest.disableWorkspaceWarning": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "never"
}
}
19 changes: 19 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
},
Comment on lines +141 to +156

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

For this rule to correctly categorize internal monorepo packages (like @google/gemini-cli-core), you should define pathGroups. Without this, packages scoped under @google/ will be treated as external and won't be grouped with other internal modules as intended.

By adding a pathGroups configuration for @google/** and adjusting pathGroupsExcludedImportTypes, you can ensure that your monorepo's internal packages are correctly placed in the internal group.

        {
          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
          ],
          pathGroups: [
            {
              pattern: '@google/**',
              group: 'internal',
            },
          ],
          pathGroupsExcludedImportTypes: ['builtin'],
          'newlines-between': 'never',
          alphabetize: {
            order: 'asc',
            caseInsensitive: true,
          },
        },

],
'no-cond-assign': 'error',
'no-debugger': 'error',
'no-duplicate-case': 'error',
Expand Down