<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rémy van Dyk on Medium]]></title>
        <description><![CDATA[Stories by Rémy van Dyk on Medium]]></description>
        <link>https://medium.com/@remy.vandyk?source=rss-b379375c2c0c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*4jsj_jjno0pA-RY69K8LzA.png</url>
            <title>Stories by Rémy van Dyk on Medium</title>
            <link>https://medium.com/@remy.vandyk?source=rss-b379375c2c0c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 01:19:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@remy.vandyk/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Setup a Typescript project with ESLint, Prettier and VS Code]]></title>
            <link>https://medium.com/ovrsea/setup-a-typescript-project-with-eslint-prettier-and-vs-code-4ce4fcb76509?source=rss-b379375c2c0c------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ce4fcb76509</guid>
            <category><![CDATA[prettier]]></category>
            <category><![CDATA[eslint]]></category>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Rémy van Dyk]]></dc:creator>
            <pubDate>Wed, 25 May 2022 09:30:33 GMT</pubDate>
            <atom:updated>2022-05-25T09:30:33.413Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_pOg2U--5Mo8ul6C.jpg" /><figcaption>Life feels better when developing in the right environment right ? (<a href="https://sgarq.com/wp-content/uploads/2017/06/confort-scaled.jpg">Source</a>)</figcaption></figure><p>Typescript is nowadays one of the <a href="https://insights.stackoverflow.com/survey/2021#technology-most-loved-dreaded-and-wanted">most loved languages</a> out there thanks to the power and robustness of its typing system.</p><p>Setting an appropriate environment to develop in Typescript is crucial to benefit most of all the features it has to offer.</p><p>In this article, I will show you how to setup a clean and simple development environment based on:</p><ul><li><a href="https://code.visualstudio.com/">VS Code</a>: a powerful editor that you can turn into an IDE to your liking.</li><li><a href="https://eslint.org/">ESLint</a>: a customizable linter to check your code for problems and bad practice.</li><li><a href="https://prettier.io/">Prettier</a>: a customizable code formatter to ensure you and your team follow the same code styling guidelines.</li><li><a href="https://yarnpkg.com/">Yarn</a>: a package manager, preferable to the default npm as it is way faster.</li></ul><h3>TL;DR</h3><p>You can find the final project setup in this <a href="https://github.com/Myreage/typescript-starter">GitHub repository</a> and clone it:</p><pre>git clone <a href="https://github.com/Myreage/typescript-starter">https://github.com/Myreage/typescript-starter</a><br>yarn install</pre><p>After that, simply install the <a href="https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint">ESLint VS Code extension</a> and the <a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode">Prettier VS Code extension</a>.</p><p>You’re good to go !</p><h3>1. Project setup</h3><p>Initialize a new repository:</p><p>mkdir typescript-starter &amp;&amp; cd typescript-starter &amp;&amp; npm init</p><p>Install Typescript:</p><p>yarn add typescript --dev</p><p>Add a purposely badly formatted sample file in src/index.ts :</p><pre>type Book={<br>  title:string<br>  author: string</pre><pre>}</pre><pre>const book:Book ={<br>  title: &#39;Cool Book&#39;,<br>  author:&quot;John Doe&quot;</pre><pre>}</pre><h3>2. ESLint configuration</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/0*UcKkHBbcJdQemHLE.png" /><figcaption>(<a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fwww.eficode.com%2Fblog%2Fhow-to-write-better-code-with-tools&amp;psig=AOvVaw0BslEgoxEjax6lUNdOhejQ&amp;ust=1653410491056000&amp;source=images&amp;cd=vfe&amp;ved=0CAwQjRxqFwoTCPCIhJyI9vcCFQAAAAAdAAAAABAP">Source</a>)</figcaption></figure><p>Install ESLint, its Typescript plugin and the related parser:</p><pre>yarn add eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin --dev</pre><p>Add a basic ESLint for Typescript configuration in a new file .eslintrc.json :</p><pre>{<br>  “env”: {<br>    “browser”: true,<br>    “es2021”: true<br>  },<br>  “extends”: [<br>    “eslint:recommended”,<br>    “plugin:@typescript-eslint/recommended”<br>  ],<br>  “parser”: “@typescript-eslint/parser”,<br>  “parserOptions”: {<br>    “ecmaVersion”: “latest”,<br>    “sourceType”: “module”<br>  },<br>  “plugins”: [<br>    “@typescript-eslint”<br>  ]<br>}</pre><p>Install the <a href="https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint">ESLint VS Code extension</a>.</p><p>Finally, create a new .vscode folder at the root of your project. You can now edit a workspace settings configuration file .vscode/settings.json to have ESLint auto-fix your fixable problems on save:</p><pre>{<br>  &quot;editor.codeActionsOnSave&quot;: {<br>    &quot;source.fixAll.eslint&quot;: true<br>  },<br>}</pre><h3>3. Prettier configuration</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*Nk89g6MFxztRmrAG.png" /><figcaption>(<a href="https://cdn.arstechnica.net/wp-content/uploads/2013/06/ars.png">Source</a>)</figcaption></figure><p>Install Prettier:</p><p>yarn add prettier eslint-config-prettier --dev</p><p>eslint-config-prettier ensures there will be no conflicts between ESLint and Prettier, by disabling ESLint rules that might be conflicting.</p><p>Edit your ESLint configuration so the &quot;extends” value looks like this:</p><pre>“extends”: [<br>  “eslint:recommended”,<br>  “plugin:@typescript-eslint/recommended”,<br>  “prettier”<br>],</pre><p>Install the <a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode">Prettier VS Code extension</a> and edit your .vscode/settings.json to enable auto-formatting on save:</p><pre>“editor.defaultFormatter”: “esbenp.prettier-vscode”,<br>“editor.formatOnSave”: true</pre><p>Add a basic Prettier configuration of your choice in .prettierrc.json :</p><pre>{<br>  &quot;semi&quot;: true,<br>  &quot;trailingComma&quot;: &quot;all&quot;,<br>  &quot;singleQuote&quot;: true<br>}</pre><h3>4. Let the magic operate</h3><p>Go back to your index.ts file, and re-save it.</p><p>If everything went well, your file should have been formatted on save, and ESLint should have auto-fixed everything it could ! You’re left with an error on const book:</p><pre>‘book’ is assigned a value but never used.eslint<a href="https://typescript-eslint.io/rules/no-unused-vars">@typescript-eslint/no-unused-vars</a></pre><p>You’re ready to spend hours re-typing the world !</p><p>However, if you’re in the mood for some more magic, you could:</p><ul><li>Customize your ESLint/Prettier rules, or even create your own !</li><li><a href="https://marketplace.visualstudio.com/vscode">Look for some awesome plugins in the VS Code Marketplace</a></li><li><a href="https://code.visualstudio.com/docs/editor/userdefinedsnippets">Add custom VS Code snippets</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*H7aDZ4rxFZh_0SBg.gif" /><figcaption>In Your Face is a VS Code extension that shows you Doom ‘Ouch Faces’ that correlate to the number of errors in your code (<a href="https://marketplace.visualstudio.com/items?itemName=VirejDasani.in-your-face">Source</a>)</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ce4fcb76509" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ovrsea/setup-a-typescript-project-with-eslint-prettier-and-vs-code-4ce4fcb76509">Setup a Typescript project with ESLint, Prettier and VS Code</a> was originally published in <a href="https://medium.com/ovrsea">OVRSEA</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>