-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Issue Description
An import grouping inconsistency was identified in the CLP codebase that should be addressed by adding proper ESLint rules to enforce consistent import organization.
Current Problem
In files like components/log-viewer-webui/client/src/AntdApp.tsx, external dependencies are mixed with local imports without proper grouping:
import {RouterProvider} from "react-router";
import {ConfigProvider} from "antd";
import router from "./router";
import THEME_CONFIG from "./theme";Expected Behavior
Imports should be grouped and ordered consistently:
- External dependencies (from node_modules)
- Local imports (relative paths)
- Within each group, maintain alphabetical or logical ordering
Example of properly organized imports:
import {ConfigProvider} from "antd";
import {RouterProvider} from "react-router";
import router from "./router";
import THEME_CONFIG from "./theme";Suggested Solution
Add ESLint rules to enforce import organization, such as:
import/orderrule with appropriate configurationimport/newline-after-importfor spacing between groups
Context
This issue was identified in PR: y-scope/clp#937
Related comment: y-scope/clp#937 (comment)
Benefits
- Improved code readability and maintainability
- Consistent import organization across the entire codebase
- Automatic enforcement through ESLint to prevent future inconsistencies
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels