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

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!