Skip to content

Instantly share code, notes, and snippets.

@esnya
Last active March 20, 2020 06:13
Show Gist options
  • Save esnya/2931ae9425d08ca41d2bf95a8c99dc96 to your computer and use it in GitHub Desktop.
Save esnya/2931ae9425d08ca41d2bf95a8c99dc96 to your computer and use it in GitHub Desktop.
boilerplate
extends:
- typescript
- typescript/react
- typescript/prettier
- typescript/prettier-react
rules:
prettier/prettier:
- error
- singleQuote: true
trailingComma: all
settings:
react:
version: detect
#/bin/bash
# Basic TypeScript
npm i -S source-map-support
npm i -D typescript ts-node
# Utilities
npm i -D npm-run-all rimraf cross-env
# ESLint
npm i -D eslint eslint-config-typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-prettier eslint-plugin-prettier prettier
# Quicktype
npm i -D quicktype foreach-cli
# Webpack
npm i -D webpack webpack-cli webpack-dev-server eslint-loader ts-loader webpack-loader-append-prepend html-webpack-plugin @types/html-webpack-plugin
# React
npm i -S react react-dom eslint-plugin-react
npm i -D @types/react @types/react-dom
{
"name": "",
"version": "0.0.0",
"private": true,
"description": "",
"license": "MIT",
"author": "esnya",
"scripts": {
"clean": "rimraf lib dist src/**/models/**/*.ts",
"build": "run-s build:*",
"build:1_models": "foreach -g \"src /**/models /**/*.yml\" -x \"quicktype -s schema -l typescript -o #{dir}/#{name}.ts #{path}\"",
"build:2_tsc": "tsc -b",
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"source-map-support": "^0.5.10"
},
"devDependencies": {
"@types/node": "^10.17.3",
"foreach-cli": "^1.8.1",
"npm-run-all": "^4.1.5",
"quicktype": "^15.0.207",
"rimraf": "^3.0.0",
"ts-node": "^8.4.1",
"typescript": "^3.2.4",
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment