<?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>DEV Community: Dan Calderon</title>
    <description>The latest articles on DEV Community by Dan Calderon (@dancalderon).</description>
    <link>https://dev.to/dancalderon</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%2F138661%2Fdfd8264e-445e-426b-b53b-2b1055d9455f.png</url>
      <title>DEV Community: Dan Calderon</title>
      <link>https://dev.to/dancalderon</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dancalderon"/>
    <language>en</language>
    <item>
      <title>🚀 React 19 Cheat Sheet</title>
      <dc:creator>Dan Calderon</dc:creator>
      <pubDate>Mon, 09 Dec 2024 20:00:01 +0000</pubDate>
      <link>https://dev.to/dancalderon/react-19-cheat-sheet-2j8a</link>
      <guid>https://dev.to/dancalderon/react-19-cheat-sheet-2j8a</guid>
      <description>&lt;p&gt;After several months we finally have a stable version of React 19.&lt;/p&gt;

&lt;p&gt;This post is just a small cheat sheet for context, for more in-depth data and examples, please check&lt;br&gt;
&lt;a href="https://react.dev/blog/2024/12/05/react-19" rel="noopener noreferrer"&gt;react docs&lt;/a&gt;&lt;br&gt;
&lt;a href="https://vercel.com/blog/whats-new-in-react-19" rel="noopener noreferrer"&gt;vercel docs&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  ⚙️ Client and Server Markers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;&lt;code&gt;'use client'&lt;/code&gt;&lt;/strong&gt;: Marks client-side React code.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;&lt;code&gt;'use server'&lt;/code&gt;&lt;/strong&gt;: Marks server-side functions callable by the client.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;use server&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;fetchUserData&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="cm"&gt;/*...*/&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Keep in mind&lt;/strong&gt;: All components are &lt;code&gt;server components&lt;/code&gt; by default, and using 'use server' doesn't convert a component or enforce it to be a &lt;code&gt;server component&lt;/code&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  🔥 React Server Components
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it is&lt;/strong&gt;: Server-rendered components that execute at build time or per request.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Why?&lt;/strong&gt;: Makes server-side rendering (SSR) workflows faster and scalable, leading to better app performance.&lt;/p&gt;


&lt;h2&gt;
  
  
  ✨ Actions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it is&lt;/strong&gt;: Async functions to handle form submission, errors, and optimistic updates.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Why ?&lt;/strong&gt;: Simplifies handling complex form logic while creating smoother and more user-friendly experiences.&lt;/p&gt;

&lt;p&gt;You have 2 ways to create a server action&lt;/p&gt;

&lt;p&gt;Create them in a dedicated file where you call. the &lt;code&gt;use server&lt;/code&gt; and import it in the server component&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Frja4jqemf29nqjnwqly3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Frja4jqemf29nqjnwqly3.png" alt="server action" width="800" height="733"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create them directly at the server component&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fuw0up3l32mlr35zj8c3p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fuw0up3l32mlr35zj8c3p.png" alt="inline server component" width="800" height="1029"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  📋 Form Management Hooks
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;useFormStatus&lt;/strong&gt;: Tracks the status of a form for enhanced usability when JavaScript is disabled.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fs7qxsryvyw1zn1w2f4cq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fs7qxsryvyw1zn1w2f4cq.png" alt="useFormStatus code" width="800" height="536"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;useOptimistic&lt;/strong&gt;: Implements optimistic updates for a faster and more seamless user experience.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fbxtip6bwmyozs6tvi8se.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fbxtip6bwmyozs6tvi8se.png" alt="useOptimistic" width="800" height="845"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  🐛 Better Error Reporting
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it is&lt;/strong&gt;: Adds &lt;code&gt;onCaughtError&lt;/code&gt; and &lt;code&gt;onUncaughtError&lt;/code&gt; for root components.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Why ?&lt;/strong&gt;: Makes debugging easier with clear.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fmzxtyrhw1c2ip9btln76.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fmzxtyrhw1c2ip9btln76.png" alt="error example" width="800" height="801"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  🌟 New Hooks and Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;use&lt;/strong&gt;: Lets you read promises or other resources directly during render; can be called within loops, conditional statements, and early returns&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fpv9thimg6kg9t4ys3he1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fpv9thimg6kg9t4ys3he1.png" alt="sample" width="800" height="976"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;useDeferredValue&lt;/strong&gt; &lt;strong&gt;Initial Value&lt;/strong&gt;: Adds support for setting initial values.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fevncgl10uq51vd2xug0v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fevncgl10uq51vd2xug0v.png" alt="Image description" width="800" height="987"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  🛠️ Async Script Support
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it is&lt;/strong&gt;: Allows async scripts to be rendered anywhere in your component tree.&lt;br&gt;
&lt;strong&gt;Why ?&lt;/strong&gt;: Prevents duplicate scripts and speeds up loading.&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="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt; &lt;span class="na"&gt;async&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://example.com/script.js"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  💡 Improved Third-Party Script Compatibility
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it is&lt;/strong&gt;: Skip unexpected &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; tags during hydration.&lt;br&gt;
&lt;strong&gt;Why?&lt;/strong&gt;:  Fixes those mismatch errors when working with third-party scripts.&lt;/p&gt;


&lt;h2&gt;
  
  
  🎨 Stylesheets with Precedence
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it is&lt;/strong&gt;: Lets you control stylesheet loading order in concurrent rendering.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Why ?&lt;/strong&gt;: Ensures styles are applied as intended.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"default.css"&lt;/span&gt; &lt;span class="na"&gt;precedence=&lt;/span&gt;&lt;span class="s"&gt;"default"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"specific.css"&lt;/span&gt; &lt;span class="na"&gt;precedence=&lt;/span&gt;&lt;span class="s"&gt;"high"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🎯 Streamlined APIs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Streamlined Context API&lt;/strong&gt;: Use &lt;code&gt;&amp;lt;Context&amp;gt;&lt;/code&gt; directly instead of &lt;code&gt;&amp;lt;Context.Provider&amp;gt;&lt;/code&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;UserContext&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Jane Doe"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;UserContext&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Ref Callback Cleanup&lt;/strong&gt;: Ref callbacks now return cleanup functions.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;input&lt;/span&gt; &lt;span class="na"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&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;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Cleaning up 🧹&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  💡 Hydration Error Diffs
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it is&lt;/strong&gt;: Improve the difference hydratation errors making it easier to debug and actually fix them.&lt;/p&gt;

&lt;p&gt;React 19 introduces several new API and workflows that potentially coudl benefit your applications, but all of them are optionals, so don't feel the presure to rush into them and convert all your components, you can do it component by component and step by step.&lt;/p&gt;

&lt;p&gt;There are still a lot of things to improve and change, the &lt;a href="https://tkdodo.eu/blog/react-19-and-suspense-a-drama-in-3-acts" rel="noopener noreferrer"&gt;waterfall issues&lt;/a&gt; related to the server actions and the suspense is one of the more popular, but the list is big, so hopefully the react team will implement some changes and updates here.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>programming</category>
      <category>news</category>
    </item>
    <item>
      <title>By "Linter/Formatter" do you mean Eslint/Prettier?</title>
      <dc:creator>Dan Calderon</dc:creator>
      <pubDate>Mon, 13 May 2024 19:23:16 +0000</pubDate>
      <link>https://dev.to/dancalderon/by-linterformatter-do-you-mean-eslintprettier-2fhm</link>
      <guid>https://dev.to/dancalderon/by-linterformatter-do-you-mean-eslintprettier-2fhm</guid>
      <description>&lt;p&gt;When I met some of the devs who would work with me on a new project, I asked them some small questions to be aware of their preference, experiences, and backgrounds.&lt;/p&gt;

&lt;p&gt;They were mostly frontend developers with 2-4 years of experience, all of them worked with different stacks and had a good knowledge of the architecture and stack that I had in mind for the new project, but when I asked one of the more small and trivial questions, I got more questions than answers&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What formatter and linter do you prefer?&lt;br&gt;
By "Formatter and linter" do you mean Eslin/Prettier? 🤔&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This was a valid counter-question since most of us always install eslint/prettier no matter the project or product, and never stop to think about other options.&lt;/p&gt;

&lt;p&gt;This was a new project so I asked them if they wanted to try Biome as our new linter/formatter, and all of them agreed under the promise of "faster deploys" or an easy way back &lt;/p&gt;

&lt;h2&gt;
  
  
  Biome as an alternative to Eslint/Prettier
&lt;/h2&gt;

&lt;p&gt;Biome &lt;em&gt;-formerly known as Rome-&lt;/em&gt; is a library that intends to replace, or at least, compete with Eslint and Prettier, merging both functionalities in a single tool.&lt;/p&gt;

&lt;p&gt;It is a tool built in Rust that could lint and format Javascript, Typescript, and CSS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Biome pros&lt;/strong&gt;💪&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simpler configuration&lt;/li&gt;
&lt;li&gt;It can be run without project installation&lt;/li&gt;
&lt;li&gt;Faster to lint and faster to format the supported languages&lt;/li&gt;
&lt;li&gt;Easier way to share the configuration between teams&lt;/li&gt;
&lt;li&gt;Smaller packages&lt;/li&gt;
&lt;li&gt;A single tool to deliver the same functionality&lt;/li&gt;
&lt;li&gt;Migration from eslint/prettier to biome can be done with a simple script in a couple of minutes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Biome Cons&lt;/strong&gt;💔&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Not all the rules are supported or documented&lt;/li&gt;
&lt;li&gt;It is a new tool and has a smaller community&lt;/li&gt;
&lt;li&gt;It only supports a few languages at the moment, but the team is pushing to include more and they are working speedily.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And that's all, the cons seem pretty small when we compare them against the cons 🤩&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Configuration&lt;/strong&gt; 🔧&lt;/p&gt;

&lt;p&gt;We can configure Biome with or without previous eslint/prettier settings&lt;/p&gt;

&lt;p&gt;we just need to &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pnpm add --save-dev --save-exact @biomejs/biome
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;or we can even avoid the installation and use the Vscode extension.&lt;/p&gt;

&lt;p&gt;Biome will use the default configuration and rules for us.&lt;/p&gt;

&lt;p&gt;We can create a biome.json where we would store the configuration and rules&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//biome.json

{
  "linter": {
    "enabled": true,
    "rules": {
      "recommended": true
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;and that's all that Biome requires to run the configuration, it will detect the path in the root of our project and run the linter for us.&lt;/p&gt;

&lt;p&gt;But what if we already have some prettier/eslint configuration that we don't want to lose?&lt;/p&gt;

&lt;p&gt;Well, that would be as easy as running a simple migration script provided for the biome team and available to use if we already installed the tool in our system&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;biome migrate eslint --write
biome migrate prettier --write
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This script will read the prettier/eslint .json files and parse the rules into biome rules for us, even the rules from eslint pluggings that we are extending in the eslint.json configuration.&lt;/p&gt;

&lt;p&gt;once that script is finished, we are set and done, we now use biome in our project&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Run on save&lt;/strong&gt;💻&lt;/p&gt;

&lt;p&gt;If we are using vscode, we would just need to disable eslint/prettier extensions, be sure to install and enable biome extension, and then just go to the type of file that you want to enable biome, do ⇧⌘P search the "Format document with" &amp;gt; Configure default formatter &amp;gt; select biome&lt;/p&gt;

&lt;p&gt;This will set biome as our formatter for the type of file, allowing us to just use it where we want&lt;/p&gt;

&lt;p&gt;We can add to the vscode settings &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"editor.formatOnSave": true,
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;and we are ready to run biome for use on save, and you would probably notice the time difference immediately&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What about Github actions?&lt;/strong&gt;🚀&lt;/p&gt;

&lt;p&gt;Well, that is also covered in an easy way&lt;/p&gt;

&lt;p&gt;Just go to your .github/workflows directory and add the pull_request.yml &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name: Code quality

on:
  push:
  pull_request:

jobs:
  quality:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Setup Biome
        uses: biomejs/setup-biome@v2
        with:
          version: latest
      - name: Run Biome
        run: biome ci --config-path 'configuration path in the project' 'what files should format/lint'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In our case, we probably want something like this&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;biome ci --config-path './' './src/'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This would use the configuration in the root of our project and run biome in all the supported files inside the /src directory&lt;/p&gt;

&lt;p&gt;In our project, we tested the build in GitHub with eslint/prettier vs biome, and it went from 7 minutes to &lt;strong&gt;1/2 minutes&lt;/strong&gt;🤯🤯&lt;/p&gt;

&lt;p&gt;Maybe 5 minutes doesn't sound that much, but when you add them for every pull request and every update on those pull requests, it starts to sound a little higher.&lt;/p&gt;

&lt;p&gt;And when you think about the automation tool times -cypress in our case- and how much money we could save reducing the times of linting and formatting, those 5 minutes started to sound even better&lt;/p&gt;

&lt;p&gt;So, yeah, not only the team is using biome at the moment, but now we are all aware of what is a linter/formatter and why is it important to have alternatives in each aspect of our application build process as developers.&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>webdev</category>
      <category>tooling</category>
      <category>vscode</category>
    </item>
  </channel>
</rss>
