-
Notifications
You must be signed in to change notification settings - Fork 152
Open
Labels
Description
Your Environment
- Prettier version: 3.4.2
- node version: 22.13.0
- package manager: [email protected]
- IDE: PhpStorm
Describe the bug
Whenever I run yarn prettier . --write, the comment at the beginning of the while gets replicated every time. Its replicate will appear UNDER the imports.
To Reproduce
Have the following code:
// Offerte aanvragen
"use client";
import axios from "axios";
import Cookies from "js-cookie";
import { useRouter } from "next/navigation";
import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { RotatingLines } from "react-loader-spinner";
import { v4 as uuidv4 } from "uuid";
import ClientsTellSmall from "~/components/ClientsTellSmall";
import ErrorMessage from "~/components/ErrorMessage";
import FormSubmittedMessage from "~/components/FormSubmittedMessage";
import Heading from "~/components/Heading";
import LabelCard from "~/components/LabelCard";
import PortableContent from "~/components/PortableContent";
/**
* OFFER / OFFERTE AANVRAGEN
*/
const RequestQuoteForm = () => {};Expected behavior
The expected behavior is having // Offerte aanvragen just once in the code.
Screenshots, code sample, etc
Configuration File (cat .prettierrc, prettier.config.js, .prettier.js)
/**@type {import("prettier").Config}*/
const prettierConfig = {
importOrderSeparation: true,
importOrderSortSpecifiers: true,
plugins: ["@trivago/prettier-plugin-sort-imports"],
};
export default prettierConfig;Error log
N/A
Contribute to @trivago/prettier-plugin-sort-imports
- I'm willing to fix this bug 🥇
kylehg, zuher83, richardtreier and alb-rl

