<?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: AliRezaBeigy</title>
    <description>The latest articles on DEV Community by AliRezaBeigy (@alirezabeigy).</description>
    <link>https://dev.to/alirezabeigy</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%2F268014%2Fbc6beef6-e696-4144-86d0-eceff13b9fdd.jpeg</url>
      <title>DEV Community: AliRezaBeigy</title>
      <link>https://dev.to/alirezabeigy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alirezabeigy"/>
    <language>en</language>
    <item>
      <title>Streamline Your TypeScript Imports with TSImportRefiner</title>
      <dc:creator>AliRezaBeigy</dc:creator>
      <pubDate>Wed, 10 Apr 2024 16:02:25 +0000</pubDate>
      <link>https://dev.to/alirezabeigy/streamline-your-typescript-imports-with-tsimportrefiner-55ln</link>
      <guid>https://dev.to/alirezabeigy/streamline-your-typescript-imports-with-tsimportrefiner-55ln</guid>
      <description>&lt;p&gt;Greetings fellow TypeScript enthusiasts! I'm excited to introduce TSImportRefiner, a tool designed to simplify and optimize TypeScript import statements.&lt;/p&gt;

&lt;p&gt;TSImportRefiner is a script that automates the refactoring of TypeScript import statements. It efficiently organizes imports based on path aliases from tsconfig.json, enhancing code readability and maintenance.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tr&gt;
    &lt;td&gt;
      &lt;p&gt;Before Refactoring&lt;/p&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2FAliRezaBeigy%2FTSImportRefiner%2Fblob%2Fmaster%2Fassets%2Fbefore.png%3Fraw%3Dtrue" alt="Before Refactoring"&gt;
    &lt;/td&gt;
    &lt;td&gt;
      &lt;p&gt;After Refactoring&lt;/p&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2FAliRezaBeigy%2FTSImportRefiner%2Fblob%2Fmaster%2Fassets%2Fafter.png%3Fraw%3Dtrue" alt="After Refactoring"&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Key Features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Alias Conversion: Automatically converts module paths to defined aliases.&lt;/li&gt;
&lt;li&gt;Sort Imports: Neatly organizes imports by line length.&lt;/li&gt;
&lt;li&gt;Easy Integration: Easily integrates with existing TypeScript projects with minimal setup required.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Getting Started:&lt;/strong&gt;&lt;br&gt;
Install via npm:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; tsimportrefiner
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Usage is straightforward:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tsimportrefiner &amp;lt;path&amp;gt; &lt;span class="o"&gt;[&lt;/span&gt;options]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;where  can be a single file or a directory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example Usage:&lt;/strong&gt;&lt;br&gt;
An example command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tsimportrefiner ./src &lt;span class="nt"&gt;--extensions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ts,tsx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;which processes all .ts and .tsx files in the src directory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Contributing:&lt;/strong&gt;&lt;br&gt;
Contributions are welcomed and appreciated. Whether it's feature development, bug fixes, or suggestions, your input helps improve TSImportRefiner.&lt;/p&gt;

&lt;p&gt;TSImportRefiner is here to make your TypeScript experience smoother and more efficient. I'm looking forward to your feedback and contributions. Let's make TypeScript coding cleaner and more enjoyable together!&lt;/p&gt;

&lt;p&gt;GitHub Repository: &lt;a href="https://github.com/AliRezaBeigy/TSImportRefiner" rel="noopener noreferrer"&gt;TSImportRefiner&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
