Skip to content

Commit 373a304

Browse files
committed
feat(typescript): setup base infra
1 parent 42d9da2 commit 373a304

File tree

5 files changed

+78
-9
lines changed

5 files changed

+78
-9
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,6 @@ lerna-debug.log
3333

3434
# Yarn lock file
3535
yarn.lock
36+
37+
# Custom typings
38+
custom_typing/*.js

package-lock.json

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,25 @@
2525
"bin"
2626
],
2727
"scripts": {
28-
"lint": "eslint \"./bin/*.js\" \"./test/**/*.js\" \"./packages/**/!(node_modules)/*.js\" ",
28+
"appveyor:lint": "lerna bootstrap && npm run lint",
29+
"appveyor:test": "npm run test",
30+
"bootstrap": "npm run clean:all && npm install && lerna bootstrap",
31+
"build": "tsc",
32+
"bundlesize": "bundlesize",
33+
"changelog": "conventional-changelog --config ./build/changelog-generator/index.js --infile CHANGELOG.md --same-file",
34+
"clean:all": "rimraf node_modules package-lock.json packages/*/node_modules packages/*/package-lock.json",
2935
"format": "prettier-eslint ./bin/*.js ./test/**/*.js ./packages/**/*.js --write",
36+
"jsdoc": "jsdoc -c jsdoc.json -r -d docs",
3037
"lint:codeOnly": "eslint \"{bin}/**/!(__testfixtures__)/*.js\" \"{bin}/**.js\"",
38+
"lint": "eslint \"./bin/*.js\" \"./test/**/*.js\" \"{packages}/**/!(node_modules)/*.test.js\" && npm run tslint",
3139
"precommit": "lint-staged",
3240
"pretest": "npm run lint",
33-
"test": "nyc jest",
3441
"reportCoverage": "nyc report --reporter=json && codecov -f coverage/coverage-final.json --disable=gcov",
35-
"jsdoc": "jsdoc -c jsdoc.json -r -d docs",
36-
"appveyor:lint": "lerna bootstrap && npm run lint",
37-
"appveyor:test": "npm run test",
42+
"test": "nyc jest",
3843
"travis:integration": "npm run test && npm run reportCoverage",
3944
"travis:lint": "lerna bootstrap && npm run lint && npm run bundlesize",
40-
"bundlesize": "bundlesize",
41-
"changelog": "conventional-changelog --config ./build/changelog-generator/index.js --infile CHANGELOG.md --same-file",
42-
"clean:all": "rimraf node_modules package-lock.json packages/*/node_modules packages/*/package-lock.json",
43-
"bootstrap": "npm run clean:all && npm install && lerna bootstrap"
45+
"tslint": "tslint -c tslint.json \"{packages}/**/!(node_modules)/*.ts\"",
46+
"watch": "tsc -w"
4447
},
4548
"lint-staged": {
4649
"{packages,bin}/**/!(__testfixtures__)/**.js": [
@@ -128,6 +131,8 @@
128131
"prettier-eslint-cli": "^4.7.1",
129132
"rimraf": "^2.6.2",
130133
"schema-utils": "^0.4.5",
134+
"tslint": "^5.10.0",
135+
"typescript": "^2.9.2",
131136
"webpack": "^4.8.3",
132137
"webpack-dev-server": "^3.1.4"
133138
}

tsconfig.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es6",
4+
"module": "commonjs",
5+
"moduleResolution": "node",
6+
"allowJs": true,
7+
"allowSyntheticDefaultImports": true,
8+
"skipLibCheck": true
9+
},
10+
"include": [
11+
"packages/**/*.ts"
12+
],
13+
"exclude": [
14+
"node_modules/**",
15+
"packages/*/node_modules/**"
16+
]
17+
}

tslint.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"defaultSeverity": "error",
3+
"extends": [
4+
"tslint:recommended"
5+
],
6+
"jsRules": {},
7+
"rules": {},
8+
"rulesDirectory": [],
9+
"linterOptions": {
10+
"exclude": [
11+
"node_modules/**",
12+
"packages/*/node_modules/**"
13+
]
14+
}
15+
}

0 commit comments

Comments
 (0)