1.1.2 • Published 5 years ago

ts-goodeggs v1.1.2

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

Typescript things for Good Eggs

Typescript, TSLint, and Prettier configs

Installation

yarn add --dev tslint typescript-tslint-plugin prettier ts-goodeggs

Usage

In tsconfig.json:

{
  "extends": "ts-goodeggs/tsconfig",
  "compilerOptions": {
    "outDir": "build"
  },
  "exclude": ["node_modules", "build", "public", "tmp"]
}

In tslint.json:

{
  "extends": "ts-goodeggs/tslint"
}

In prettier.config.js:

//tslint:disable
module.exports = require('ts-goodeggs/prettier');

In package.json:

{
  "scripts": {
    "build": "yarn run build:ts",
    "build:ts": "ts-goodeggs build",
    "clean": "rm -rf build",
    "distclean": "yarn run clean && rm -rf node_modules",
    "lint": "yarn run lint:ts && yarn run lint:docs",
    "lint:ts": "ts-goodeggs lint",
    "lint:docs": "yarn run lint:docs:glob '**/*.{yml,json,md}'",
    "lint:docs:glob": "prettier --ignore-path .gitignore --list-different",
    "fmt": "yarn run fmt:ts && yarn run fmt:docs",
    "fmt:ts": "ts-goodeggs fmt",
    "fmt:docs": "yarn run fmt:docs:glob '**/*.{yml,json,md}'",
    "fmt:docs:glob": "prettier --ignore-path .gitignore --write"
  }
}