thefrontside / javascript

Frontside JavaScript tooling
9 stars 5 forks source link

add consistent-type-imports to @frontside/eslint-config #47

Closed dagda1 closed 2 years ago

dagda1 commented 2 years ago

Motivation

consistent-type-imports can really help to get a bundle size down if you are only importing the types from a package, you won't trigger the loading of a main or module file.

With this rule and yarn lint --fix you should be able to standardise its use throughout a codebase.

Approach

add the rule.

import { Simulator, LegacyServiceCreator } from '@simulacrum/server';

becomes

import type { Simulator, LegacyServiceCreator } from '@simulacrum/server';
changeset-bot[bot] commented 2 years ago

🦋 Changeset detected

Latest commit: 8c241abe7925296852a3440a18e2abdf4b81d457

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages | Name | Type | | ------------------------ | ----- | | @frontside/eslint-config | Minor | | @frontside/typescript | Major |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

frontsidejack commented 2 years ago
The following preview packages were published: Name Version Install Command
br><pre><code>@frontside/eslint-config</code
3.0.2-consistent-type-imports.0

yarn add @frontside/eslint-config@consistent-type-imports

Generated by @thefrontside/actions Frontside