DEV Community

Krzysztof Żuraw
Krzysztof Żuraw

Posted on

Open sourcing tsconfig

Hi again 🖖

Today I want to write about the thing that we did in my work. I currently work at Ingrid. All of your codebases is written in TypeScript which is using tsconfig as a way
to tell the compiler what to do. Most of tsconfig is the same for all of your project
so we decided to open source it 🎉.

Why

You may ask why do such a thing? A first argument is that we can enforce good practices
for all of our codebase. If there is a new setting - we can adjust it in one place and
all the project will have it.

This is also the first step in making our internal ts-guide. We already have a common
prettier config. The next step will be to add Ingrid tslint rules.

How can you use it

Because it is open source you can use it in your own project by installing it:

npm install --save-dev @ingridab/tsconfig
Enter fullscreen mode Exit fullscreen mode

and extending your own configuration:

{
  "extends": "@ingridab/tsconfig",
  "compilerOptions": {
    "baseUrl": "./",
    "paths": {
      "~src/*": ["src/*"]
    },
    "plugins": [
      {
        "name": "typescript-tslint-plugin"
      }
    ]
  }
}
Enter fullscreen mode Exit fullscreen mode

Summary & TL;DR

The company that I work for open sourced their tsconfig.
You can use it in your own project too! What are the other
tools or configs that your company open sourced? Please write in the comments!

P.S

If you want to get those posts 1 week before those on dev.to you can join my newsletter on https://krzysztofzuraw.com/newsletter.

Top comments (1)

Collapse
 
dance2die profile image
Sung M. Kim

Pretty cool idea ✨.
I wasn't aware that you can share configuration files using NPM 😮