Skip to content

Commit a6dd5db

Browse files
committed
Add typescript
1 parent 360fd86 commit a6dd5db

File tree

4 files changed

+61
-1
lines changed

4 files changed

+61
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/.cache
22
/.idea
3+
/build
34
/node_modules

package-lock.json

Lines changed: 20 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: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,20 @@
44
"description": "microbe-ui for React",
55
"main": "index.js",
66
"scripts": {
7+
"build": "tsc",
78
"test": "echo \"Error: no test specified\" && exit 1"
89
},
10+
"prettier": {
11+
"arrowParens": "always",
12+
"bracketSpacing": true,
13+
"jsxBracketSameLine": false,
14+
"printWidth": 90,
15+
"semi": true,
16+
"singleQuote": true,
17+
"trailingComma": "none",
18+
"tabWidth": 4,
19+
"useTabs": true
20+
},
921
"repository": {
1022
"type": "git",
1123
"url": "git+https://github.com/microbe-ui/react-microbe-ui.git"
@@ -16,5 +28,9 @@
1628
"bugs": {
1729
"url": "https://github.com/microbe-ui/react-microbe-ui/issues"
1830
},
19-
"homepage": "https://github.com/microbe-ui/react-microbe-ui#readme"
31+
"homepage": "https://github.com/microbe-ui/react-microbe-ui#readme",
32+
"devDependencies": {
33+
"prettier": "^1.19.1",
34+
"typescript": "^3.8.3"
35+
}
2036
}

tsconfig.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"compilerOptions": {
3+
"outDir": "build",
4+
"module": "esnext",
5+
"target": "es5",
6+
"lib": ["es6", "dom", "es2016", "es2017"],
7+
"sourceMap": true,
8+
"allowJs": false,
9+
"jsx": "react",
10+
"declaration": true,
11+
"moduleResolution": "node",
12+
"forceConsistentCasingInFileNames": true,
13+
"noImplicitReturns": true,
14+
"noImplicitThis": true,
15+
"noImplicitAny": true,
16+
"strictNullChecks": true,
17+
"suppressImplicitAnyIndexErrors": true,
18+
"noUnusedLocals": true,
19+
"noUnusedParameters": true
20+
},
21+
"include": ["src"],
22+
"exclude": ["node_modules", "build"]
23+
}

0 commit comments

Comments
 (0)