Skip to content

Commit b7579a5

Browse files
committed
feat: Install/setup TypeScript and @typescript-eslint
1 parent a8285ca commit b7579a5

File tree

4 files changed

+312
-215
lines changed

4 files changed

+312
-215
lines changed

.eslintrc.js

+11-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,17 @@ module.exports = {
33
env: {
44
node: true,
55
},
6-
'extends': ['sora'],
6+
'extends': [
7+
'plugin:@typescript-eslint/recommended',
8+
'sora',
9+
],
10+
parser: '@typescript-eslint/parser',
711
parserOptions: {
8-
ecmaVersion: 2017,
12+
sourceType: 'module',
13+
ecmaVersion: 2020,
14+
},
15+
rules: {
16+
'no-use-before-define': 'off',
17+
'@typescript-eslint/no-use-before-define': ['error'],
918
},
1019
}

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@
1010
"devDependencies": {
1111
"@commitlint/cli": "^11.0.0",
1212
"@commitlint/config-conventional": "^11.0.0",
13+
"@typescript-eslint/eslint-plugin": "^4.15.2",
14+
"@typescript-eslint/parser": "^4.15.2",
1315
"eslint": "^7.20.0",
1416
"eslint-config-sora": "^3.1.0",
1517
"husky": "^5.0.9",
16-
"lerna": "^4.0.0"
18+
"lerna": "^4.0.0",
19+
"typescript": "^4.1.5"
1720
}
1821
}

tsconfig.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"compilerOptions": {
3+
"esModuleInterop": true,
4+
"importHelpers": true,
5+
"jsx": "preserve",
6+
"lib": ["esnext", "dom"],
7+
"module": "esnext",
8+
"moduleResolution": "node",
9+
"skipLibCheck": true,
10+
"sourceMap": true,
11+
"strict": true,
12+
"target": "esnext",
13+
},
14+
"include": [
15+
"src/**/*.ts",
16+
"src/**/*.tsx",
17+
],
18+
"exclude": [
19+
"node_modules"
20+
]
21+
}

0 commit comments

Comments
 (0)