From the course: Next.js Ecommerce: Build a Shopping Platform from Scratch

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

A note on ESLint errors

A note on ESLint errors

Hey, guys. So this is something that I just wanted to mention real quick. So we're using ESLint and TypeScript. And when you run npm run build or you push to GitHub and you have your continuous deployment set up with Vercel, which we did in the last video, you're going to get errors like this. Like this query is defined but never used. Category is defined and never used. And this particular error is because of this TypeScript ESLint rule, no unused vars. So this isn't code that you've written yet, but I'm just trying to show you this now before you get to it. So this function, getAllProducts, I'm passing in query and category, but I'm not using it yet in the code because we haven't gotten to that part of the project, of the course. So when you push to GitHub and it automatically deploys, it's going to throw this error. And there's a couple of things you could do. What I would definitely suggest is doing nothing for something like this. If you have other types of rules and you can fix…

Contents