<?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: amiceli</title>
    <description>The latest articles on DEV Community by amiceli (@amiceli).</description>
    <link>https://dev.to/amiceli</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%2F334456%2F95e948b5-bb0b-4093-a76f-339c26224dd6.png</url>
      <title>DEV Community: amiceli</title>
      <link>https://dev.to/amiceli</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/amiceli"/>
    <language>en</language>
    <item>
      <title>Preums, reminds me that coding without AI is magical</title>
      <dc:creator>amiceli</dc:creator>
      <pubDate>Wed, 21 Jan 2026 09:11:50 +0000</pubDate>
      <link>https://dev.to/amiceli/preums-reminds-me-that-coding-without-ai-is-magical-443a</link>
      <guid>https://dev.to/amiceli/preums-reminds-me-that-coding-without-ai-is-magical-443a</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Preums&lt;/strong&gt; ("first" in french 🇫🇷) is a side project built with Laravel, Vue with Inertia ❤️ who reminds us that we can code without AI. And being a developer isn't just about checking what AI has laid.&lt;/p&gt;

&lt;p&gt;Go on &lt;a href="//preums.miceli.click"&gt;Preums&lt;/a&gt; and see the history of the projects and programming languages that have built our tech world.&lt;/p&gt;

&lt;h2&gt;
  
  
  Preums history
&lt;/h2&gt;

&lt;p&gt;The Preums project was born when one developer explained that he uses AI to generate unit tests and Gherkin after development. Another always uses AI whenever he has a bug or a question.&lt;/p&gt;

&lt;p&gt;That alone breaks the basic rule of TDD. And there are great tools like &lt;a href="https://duckduckgo.com/" rel="noopener noreferrer"&gt;DuckDuckGo&lt;/a&gt;, &lt;a href="https://search.brave.com/" rel="noopener noreferrer"&gt;Brave Search&lt;/a&gt; and &lt;a href="https://stackoverflow.com/" rel="noopener noreferrer"&gt;StackOverflow&lt;/a&gt; to help us with our needs.&lt;/p&gt;

&lt;p&gt;Apart from being lazy, I don't see the interest. It breaks the flow of research, ideas, creation, etc.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prolang and Github API
&lt;/h3&gt;

&lt;p&gt;Thanks to &lt;strong&gt;Brave Search&lt;/strong&gt; I found &lt;a href="https://github.com/osscameroon/prolang-api" rel="noopener noreferrer"&gt;prolang&lt;/a&gt; repository and API. &lt;/p&gt;

&lt;p&gt;I was looking for an API that lists a large number of programming languages, then I linked it to the GitHub API to get a code example via the &lt;a href="https://github.com/acmeism/RosettaCodeData" rel="noopener noreferrer"&gt;RosettaCodeData&lt;/a&gt;  for &lt;a href="https://github.com/acmeism/RosettaCodeData/blob/main/Task/Fibonacci-sequence/Perl/fibonacci-sequence-1.pl" rel="noopener noreferrer"&gt;Fibonacci&lt;/a&gt; sample code or &lt;a href="https://github.com/arjuncvinod/Hello-World-in-Different-Languages" rel="noopener noreferrer"&gt;Hello-World-in-Different-Languages&lt;/a&gt; repository for each language.&lt;/p&gt;

&lt;p&gt;If I had used AI, I would have wasted time searching for languages that weren't on the list and digging through Wikipedia.&lt;/p&gt;

&lt;p&gt;Without that, I wouldn't have stumbled upon the Rocq language. I think this code example is as beautiful as a work of art ^^.&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%2Fpcwvxnqwek8izsydqmas.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%2Fpcwvxnqwek8izsydqmas.png" alt=" " width="552" height="616"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Features
&lt;/h3&gt;

&lt;p&gt;In Preums, the goal is to highlight repositories that have been around for several years, are maintained, and are “starred” like oh-my-zsh, vue, boostrap, and Inertia.&lt;/p&gt;

&lt;p&gt;Preums offers the following features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The oldest and most starred repositories&lt;/li&gt;
&lt;li&gt;View a history of repositories: first/last commit, releases, etc.&lt;/li&gt;
&lt;li&gt;Search for a repository by name or author&lt;/li&gt;
&lt;li&gt;History of languages and graph for their “families”&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Nest
&lt;/h3&gt;

&lt;p&gt;I'm continuing to work on Preums for fun and to improve performance. Memcached and Redis are on the road 😉.&lt;br&gt;
Using the Wikipedia API to find languages and missing data for the history and family sections.&lt;/p&gt;

&lt;p&gt;And of course, all of this without AI, “the old-fashioned way” as I learned my job: searching, finding, creating, redoing, improving. And above all, &lt;a href="https://github.com/amiceli/preums" rel="noopener noreferrer"&gt;open source&lt;/a&gt; 🧑🏻‍💻.&lt;/p&gt;

&lt;p&gt;Finally, if you have any ideas for features, don't hesitate to let me know or open an issue.&lt;/p&gt;

&lt;p&gt;But as for AI, there's no need to give a long speech. I'm still a developer who codes the old-fashioned way.&lt;/p&gt;

</description>
      <category>sideprojects</category>
      <category>laravel</category>
      <category>inertia</category>
      <category>noai</category>
    </item>
    <item>
      <title>PapierJS - PaperCSS with stencil and storybook</title>
      <dc:creator>amiceli</dc:creator>
      <pubDate>Sun, 23 Feb 2025 14:06:55 +0000</pubDate>
      <link>https://dev.to/amiceli/papierjs-papercss-with-stencil-and-storybook-2cgd</link>
      <guid>https://dev.to/amiceli/papierjs-papercss-with-stencil-and-storybook-2cgd</guid>
      <description>&lt;p&gt;Every time I start a side project, I search for which CSS framework I will use.&lt;br&gt;&lt;br&gt;
But Bootstrap, Tailwind, Foundation, etc., are not my thing, so I ended up using &lt;a href="https://www.getpapercss.com/" rel="noopener noreferrer"&gt;PaperCSS&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;PaperCSS provides nice styles for many elements: forms, cards, navbars, buttons, etc.&lt;/p&gt;

&lt;p&gt;But using a &lt;code&gt;checkbox&lt;/code&gt; to open a dialog is a bit old-school ^^:&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;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"row flex-spaces child-borders"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"paper-btn margin"&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"modal-1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Open Modal!&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"modal-state"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"modal-1"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"checkbox"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"modal"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"modal-bg"&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"modal-1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"modal-body"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"btn-close"&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"modal-1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;X&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h4&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"modal-title"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Modal Title&lt;span class="nt"&gt;&amp;lt;/h4&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h5&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"modal-subtitle"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Modal Subtitle&lt;span class="nt"&gt;&amp;lt;/h5&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"modal-text"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;This is an example of a modal implemented with pure CSS! :D&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"modal-1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Nice!&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's why the &lt;a href="https://github.com/amiceli/papierjs" rel="noopener noreferrer"&gt;PapierJS&lt;/a&gt; project was born.&lt;/p&gt;

&lt;p&gt;PapierJS &lt;em&gt;(papier means paper in French)&lt;/em&gt; is a web component library built with Stencil and Storybook.&lt;/p&gt;

&lt;p&gt;The goal is to provide PaperCSS with web components easily:&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;p-tabs&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p-tab&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"Assassin's Creed Unity"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="c"&gt;&amp;lt;!-- content --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/p-tab&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p-tab&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"Assassin's Creed Mirage"&lt;/span&gt; &lt;span class="na"&gt;selected&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="c"&gt;&amp;lt;!-- content --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/p-tab&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p-tab&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"Assassin's Creed II"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="c"&gt;&amp;lt;!-- content --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/p-tab&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/p-tabs&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;PapierJS will also provide new components like dropdowns, &lt;a href="https://papier.miceli.click/?path=/docs/components-accordion-overview--docs" rel="noopener noreferrer"&gt;accordion&lt;/a&gt;, &lt;a href="https://papier.miceli.click/?path=/docs/components-notification-overview--docs" rel="noopener noreferrer"&gt;notification&lt;/a&gt;, etc, still using PaperCSS styles.&lt;/p&gt;

&lt;h2&gt;
  
  
  Framework
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Stencil
&lt;/h3&gt;

&lt;p&gt;I use Stencil to create components with &lt;code&gt;shadowRoot&lt;/code&gt;. It allows me to use PaperCSS without applying styles globally to the website.&lt;/p&gt;

&lt;p&gt;I really like Stencil; it’s very helpful for creating components and managing state, props, events, etc.&lt;/p&gt;

&lt;h3&gt;
  
  
  Storybook
&lt;/h3&gt;

&lt;p&gt;For providing component specs, playground, and overview, Storybook is awesome!&lt;/p&gt;

&lt;p&gt;It’s a good practice for me to provide this for components.&lt;/p&gt;

&lt;h4&gt;
  
  
  Specs
&lt;/h4&gt;

&lt;p&gt;For specs, I use &lt;code&gt;mdx&lt;/code&gt;, which includes &lt;code&gt;readme.md&lt;/code&gt; files generated by Stencil. Examples with the &lt;a href="https://papier.miceli.click/?path=/docs/components-modals-specs--docs" rel="noopener noreferrer"&gt;p-modal&lt;/a&gt; component. This way, we can read about events, methods, props, etc.&lt;/p&gt;

&lt;h4&gt;
  
  
  Overview
&lt;/h4&gt;

&lt;p&gt;The Overview section provides a component demo and shows the &lt;code&gt;html&lt;/code&gt; code to use it. Example with the &lt;a href="https://papier.miceli.click/?path=/docs/components-accordion-overview--docs" rel="noopener noreferrer"&gt;p-accordion&lt;/a&gt; component.&lt;/p&gt;

&lt;p&gt;For some stories, I created &lt;em&gt;preview&lt;/em&gt; Stencil components. I provide a demo and show the &lt;code&gt;tsx&lt;/code&gt; code. Another example with the &lt;a href="https://papier.miceli.click/?path=/docs/components-modals-overview--docs" rel="noopener noreferrer"&gt;p-modal&lt;/a&gt; component.&lt;/p&gt;

&lt;h4&gt;
  
  
  Playground
&lt;/h4&gt;

&lt;p&gt;Playground is similar to the overview, but with Storybook's &lt;code&gt;args&lt;/code&gt; features, you can test prop use cases. Examples with the &lt;a href="https://papier.miceli.click/?path=/story/components-buttons-playground--playground" rel="noopener noreferrer"&gt;p-button&lt;/a&gt; component.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next
&lt;/h2&gt;

&lt;p&gt;Currently, there are still a few PaperCSS components to include, such as card and navbar.&lt;/p&gt;

&lt;p&gt;I will also include new components like autocomplete, spinner, password fields, etc.&lt;/p&gt;

&lt;p&gt;You can see all available component here : &lt;a href="https://papier.miceli.click/" rel="noopener noreferrer"&gt;PapierJS&lt;/a&gt; and code on &lt;a href="https://github.com/amiceli/papierjs" rel="noopener noreferrer"&gt;github&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>stencil</category>
      <category>storybook</category>
      <category>papercss</category>
    </item>
    <item>
      <title>I switch from Eslint to Biome</title>
      <dc:creator>amiceli</dc:creator>
      <pubDate>Mon, 22 Apr 2024 20:57:33 +0000</pubDate>
      <link>https://dev.to/amiceli/i-switch-from-eslint-to-biome-3bem</link>
      <guid>https://dev.to/amiceli/i-switch-from-eslint-to-biome-3bem</guid>
      <description>&lt;p&gt;For several years I use &lt;code&gt;Eslint&lt;/code&gt; in my side projects, for Vue, JS, TS, Astro etc.&lt;/p&gt;

&lt;p&gt;I created npm packages with my favorite rules for TS, Vue, astro, etc like : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;space after function &lt;code&gt;public test () { }&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;space before / after equal &lt;code&gt;const test = true&lt;/code&gt; or &lt;code&gt;{ test : true }&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;4 spaces indent&lt;/li&gt;
&lt;li&gt;indent in Vue &lt;code&gt;script tag&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;backtick for string&lt;/li&gt;
&lt;li&gt;etc&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I also added &lt;code&gt;husky&lt;/code&gt; and &lt;code&gt;lint-staged&lt;/code&gt; to lint code before commit.&lt;/p&gt;

&lt;p&gt;But... ^^&lt;/p&gt;

&lt;p&gt;Each time to install, configure or update Eslint packages, it was annoying for me.&lt;/p&gt;

&lt;p&gt;It was a challenge on each Github DepsBot PT for it ^^.&lt;/p&gt;

&lt;p&gt;So last week I started to switch to &lt;a href="https://biomejs.dev/"&gt;Biome&lt;/a&gt;. I started with one project, today I switched almost all my side projects.&lt;/p&gt;

&lt;p&gt;Reading Biome doc I also switched from &lt;a href="https://typicode.github.io/husky/"&gt;husky&lt;/a&gt; to &lt;a href="https://github.com/evilmartians/lefthook"&gt;lefthook&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pro
&lt;/h2&gt;

&lt;p&gt;First thing I like, switching to Biome, I removed almost 10 npm packages : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;eslint&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@vue/eslint-config-typescript&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@typescript-eslint/eslint-plugin&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@vue/eslint-config-typescript&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;my own eslint rules packages&lt;/li&gt;
&lt;li&gt;etc&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;lint-staged&lt;/code&gt; was removed, &lt;code&gt;lefthook&lt;/code&gt; doesn't need it to lint staged files.&lt;/p&gt;

&lt;p&gt;My lefthhok config :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pre-commit:
  commands:
    check:
      glob: "*.{js,vue,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
      run: npx biome check --no-errors-on-unmatched --files-ignore-unknown=true {staged_files}

commit-msg:
  commands:
    lint-commit-msg:
      run: npx commitlint --edit

pre-push:
  commands:
    test:
      run: npm run test:cov
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Biome is really easy to install and fast : &lt;code&gt;Checked 442 files in 94ms.&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Biome config file looks like this :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "$schema": "https://biomejs.dev/schemas/1.7.0/schema.json",
    "organizeImports": {
        "enabled": true
    },
    "files": {
        "ignore": ["package.json", "package-lock.json"]
    },
    "linter": {
        "enabled": true,
        "rules": {
            "recommended": true,
            "style": {
                "noUnusedTemplateLiteral": "off"
            }
        }
    },
    "formatter": {
        "indentStyle": "space",
        "indentWidth": 4,
        "lineWidth": 320
    },
    "javascript": {
        "formatter": {
            "semicolons": "asNeeded"
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With Biome we can format, lint and check (format + lint) code. And a &lt;code&gt;migrate&lt;/code&gt; command allows to generate Biome config from our Eslint config.&lt;/p&gt;

&lt;p&gt;This is why I like Biome &amp;lt;3.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cons
&lt;/h2&gt;

&lt;p&gt;For me, the only con is ... I lost some of my favorite rules, like space after function name.&lt;/p&gt;

&lt;p&gt;But I stay on Biome &amp;lt;3.&lt;/p&gt;

&lt;h3&gt;
  
  
  Note
&lt;/h3&gt;

&lt;p&gt;Just, If you use NestJs take care about &lt;code&gt;lint/style/useImportType&lt;/code&gt; rule ;).&lt;/p&gt;

&lt;p&gt;First time I ran Biome on my Nest project, it formatted some code with import &lt;code&gt;type&lt;/code&gt; : &lt;/p&gt;

&lt;p&gt;Format &lt;code&gt;import { TagService } from "./tag.service"&lt;/code&gt; to &lt;code&gt;import type { TagService } from "./tag.service"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And I had an error : &lt;code&gt;Nest can't resolve dependencies of the TagController&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I added some comment to ignore this rule for some imports : &lt;code&gt;// biome-ignore lint/style/useImportType: &amp;lt;explanation&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  And now ?
&lt;/h2&gt;

&lt;p&gt;My side projects arn't big projects. Biome offers a way to &lt;a href="https://biomejs.dev/guides/big-projects/"&gt;migrate big project&lt;/a&gt;.&lt;br&gt;
We're speaking of that in my company but for now we keep Eslint.&lt;/p&gt;

&lt;p&gt;I'm following Biome project, I hope my favorite rules comming ;).&lt;/p&gt;

&lt;p&gt;And I can update my &lt;a href="https://dev.to/amiceli/my-script-to-install-husky-commitlint-and-lint-staged-with-zx-4hj5"&gt;zx script to install eslint&lt;/a&gt; to install Biome and Lefthook.&lt;/p&gt;

</description>
      <category>eslint</category>
      <category>biome</category>
    </item>
    <item>
      <title>Scenario Outline is coming in vitest-cucumber</title>
      <dc:creator>amiceli</dc:creator>
      <pubDate>Sat, 02 Dec 2023 20:38:34 +0000</pubDate>
      <link>https://dev.to/amiceli/scenario-outline-is-coming-in-vitest-cucumber-47o1</link>
      <guid>https://dev.to/amiceli/scenario-outline-is-coming-in-vitest-cucumber-47o1</guid>
      <description>&lt;p&gt;I'm still wording on my library vitest-cucumber. I presented it in this post : &lt;a href="https://dev.to/amiceli/use-gherkin-file-in-your-unit-tests-with-vitest-58gd"&gt;Use Gherkin file in your unit tests with vitest&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step by step I add logic from Gherkin language, I worked with &lt;code&gt;Scenario Outline&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Scenario Outline definition from Gherkin doc : &lt;em&gt;The Scenario Outline keyword can be used to run the same Scenario multiple times, with different combinations of values.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We take this &lt;code&gt;Scenario Outline&lt;/code&gt; as example :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Feature: Detect image ratio from width and height

    Scenario Outline: Detect image ratio when upload image
        Given As a user in an awesome project
        When  I upload an image &amp;lt;width&amp;gt;px on &amp;lt;height&amp;gt;px
        Then  I see my image &amp;lt;ratio&amp;gt;

        Examples:
            | width | height | ratio |
            | 100   | 100    | 1     |
            | 100   | 200    | 2     |
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With vitest-cucumber, now you can use it like this :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nf"&gt;describeFeature&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;feature&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;ScenarioOutline&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="nc"&gt;ScenarioOutline&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Detect image ratio when upload image`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;Given&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;When&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Then&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="nx"&gt;variables&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="nc"&gt;Given&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`As a user in an awesome project`&lt;/span&gt;&lt;span class="p"&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="p"&gt;{})&lt;/span&gt;
        &lt;span class="nc"&gt;When&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;` I upload an image &amp;lt;width&amp;gt;px on &amp;lt;height&amp;gt;px`&lt;/span&gt;&lt;span class="p"&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="p"&gt;{&lt;/span&gt;
            &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;variables&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]).&lt;/span&gt;&lt;span class="nf"&gt;toEqual&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;variables&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]).&lt;/span&gt;&lt;span class="nf"&gt;toEqual&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;variables&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ratio&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]).&lt;/span&gt;&lt;span class="nf"&gt;toEqual&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;})&lt;/span&gt;
        &lt;span class="nc"&gt;Then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`I see my image &amp;lt;ratio&amp;gt;`&lt;/span&gt;&lt;span class="p"&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="p"&gt;{&lt;/span&gt;
            &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;variables&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ratio&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="nf"&gt;toEqual&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="nx"&gt;variables&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;height&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="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;variables&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;width&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="p"&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;Variables is an array with values extracted from &lt;code&gt;Examples:&lt;/code&gt; :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"width"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"100"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"100"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"height"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"100"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"200"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"ratio"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But before publish a new version of vitest-cucumber I need your opinions ;)&lt;/p&gt;

&lt;p&gt;For &lt;code&gt;Scenario Outline&lt;/code&gt; I don't know what is best solution.&lt;/p&gt;

&lt;h3&gt;
  
  
  1) run scenario one time with variable values as arguments
&lt;/h3&gt;

&lt;p&gt;Like my example, scenario is run one time and variable values is passed as arguments.&lt;br&gt;
So inside &lt;code&gt;ScenarioOutline&lt;/code&gt; callback we can use variables as an &lt;code&gt;array&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  2) run scenario &lt;em&gt;x&lt;/em&gt; times for &lt;em&gt;x&lt;/em&gt; variable values
&lt;/h3&gt;

&lt;p&gt;In &lt;code&gt;Examples&lt;/code&gt; we have two lines, so scenario is run two times. First run with 100, 100 and 1 values and second time with 100, 200 and 2 etc if we have more values.&lt;/p&gt;
&lt;h3&gt;
  
  
  3) run scenario one time with random value
&lt;/h3&gt;

&lt;p&gt;Scenario is run one time but we don't know which values. With 100, 100 and 1 or 100, 200 and 2.&lt;/p&gt;

&lt;p&gt;Let me know the solution that you prefer ;). After I will update vitest-cucumber and publish a new stable version 🍾🍾&lt;/p&gt;


&lt;h2&gt;
  
  
  Update 10 / 12 / 23
&lt;/h2&gt;

&lt;p&gt;I publish a new vitest-cucumber version &lt;a href="https://github.com/amiceli/vitest-cucumber/releases/tag/v1.1.0"&gt;1.1.0&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now &lt;code&gt;ScenarioOutline&lt;/code&gt; and &lt;code&gt;Examples&lt;/code&gt; is included in my project.&lt;/p&gt;

&lt;p&gt;Reading Gherkin docs I choose to run &lt;code&gt;ScenarioOutline&lt;/code&gt; callback X times for X variables.&lt;/p&gt;

&lt;p&gt;With the same &lt;code&gt;Examples&lt;/code&gt; example, in &lt;code&gt;ScenarioOutline&lt;/code&gt; callback, variables are :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"width"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;second&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;test&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"height"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;second&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;test&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"ratio"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;second&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;test&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I hope you will like it ;).&lt;/p&gt;

</description>
      <category>vitest</category>
      <category>gherkin</category>
      <category>typescript</category>
    </item>
    <item>
      <title>My script to install husky, commitlint and lint-staged with zx</title>
      <dc:creator>amiceli</dc:creator>
      <pubDate>Sat, 18 Nov 2023 23:31:51 +0000</pubDate>
      <link>https://dev.to/amiceli/my-script-to-install-husky-commitlint-and-lint-staged-with-zx-4hj5</link>
      <guid>https://dev.to/amiceli/my-script-to-install-husky-commitlint-and-lint-staged-with-zx-4hj5</guid>
      <description>&lt;p&gt;Hello friends,&lt;/p&gt;

&lt;p&gt;In all my projects I use &lt;a href="https://github.com/typicode/husky"&gt;husky&lt;/a&gt;, &lt;a href="https://www.npmjs.com/package/lint-staged"&gt;lint-staged&lt;/a&gt; and &lt;a href="https://commitlint.js.org/#/"&gt;commitlint&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Husky
&lt;/h2&gt;

&lt;p&gt;I love husky ! It helps to create Git hook. I use it for : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;run eslint with lint-staged before commit&lt;/li&gt;
&lt;li&gt;commitlint to follow &lt;a href="https://www.conventionalcommits.org/en/v1.0.0/"&gt;conventionnal commits&lt;/a&gt; rules&lt;/li&gt;
&lt;li&gt;run unit tests before push&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  lint-staged
&lt;/h2&gt;

&lt;p&gt;lint-staged is useful to run eslint against staged git files.&lt;br&gt;
I love it, with lint-staged your commits contain nice files ;). It's better than one commit called &lt;code&gt;lint all files&lt;/code&gt; after all commits ^^.&lt;/p&gt;

&lt;h2&gt;
  
  
  commitlint
&lt;/h2&gt;

&lt;p&gt;commitlint checks if your commit messages meet the &lt;a href="https://www.conventionalcommits.org/en/v1.0.0/"&gt;conventionnal commit&lt;/a&gt; format.&lt;br&gt;
I discovered conventionnal commit in my company and know I use it in any projects ;).&lt;/p&gt;

&lt;p&gt;It's especially useful when we are many developers in a project. It's better than commit like &lt;code&gt;job done&lt;/code&gt;, &lt;code&gt;fix something&lt;/code&gt; etc ^^.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;To install everything on my projects I create a zx script in my &lt;a href="https://github.com/amiceli/zx-scripts"&gt;zx-scripts&lt;/a&gt; repository.&lt;/p&gt;

&lt;p&gt;If you want test it, you can run this script with&lt;a href="https://github.com/google/zx"&gt;zx&lt;/a&gt; : &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;zx https://raw.githubusercontent.com/amiceli/zx-scripts/main/index.mjs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If you don't have zx, you can install it with npm : &lt;code&gt;npm i -g zx&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I'm still wording on it to add some args and eslint install.&lt;/p&gt;

&lt;p&gt;Ciao friends !&lt;/p&gt;

</description>
      <category>husky</category>
      <category>eslint</category>
      <category>zx</category>
      <category>git</category>
    </item>
    <item>
      <title>Use Gherkin file in your unit tests with vitest</title>
      <dc:creator>amiceli</dc:creator>
      <pubDate>Fri, 04 Aug 2023 22:57:52 +0000</pubDate>
      <link>https://dev.to/amiceli/use-gherkin-file-in-your-unit-tests-with-vitest-58gd</link>
      <guid>https://dev.to/amiceli/use-gherkin-file-in-your-unit-tests-with-vitest-58gd</guid>
      <description>&lt;p&gt;Hi everybody, this is my first post, I hope you will like it ;)&lt;/p&gt;

&lt;p&gt;In my company we are migrating some projects from jest to vitest. Everything is ok except one thing : the use our Gherkin feature file in our unit tests.&lt;/p&gt;

&lt;p&gt;To be simple we use &lt;a href="https://cucumber.io/docs/gherkin/reference/"&gt;Gherkin&lt;/a&gt; to describe what we vill do : new feature, fix a bug, improvement etc&lt;/p&gt;

&lt;p&gt;For example, I take it on Gherkin website :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Feature: Guess the word
    Scenario: Breaker joins a game
        Given the Maker has started a game with the word "silky"
        When  the Breaker joins the Maker's game
        Then  the Breaker must guess a word with 5 character
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When we use jest, we use &lt;a href="https://github.com/bencompton/jest-cucumber"&gt;jest-cucumber&lt;/a&gt; but currenly we haven't an alternative for vitest.&lt;/p&gt;

&lt;p&gt;So this week I worked on a new project : &lt;a href="https://github.com/amiceli/vitest-cucumber"&gt;vitest-cucumber&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why ?
&lt;/h2&gt;

&lt;p&gt;Feature file are very important for us so when we run unit tests we want to know if we forgot a scenario or a scenario step or type wrong scenario title.&lt;/p&gt;

&lt;p&gt;A good advantage for us, if one day some code break a unit test like &lt;code&gt;it('should join a game')&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Error Scenario: Breaker joins a game &amp;gt; When failed&lt;/code&gt; is a better error message ;)&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;In &lt;a href="https://github.com/amiceli/vitest-cucumber"&gt;vitest-cucumber&lt;/a&gt;, I create a parser who reads feature file line by line and return a &lt;code&gt;Feature&lt;/code&gt; class.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Feature&lt;/code&gt; can contains multiple &lt;code&gt;Scenario&lt;/code&gt; and a &lt;code&gt;Scenario&lt;/code&gt; can contains multiple steps.&lt;/p&gt;

&lt;p&gt;And I create &lt;code&gt;describeFeature&lt;/code&gt; when to write unit test for a Feature, Scenario and steps.&lt;/p&gt;

&lt;h2&gt;
  
  
  An example
&lt;/h2&gt;

&lt;p&gt;An example of feature file :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Feature: Improve my unit tests
    Scenario: Use vitest-cucumber in my unit tests
        Given Developer using feature file
        And   Using vitest-cucumber
        When  I run my unit tests
        Then  I know if I forgot a scenario
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And an example of unit tests using vitest :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;loadFeature&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;describeFeature&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@miceli/vitest-cucumber&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;expect&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;vitest&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;feature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;loadFeature&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;path/to/my/file.feature&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;describeFeature&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;feature&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;Scenario&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="nc"&gt;Scenario&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Use vitest-cucumber in my unit tests&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;Given&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;When&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Then&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;And&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="nc"&gt;Given&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Developer using feature file&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="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c1"&gt;// ...&lt;/span&gt;
        &lt;span class="p"&gt;})&lt;/span&gt;
        &lt;span class="nc"&gt;And&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;using vitest-cucumber&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="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c1"&gt;// ...&lt;/span&gt;
        &lt;span class="p"&gt;})&lt;/span&gt;
        &lt;span class="nc"&gt;When&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;I run my unit tests&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="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c1"&gt;// ...&lt;/span&gt;
        &lt;span class="p"&gt;})&lt;/span&gt;
        &lt;span class="nc"&gt;Then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;I know if I forgot a scenario&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="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c1"&gt;// ...&lt;/span&gt;
        &lt;span class="p"&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;h3&gt;
  
  
  &lt;code&gt;describeFeature&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Run unit test for a Feature. This function uses &lt;code&gt;describe&lt;/code&gt; vitest function and provide &lt;code&gt;Scenario&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;describeFeature&lt;/code&gt; uses &lt;code&gt;afterAll&lt;/code&gt;, at the end it checks if you missed a scenario or typed a wrong scenario name.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;Scenario&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;This function also uses &lt;code&gt;describe&lt;/code&gt; but provide multiple function for scenario steps.&lt;/p&gt;

&lt;p&gt;It also uses &lt;code&gt;afterAll&lt;/code&gt; but checks if you forgot a step or write a wrong step name.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;When&lt;/code&gt;, &lt;code&gt;Then&lt;/code&gt; etc
&lt;/h3&gt;

&lt;p&gt;This function uses &lt;code&gt;test&lt;/code&gt; vitest function.&lt;br&gt;
So this is here to code our &lt;code&gt;expect&lt;/code&gt; etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  Now
&lt;/h2&gt;

&lt;p&gt;I opened an &lt;a href="https://github.com/vitest-dev/vitest/issues/3892"&gt;issue&lt;/a&gt; on Vitests, to know their opinion and share my project.&lt;/p&gt;

&lt;p&gt;I still work on it to improve error messages when unit tests failed and I hope for some feedback to improve this project.&lt;/p&gt;

&lt;p&gt;Currently I code scenarios and steps but Gherkin is very powerful : tags, value etc. I've lot of work and I like it ;)&lt;/p&gt;

&lt;p&gt;Thanks you, I hope you like this post.&lt;/p&gt;

</description>
      <category>vitest</category>
      <category>gherkin</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
