๐ก Eslint import rules
Boyadjie opened this issue ยท 0 comments
Boyadjie commented
Feature Request ๐จ๐ผโ๐ป
We want to fix our imports that are really messy
Use Case โ๐ผ
Better readability of the imports
Possible Solution ๐ก
- Use the lib eslint-plugin-import to override the default eslint config for imports that isn't enough alone
- Add config to organise imports, we can use this as a reference:
"import/order": [ "error", { "groups": ["builtin", "external", "internal"], "pathGroups": [ { "pattern": "react", "group": "external", "position": "before" } ], "pathGroupsExcludedImportTypes": ["react"], "newlines-between": "always", "alphabetize": { "order": "asc", "caseInsensitive": true } } ]
- Run
pnpm lint --fix
to fix all the files following the rules