My First Encounter With ESLint
Just when I wanted to push to production: 104 lines of errors that I had never seen before. That's how I met ESLint. I had been re-coding my first SaaS, DebateTrend, from Express to Next.js because I thought it would be a good learning experience and I also wanted to move it to a full-stack framework with more built-in features. So after I had re-coded everything I decided there was no better time to move to production. That's exactly what I did. I pushed my code to GitHub expecting everything to go flawlessly and for the magic to happen in Vercel, but… "Build failed" I was incredibly confused. It ran perfectly fine when I tried it locally (famous last words). After a quick Google search, of the errors I was getting in the logs, I realized that I needed to run some kind of a command. Since I was new to Next.js I hadn't run "npm run build" at all. I didn't know that it checks if the application is production-ready and activates ESLint powers. Honestly, I didn't even know what ESLint was. All I had heard from it were some memes, from which I got an idea of what it was about. So I ran "npm run build" for the first time after 3 weeks of coding and remaking the app… I had 104 lines of errors.
Just when I wanted to push to production: 104 lines of errors that I had never seen before. That's how I met ESLint.
I had been re-coding my first SaaS, DebateTrend, from Express to Next.js because I thought it would be a good learning experience and I also
wanted to move it to a full-stack framework with more built-in features.
So after I had re-coded everything I decided there was no better time to move to production. That's exactly what I did. I pushed my code to GitHub expecting everything to go flawlessly and for the magic to happen in Vercel, but…
"Build failed"
I was incredibly confused. It ran perfectly fine when I tried it locally (famous last words). After a quick Google search, of the errors I was getting in the logs, I realized that I needed to run some kind of a command.
Since I was new to Next.js I hadn't run "npm run build" at all. I didn't know that it checks if the application is production-ready and activates ESLint powers.
Honestly, I didn't even know what ESLint was. All I had heard from it were some memes, from which I got an idea of what it was about.
So I ran "npm run build" for the first time after 3 weeks of coding and remaking the app…
I had 104 lines of errors.