Cleanup Whitespace and duplicate classnames in Tailwind using Prettier

Cleanup Whitespace and duplicate classnames in Tailwind using Prettier

Tailwind has released a new version of prettier-plugin-tailwindcss which adds support for removing unecessary whitespaces and duplicate classnames.


Cleaningup unecessary whitespace

When you are copying a classname or deleting a class name from the middle of a list, it's easy to endup with some extraspace that needs to be cleanedup.

Now prettier plugin will handle it automatically.

Removing whitespaces in Tailwind using Prettier

Removing Duplicate Classes

VS Code will warn us if we use the duplicate classnames using the yellow lines, but now Prettier plugin can remove those duplicate classes automatically.

Removing duplicate classnames using Prettier


To start playing with these improvements in your project using the following command

 npm i prettier-plugin-tailwindcss@latest        

要查看或添加评论,请登录

NIDHIN KUMAR的更多文章

  • He was the Pillar

    He was the Pillar

    In the grand kingdom of TechWar Inc., there existed a mighty wizard.

  • Fluid Compute

    Fluid Compute

    In the fast-evolving world of web development, efficiency and scalability are crucial. While dedicated servers provide…

  • Storybook 8.5

    Storybook 8.5

    Storybook has long been the go-to workshop for building, documenting, and testing UI components. It’s a tool loved by…

  • Future of Transportation (CES 2025 Highlights)

    Future of Transportation (CES 2025 Highlights)

    The world of transportation is undergoing a significant transformation, driven by advancements in Artificial…

  • Next.js use cache directive

    Next.js use cache directive

    directive from Next.js designates a component or a function to be cached.

  • AgiBot Robotic Learning Dataset

    AgiBot Robotic Learning Dataset

    Chinese robotics firm AgiBot, also known as Zhiyuan Robotics, has announced the release of the largest robotic learning…

  • Spotify Leverages Llama for Contextualized Recommendations

    Spotify Leverages Llama for Contextualized Recommendations

    Spotify, the world’s leading audio streaming platform, is taking artist discovery and user engagement to the next level…

  • Pika 2.0

    Pika 2.0

    Pika proudly unveils its latest innovation, Pika 2.0, designed to redefine your creative experience.

  • Holidays Are Coming: Coca-Cola’s AI-Infused Christmas Campaign Explained

    Holidays Are Coming: Coca-Cola’s AI-Infused Christmas Campaign Explained

    Coca-Cola's 2024 Christmas advert has sparked a range of reactions, with some fans voicing disappointment over the…

  • Poop Health with AI

    Poop Health with AI

    AI is becoming an integral part of our daily lives—from the phones we use, the songs we listen, the food that we eat…

社区洞察

其他会员也浏览了