<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Tomi budi</title>
    <description>The latest articles on Forem by Tomi budi (@tomibudis).</description>
    <link>https://forem.com/tomibudis</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F623747%2F24f06c7a-8eea-423c-8dd3-087fe2e41d66.png</url>
      <title>Forem: Tomi budi</title>
      <link>https://forem.com/tomibudis</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/tomibudis"/>
    <language>en</language>
    <item>
      <title>7 Lessons from 7 Years in Tech</title>
      <dc:creator>Tomi budi</dc:creator>
      <pubDate>Tue, 17 Jun 2025 11:43:30 +0000</pubDate>
      <link>https://forem.com/tomibudis/7-lessons-from-7-years-in-tech-7ph</link>
      <guid>https://forem.com/tomibudis/7-lessons-from-7-years-in-tech-7ph</guid>
      <description>&lt;p&gt;It's been 7 years since I started my journey in tech — from working at small startups, moving to larger companies, to building my own side projects. Along the way, I’ve learned a lot — not just about code, but also about mindset, habits, and personal growth.&lt;/p&gt;

&lt;p&gt;Here are the 7 most meaningful lessons I’ve learned in the past 7 years.&lt;/p&gt;




&lt;h3&gt;
  
  
  1. &lt;strong&gt;Technology Always Changes&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Frameworks come and go. New tools show up every month. If you try to chase everything, you'll burn out quickly. What matters more is learning &lt;em&gt;how to learn&lt;/em&gt; — developing adaptability, understanding core concepts, and having the habit of exploring.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“It’s not about knowing everything — it’s about knowing how to find out.”&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  2. &lt;strong&gt;Soft Skills Are Superpowers&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Early on, I thought coding was everything. But over time, I realized communication, listening, and teamwork often make the real difference. Many successful projects happened not because of perfect code — but because of clear collaboration.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. &lt;strong&gt;Imposter Syndrome Is Normal&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Feeling like you’re not smart enough, like everyone else knows more — that’s something I’ve felt many times, even now. But that feeling is not a reason to stop. In fact, it often pushes us to keep learning and stay humble.&lt;/p&gt;




&lt;h3&gt;
  
  
  4. &lt;strong&gt;Build a Digital Footprint Early&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;When I started consistently sharing progress, writing insights, and uploading projects to GitHub, new connections started to appear. People began to recognize what I could do. Opportunities followed — freelance gigs, communities, even job offers.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“If you don’t talk about your work, no one will know what you’re capable of.”&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  5. &lt;strong&gt;Focus Beats Busy&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;I used to take pride in working late into the night. But eventually, I realized that being busy doesn’t mean being productive. What matters is knowing what to prioritize — and making space to rest.&lt;/p&gt;




&lt;h3&gt;
  
  
  6. &lt;strong&gt;Learn to Ask the Right Questions&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Many people stay stuck not because they don’t have answers, but because they don’t know what to ask. Being able to ask clear, focused questions is a powerful skill. It's one of the keys to becoming a good problem solver.&lt;/p&gt;




&lt;h3&gt;
  
  
  7. &lt;strong&gt;This Is a Marathon, Not a Sprint&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;It's tempting to always go full speed — take every course, build side projects, constantly push yourself. But if you burn out, everything stops. Managing your energy is crucial. Getting enough sleep, making time to rest — that’s not laziness. That’s sustainability.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;This is just a snapshot of the stories and lessons I’ve gathered over the years. Maybe some of these lessons resonate with you. Or maybe you have your own versions.&lt;/p&gt;

&lt;p&gt;If you have time, feel free to check out my newly updated portfolio at &lt;a href="https://hellotoms.com" rel="noopener noreferrer"&gt;hellotoms.com&lt;/a&gt; — I’ve gathered my projects, writings, and documentation there as part of this journey.&lt;/p&gt;

&lt;p&gt;Thanks for reading 🙌&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>ai</category>
      <category>react</category>
    </item>
    <item>
      <title>Recipe to create stunning boilerplate Nextjs</title>
      <dc:creator>Tomi budi</dc:creator>
      <pubDate>Tue, 11 Jul 2023 14:07:17 +0000</pubDate>
      <link>https://forem.com/tomibudis/recipe-to-create-stunning-boilerplate-nextjs-4h6e</link>
      <guid>https://forem.com/tomibudis/recipe-to-create-stunning-boilerplate-nextjs-4h6e</guid>
      <description>&lt;p&gt;Revolutionize your Front-End Workflow: A Guide to crafting Beautiful Boilerplate Code Nextjs&lt;/p&gt;

&lt;p&gt;Here is my recipe for creating your my boilerplate. Recently, my job has involved creating front-end projects from scratch, which can be inefficient with repetitive tasks. With my experience, I hope to provide insight for everyone to create their own boilerplate with their own style. Feel free to add, use or comment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tech Stack&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I choose the most common tech stack that popular in this year to setup my boilerplate bellow are the details: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Next.js v12 for fast and reliable performance&lt;/li&gt;
&lt;li&gt;Tailwind CSS for styling, with many pre-built components&lt;/li&gt;
&lt;li&gt;Jest for high-quality code testing&lt;/li&gt;
&lt;li&gt;Tanstack/React-Query for managing and caching data in React applications&lt;/li&gt;
&lt;li&gt;Axios for HTTP requests&lt;/li&gt;
&lt;li&gt;Day.js for easy-to-use date and time formatting
The app is also set up as PWA, which means that users can access it offline and enjoy a seamless mobile user experience.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Unit Test/Coverage&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To ensure good code quality, it is important to prepare unit tests for each component and function, and to cover them thoroughly. Setting up these tests should be one of the initial steps when creating a repository. I use instanbul-badges-readme to generate a report that shows the percentage of code coverage for the repository automatically. &lt;/p&gt;

&lt;p&gt;How to install &lt;a href="https://www.npmjs.com/package/istanbul-badges-readme"&gt;https://www.npmjs.com/package/istanbul-badges-readme&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;add on our script package.json&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;script: {
    "test:coverage-badge": "istanbul-badges-readme"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;feel free to custom script name &lt;code&gt;test:coverage-badge&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;here’s the result on my README.md&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;## uTests Coverage Status

| Statements                                                                         | Branches                                                                       | Functions                                                                           | Lines                                                                       |
| ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| ![Statements](https://img.shields.io/badge/statements-77.12%25-red.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-54.23%25-red.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-87.09%25-yellow.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-81.11%25-yellow.svg?style=flat) |
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Lighthouse Performance&lt;/strong&gt;&lt;br&gt;
make sure all things keep performance as long the code changes frequently merged onto main branch. We need to identify the root cause of the issue in order to fix it in small parts. I have chosen Google Lighthouse to measure the performance of my app and also create automatically generate a report.&lt;/p&gt;

&lt;p&gt;let’s add custom script to generate report&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;script: {
    "lighthouse-report": "npx lighthouse-badges --urls https://localhost:3000 -o lighouse"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;before you run the script make sure you have been run the app on &lt;code&gt;https://localhost:3000&lt;/code&gt; if not you can customize the script&lt;/p&gt;

&lt;p&gt;then run the script &lt;code&gt;lighthouse-report&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;wait few seconds let’s see the magic. all file needed generate on lighthouse directory then readme updated as well&lt;/p&gt;

&lt;p&gt;here’s the result&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;### Lighthouse

![Lighthouse Accessibility Badge](./lighthouse/lighthouse_accessibility.svg) ![Lighthouse Best Practices Badge](./lighthouse/lighthouse_best-practices.svg) ![Lighthouse Performance Badge](./lighthouse/lighthouse_performance.svg) ![Lighthouse PWA Badge](./lighthouse/lighthouse_pwa.svg) ![Lighthouse SEO Badge](./lighthouse/lighthouse_seo.svg)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Setup Commit, Eslint, Prettier&lt;/strong&gt;&lt;br&gt;
The detail of cool setup like a pro &lt;a href="https://dev.to/tomibudis/setup-repository-nextjs-app-like-a-pro-1lij"&gt;https://dev.to/tomibudis/setup-repository-nextjs-app-like-a-pro-1lij&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Publish NPM Registry&lt;/strong&gt;&lt;br&gt;
If you have a large organization that intends to utilize this boilerplate, it would be beneficial to publish it on a public or private registry. In my case, I have published it on the npm public scope. The advantage of doing so is that it allows for easy installation and communication with other teams.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.npmjs.com/creating-and-publishing-scoped-public-packages"&gt;https://docs.npmjs.com/creating-and-publishing-scoped-public-packages&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;in my case I just add on my script&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;script: {
    "publish": "npm public --access public"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Script to install own boilerplate with CLI&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;here the cool thing we can install our boilerplate in our terminal directly using bin script&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { execSync } = require("child_process");

const runCommand = (command) =&amp;gt; {
  try {
    execSync(`${command}`, { stdio: "inherit" });
  } catch (err) {
    console.error(err);
    return false;
  }
  return true;
};

const repoName = process.argv[2];
const gitCheckoutCommand = `git clone https://github.com/tomibudis/codelabs-next-pwa.git ${repoName}`;
const installDepsCommand = `cd ${repoName} &amp;amp;&amp;amp; npm install`;

console.log(`Init project ${repoName}`);
const checkedOut = runCommand(gitCheckoutCommand);
if (!checkedOut) process.exit(-1);

console.log("Installing dependencies...");
const installDeps = runCommand(installDepsCommand);
if (!installDeps) process.exit(-1);

console.log(
  "Init project successfully! follow the following command script to start."
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's put this file in the &lt;code&gt;bin&lt;/code&gt; directory and name it &lt;code&gt;cli.js&lt;/code&gt;. You can customize this script to execute any command you want. Then, you can run the following command to install your boilerplate:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npx tomibudis/codelabs-next-pwa testing-clone-repo&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Documentation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In order to make the boilerplate easy to maintain in the future, it is important to put proper documentation in place. This documentation should explain each section of the boilerplate, including the prerequisites, how to install it, and how to run it locally.&lt;/p&gt;

&lt;p&gt;The documentation should be clear and concise, and it should be written in a way that is easy to understand. It should also be up-to-date, so that it reflects the latest changes to the boilerplate.&lt;/p&gt;

&lt;p&gt;By putting proper documentation in place, you can make it easier for yourself and others to maintain the boilerplate in the future.&lt;/p&gt;

&lt;p&gt;Here are some specific things that you should include in the documentation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The prerequisites for installing and running the boilerplate.&lt;/li&gt;
&lt;li&gt;The steps involved in installing and running the boilerplate.&lt;/li&gt;
&lt;li&gt;A description of each section of the boilerplate.&lt;/li&gt;
&lt;li&gt;Any troubleshooting tips that you have found to be helpful.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;the result of my exploration as linked bellow, please feel free to suggest other things that would make the boilerplate better. Thank you!&lt;/p&gt;

&lt;p&gt;github: &lt;a href="https://github.com/tomibudis/codelabs-next-pwa"&gt;https://github.com/tomibudis/codelabs-next-pwa&lt;/a&gt;&lt;br&gt;
npm: &lt;a href="https://www.npmjs.com/package/codelabs-next-pwa"&gt;https://www.npmjs.com/package/codelabs-next-pwa&lt;/a&gt;&lt;br&gt;
preview: &lt;a href="https://codelabs-next-pwa.hellotoms.com"&gt;https://codelabs-next-pwa.hellotoms.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>react</category>
      <category>webdev</category>
      <category>nextjs</category>
    </item>
    <item>
      <title>Setup repository nextjs app like a pro 😎</title>
      <dc:creator>Tomi budi</dc:creator>
      <pubDate>Fri, 03 Feb 2023 14:55:18 +0000</pubDate>
      <link>https://forem.com/tomibudis/setup-repository-nextjs-app-like-a-pro-1lij</link>
      <guid>https://forem.com/tomibudis/setup-repository-nextjs-app-like-a-pro-1lij</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;I'd like to share my experience setting up a repository using Next.js, as it is a technology that is widely used in the tech industry. The purpose of this setup is to make our codebase more clean and maintainable. I don't want to waste your time by making you read this post, as I believe it will be a valuable addition to your development toolkit.&lt;/p&gt;

&lt;p&gt;let’s get started…&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Prerequisite&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pnpm (package manager)
nodejs ^18.13.0
vscode (latest version)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;since from node.js v17+ there is additional setup on your machine don’t forget to set env&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NODE_OPTIONS=--openssl-legacy-provider
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Linux → &lt;a href="https://stackoverflow.com/questions/234742/setting-environment-variables-in-linux-using-bash" rel="noopener noreferrer"&gt;https://stackoverflow.com/questions/234742/setting-environment-variables-in-linux-using-bash&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Windows → &lt;a href="https://stackoverflow.com/questions/32463212/how-to-set-environment-variables-from-windows" rel="noopener noreferrer"&gt;https://stackoverflow.com/questions/32463212/how-to-set-environment-variables-from-windows&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;MacOS → &lt;a href="https://apple.stackexchange.com/questions/106778/how-do-i-set-environment-variables-on-os-x" rel="noopener noreferrer"&gt;https://apple.stackexchange.com/questions/106778/how-do-i-set-environment-variables-on-os-x&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First and foremost, let's install some extensions for Visual Studio Code, such as ESLint and Prettier. Once that is done, we can move on to the next section.&lt;/p&gt;

&lt;p&gt;Step 1&lt;/p&gt;

&lt;p&gt;install dependencies that needed&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpm &lt;span class="nb"&gt;install &lt;/span&gt;eslint eslint-config-next eslint-config-prettier eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-standard eslint-plugin-testing-library @typescript-eslint/eslint-plugin @typescript-eslint/parser &lt;span class="nt"&gt;-D&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;create a file &lt;code&gt;.eslintrc.json&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="s2"&gt;"plugins"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"@typescript-eslint"&lt;/span&gt;, &lt;span class="s2"&gt;"testing-library"&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;,
  &lt;span class="s2"&gt;"extends"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
    &lt;span class="s2"&gt;"next/core-web-vitals"&lt;/span&gt;,
    &lt;span class="s2"&gt;"plugin:@typescript-eslint/recommended"&lt;/span&gt;,
    &lt;span class="s2"&gt;"plugin:prettier/recommended"&lt;/span&gt;,
    &lt;span class="s2"&gt;"plugin:react/recommended"&lt;/span&gt;,
    &lt;span class="s2"&gt;"plugin:react-hooks/recommended"&lt;/span&gt;
  &lt;span class="o"&gt;]&lt;/span&gt;,
  // this is additional rules to block when has unnecessary variable
  &lt;span class="s2"&gt;"rules"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"@typescript-eslint/no-unused-vars"&lt;/span&gt;: &lt;span class="s2"&gt;"error"&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;ensure the file is loaded correctly. open output tab on vscode&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/Setup%2520repository%2520nextjs%2520app%2520like%2520a%2520pro%2520%25F0%259F%2598%258E%252022ddc9cdb752448aa18121de990bc1ab%2FScreen_Shot_2023-01-24_at_18.14.20.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/Setup%2520repository%2520nextjs%2520app%2520like%2520a%2520pro%2520%25F0%259F%2598%258E%252022ddc9cdb752448aa18121de990bc1ab%2FScreen_Shot_2023-01-24_at_18.14.20.png" alt="Screen Shot 2023-01-24 at 18.14.20.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 2&lt;/p&gt;

&lt;p&gt;create a file &lt;code&gt;.prettier.config.js&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;module.exports &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  tabWidth: 2,
  trailingComma: &lt;span class="s2"&gt;"es5"&lt;/span&gt;,
  singleQuote: &lt;span class="nb"&gt;false&lt;/span&gt;,
  endOfLine: &lt;span class="s2"&gt;"auto"&lt;/span&gt;,
  plugins: &lt;span class="o"&gt;[&lt;/span&gt;require&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"@trivago/prettier-plugin-sort-imports"&lt;/span&gt;&lt;span class="o"&gt;)]&lt;/span&gt;,
    // you can customize the import order like you want
  importOrder: &lt;span class="o"&gt;[&lt;/span&gt;
    &lt;span class="s2"&gt;"&amp;lt;THIRD_PARTY_MODULES&amp;gt;"&lt;/span&gt;,
    &lt;span class="s2"&gt;"^~/utils(.*)$"&lt;/span&gt;,
    &lt;span class="s2"&gt;"^~/hooks(.*)$"&lt;/span&gt;,
    &lt;span class="s2"&gt;"^~/components(.*)$"&lt;/span&gt;,
    &lt;span class="s2"&gt;"^~/constants(.*)$"&lt;/span&gt;,
    &lt;span class="s2"&gt;"^[./]"&lt;/span&gt;,
  &lt;span class="o"&gt;]&lt;/span&gt;,
  importOrderSeparation: &lt;span class="nb"&gt;true&lt;/span&gt;,
  importOrderSortSpecifiers: &lt;span class="nb"&gt;true&lt;/span&gt;,
&lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and again let’s make sure the prettier config is correct. back to output tab&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/Setup%2520repository%2520nextjs%2520app%2520like%2520a%2520pro%2520%25F0%259F%2598%258E%252022ddc9cdb752448aa18121de990bc1ab%2FScreen_Shot_2023-01-24_at_18.56.46.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/Setup%2520repository%2520nextjs%2520app%2520like%2520a%2520pro%2520%25F0%259F%2598%258E%252022ddc9cdb752448aa18121de990bc1ab%2FScreen_Shot_2023-01-24_at_18.56.46.png" alt="Screen Shot 2023-01-24 at 18.56.46.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Setting up pre-commit and conventional commit with commitlint is a good way to ensure code quality and consistency.&lt;/p&gt;

&lt;p&gt;Pre-commit is a way to call a function before committing code changes to a git repository. This can be useful for running custom code tasks or enforcing standards by automating other scripts to run those tasks. One tool that can help with this is Husky, which allows developers to add git hooks that will automatically run specified tasks before committing code. This can help to ensure that code is well-formatted, free of errors, and adheres to established conventions.&lt;/p&gt;

&lt;p&gt;install dependencies&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpm &lt;span class="nb"&gt;install &lt;/span&gt;husky @commitlint/&lt;span class="o"&gt;{&lt;/span&gt;cli,config-conventionalig&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="nt"&gt;-D&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;activate hooks&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpx husky &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;add hooks&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;// pre-commit
pnpx husky add .husky/pre-commit &lt;span class="sb"&gt;`&lt;/span&gt;pnpx lint-staged&lt;span class="sb"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

// commit message
pnpx husky add .husky/commit-msg &lt;span class="sb"&gt;`&lt;/span&gt;pnpx &lt;span class="nt"&gt;--no&lt;/span&gt; &lt;span class="nt"&gt;--&lt;/span&gt; commitlint &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nt"&gt;-edit&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;1&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then create a file .lintstagerc.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;**/*.ts?(x)&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;filenames&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
    &lt;span class="s2"&gt;`next lint --fix --file &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;filenames&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cwd&lt;/span&gt;&lt;span class="p"&gt;())[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; --file &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,,&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;ensure the setup are correct.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fshkxyy3ut67i1gynli3r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fshkxyy3ut67i1gynli3r.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;above is image when git hooks called&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Far49nl0kco3eqbqs36jw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Far49nl0kco3eqbqs36jw.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ensure all stages are success like screenshot above&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Conclusion&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Feel free to give an input or feedback on my code&lt;/p&gt;

&lt;p&gt;the detail repository you can take a look over here &lt;a href="https://github.com/toms-studio/codelabs-next-web" rel="noopener noreferrer"&gt;https://github.com/toms-studio/codelabs-next-web&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>react</category>
    </item>
  </channel>
</rss>
