DEV Community

Cover image for Set up linting and formatting for code and (S)CSS in Next.js with ESLint, Stylelint, Prettier and lint-staged
nausaf
nausaf

Posted on • Edited on

19 1 1

Set up linting and formatting for code and (S)CSS in Next.js with ESLint, Stylelint, Prettier and lint-staged

UPDATE: Please find an up to date version of this article on FreeCodeCamp.

Top comments (4)

Collapse
 
markau_48 profile image
Mark

These tooling stacks are a complete nightmare. A mix of old and new doco, old and new versions, deprecated packages, invalid peer dependencies ... but I followed your guide (without next) and it Just Works™ 💯. Thank you so much 🙏

Collapse
 
nausaf profile image
nausaf • Edited

Hi Mark,

Thanks a lot for your feedback.

You're absolutely right, these stacks a nightmare! The reason why this guide is so long is so that people could untangle themselves if they got stuck, and so that they understood enough about the tooling to change/adapt the setup as needed! I am glad you got to the end of it.

Thanks,

Naveed

Collapse
 
parnasmi profile image
Ilhom Max

Really useful article with instructions. I followed line by line and setup configuration for our enterprise app. Everything is working OK. Thank you!

Collapse
 
nidala1992 profile image
nidalA1992

Thank you. It was very helpfull for me!

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay