dev: clean up yarn scripts, add typescript check & watch scripts

tsconfig rootDir was changed because tsc would throw errors and
apparently it wants all files in the project to be at the rootDir.

Co-authored-by: Jared Scheib <jared.scheib@gmail.com>
Co-authored-by: Chris Henn <chris@chrishenn.net>
pull/4022/head
Jared Scheib 2018-07-23 16:24:42 -07:00 committed by Chris Henn
parent dcf6c7dcc5
commit 76a6cd3bc2
3 changed files with 12 additions and 10 deletions

1
.gitignore vendored
View File

@ -16,6 +16,7 @@ backup/
.jssrc
.dev-jssrc
.bindata
.eslintcache
# Files
chronograf*.db

View File

@ -9,19 +9,20 @@
"url": "github:influxdata/chronograf"
},
"scripts": {
"build": "parcel build -d build --public-url '' src/index.html",
"start": "node parcel.js",
"lint": "esw src/",
"build": "parcel build -d build --public-url '' src/index.html",
"clean": "rm -rf ./build && rm -rf ./.cache",
"test": "jest",
"test:lint": "yarn run lint; yarn run test",
"test:watch": "jest --watch",
"test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand --watch",
"clean": "rm -rf ./build && rm -rf ./.cache",
"lint": "yarn run eslint; yarn run tslint; yarn run tsc",
"eslint": "eslint src",
"eslint:watch": "esw src --watch --cache",
"eslint:fix": "eslint src --fix",
"tslint": "tslint -c ./tslint.json '{src,test}/**/*.ts?(x)'",
"tslint:fix": "tslint --fix -c ./tslint.json '{src,test}/**/*.ts?(x)'",
"prettier": "prettier --single-quote --trailing-comma es5 --bracket-spacing false --semi false --write \"{src,spec}/**/*.js\"",
"lint:fix": "yarn run prettier && yarn run eslint:fix && yarn run tslint:fix",
"eslint-check": "eslint --print-config .eslintrc | eslint-config-prettier-check"
"tsc": "tsc -p ./tsconfig.json --noEmit --pretty",
"tsc:watch": "tsc -p ./tsconfig.json --noEmit --pretty -w"
},
"author": "",
"devDependencies": {

View File

@ -2,7 +2,6 @@
"compilerOptions": {
"types": [
"node",
"chai",
"lodash",
"enzyme",
"react",
@ -35,7 +34,8 @@
"checkJs": false,
"sourceMap": true,
"baseUrl": "./",
"rootDir": "./src"
"rootDir": "./",
"outDir": "./build"
},
"exclude": ["./assets/*", "./build/*", "./node_modules/*"]
"exclude": ["assets", "build", "node_modules"]
}