Skip to content
This repository was archived by the owner on Nov 3, 2025. It is now read-only.

Commit faddd28

Browse files
committed
🔧 (test) Add linter and typechecking
1 parent 0e39a2a commit faddd28

5 files changed

Lines changed: 677 additions & 28 deletions

File tree

.eslintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": ["bambi/native"],
3+
"rules": {
4+
"no-debugger": 0
5+
}
6+
}

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@
2020
"react-native": "*"
2121
},
2222
"scripts": {
23-
"test": "jest"
23+
"test:lint": "tslint src/**/*.ts{,x}",
24+
"test:unit": "jest",
25+
"test:type": "tsc --noEmit",
26+
"test": "yarn test:lint && yarn test:unit && yarn test:type"
2427
},
2528
"devDependencies": {
2629
"@babel/core": "^7.4.3",
@@ -30,13 +33,17 @@
3033
"@types/react-native": "^0.57.42",
3134
"@types/react-test-renderer": "^16.8.1",
3235
"babel-jest": "^24.7.0",
36+
"eslint": "^5.16.0",
37+
"eslint-config-bambi": "^1.4.0",
3338
"jest": "^24.7.0",
3439
"metro-react-native-babel-preset": "^0.53.1",
3540
"mobx": "^5.9.4",
3641
"mobx-react": "^5.4.3",
42+
"prettier": "^1.16.4",
3743
"react": "16.8.3",
3844
"react-native": "0.59.3",
3945
"react-test-renderer": "^16.8.6",
46+
"tslint": "^5.15.0",
4047
"typescript": "^3.4.1"
4148
}
4249
}

tsconfig.json

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,32 @@
11
{
22
"compilerOptions": {
3+
"target": "esnext",
34
"allowSyntheticDefaultImports": true,
5+
"outDir": "dist",
46
"declaration": true,
5-
"jsx": "react",
67
"module": "commonjs",
7-
"outDir": "dist",
8+
"jsx": "react",
89
"strict": true,
9-
"target": "es5"
10+
"noImplicitAny": true,
11+
"strictNullChecks": true,
12+
"strictFunctionTypes": true,
13+
"strictBindCallApply": true,
14+
"strictPropertyInitialization": true,
15+
"noImplicitThis": true,
16+
"alwaysStrict": true,
17+
"noUnusedLocals": true,
18+
"noUnusedParameters": true,
19+
"noImplicitReturns": true,
20+
"noFallthroughCasesInSwitch": true,
21+
"baseUrl": "./src",
22+
"esModuleInterop": true,
23+
"experimentalDecorators": true,
24+
"emitDecoratorMetadata": true,
25+
"noEmit": true,
26+
"allowJs": true,
27+
"lib": ["es6"],
28+
"types": ["react-native"]
1029
},
11-
"exclude": ["node_modules", "dist", "example"]
30+
"include": ["./src"],
31+
"exclude": ["node_modules", "dist", "example", "**/__tests__/*"]
1232
}

tslint.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"defaultSeverity": "error",
3+
"extends": ["tslint:recommended"],
4+
"jsRules": {},
5+
"rules": {
6+
"quotemark": [true, "single", "jsx-double"],
7+
"ordered-imports": false,
8+
"trailing-comma": false
9+
},
10+
"rulesDirectory": []
11+
}

0 commit comments

Comments
 (0)