daidodo / format-imports-vscode

Format imports and exports for JavaScript and TypeScript in VS Code.
https://marketplace.visualstudio.com/items?itemName=dozerg.tsimportsorter
MIT License
62 stars 5 forks source link

Feature request: Add support for group comments #99

Open silence opened 1 year ago

silence commented 1 year ago

First off great extension. This was exactly what I was looking for.

I am thinking if we can add an automatic import sorting feature with the option to add comments for different import categories. This feature should be applicable to all TypeScript projects and will provide developers with cleaner and more maintainable codebases.

Example:

// App.tsx
// React imports
import React, { useState, useEffect } from "react";

// Third-party library imports
import { useSession } from "next-auth/react";
import { useRouter } from "next/navigation";

// Local module imports
import { useCustomHook } from "./Hooks";
import { Post } from "@types";

// Components
import Form from "@components/Form";

// Custom styles
import "./styles.css";