add typescript

This commit is contained in:
Kent C. Dodds
2019-08-14 16:01:29 -06:00
parent e88f4ba7af
commit b0d4378a07
6 changed files with 87 additions and 20 deletions

View File

@@ -4,19 +4,22 @@
"author": "Kent C. Dodds (http://kentcdodds.com/)",
"license": "GPLv3",
"scripts": {
"build": "babel src --out-dir dist",
"build": "babel src --extensions .js,.ts,.tsx --out-dir dist",
"lint": "eslint --ignore-path .gitignore .",
"prettier": "prettier --ignore-path .gitignore \"**/*.+(js|json)\"",
"check-types": "tsc",
"prettier": "prettier --ignore-path .gitignore \"**/*.+(js|json|ts|tsx)\"",
"format": "npm run prettier -- --write",
"check-format": "npm run prettier -- --list-different",
"validate": "npm run check-format && npm run lint && npm run build"
"validate": "npm run check-types && npm run check-format && npm run lint && npm run build"
},
"devDependencies": {
"@babel/cli": "^7.7.0",
"@babel/core": "^7.7.2",
"@babel/preset-env": "^7.7.1",
"@babel/preset-typescript": "^7.7.2",
"eslint": "^6.6.0",
"eslint-config-prettier": "^6.5.0",
"prettier": "^1.19.1"
"prettier": "^1.19.1",
"typescript": "^3.7.2"
}
}