Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@oldbros/tsconfig

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oldbros/tsconfig

Oldbros typescript configuration

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@oldbros/tsconfig

OldBros recommended typescript configuration

Installing

npm install --save-dev @oldbros/tsconfig

Usage

Add this line to your tsconfig.json file:

{
  "extends": "@oldbros/tsconfig"
}

Add check script to your package.json file:

{
  "scripts": {
    "check": "npx tsc --project ."
  }
}

Run npm run check command to check js files with ts compiler

Code examples

Features

  • Support latest ECMAScript2022 language features
  • Uses ECMAScript Modules
  • Recommended for NodeJS v18 and higher
  • No typescript experimental features

Description

This configuration is to check JavaScript with TypeScript compiler.

Why doesn't OldBros use TypeScript as a main language:

  1. There is no TypeScript RFC. Nobody knows what TypeScript actually is in details.
  2. TypeScript is not a JavaScript superset. It does not support all JavaScript syntax such as await new and many others
  3. TypeScript specific features. Enums, Namespaces, Decorators, private keyword (there are native js private fields)

Why OldBros uses TypeScript compiler for JavaScript:

  1. Explicit interfaces. They are especially useful for designing libraries and applications.
  2. IDE autocompletion and hints. Those are quite useful during development time.
  3. More elegant than JSDoc. The problem with JSDoc - it is quite heavy compare to TypeScript types.
  4. Disctinct types and interfaces declarations with d.ts files are sometimes useful.

Keywords

FAQs

Package last updated on 23 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc