Skip to content

Commit e8d22b6

Browse files
committed
Add linting config for TypeScript
1 parent 6ac8648 commit e8d22b6

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
dist
3+
coverage

.eslintrc.yml

+10
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,22 @@ env:
22
es6: true
33
browser: true
44

5+
parser: '@typescript-eslint/parser'
6+
57
extends:
68
- "eslint:recommended"
9+
- 'plugin:@typescript-eslint/eslint-recommended'
10+
- 'plugin:@typescript-eslint/recommended'
11+
- 'plugin:@typescript-eslint/recommended-requiring-type-checking'
12+
13+
plugins:
14+
- '@typescript-eslint'
715

816
parserOptions:
917
ecmaVersion: 6
1018
sourceType: module
19+
tsconfigRootDir: '.'
20+
project: ['./tsconfig.json']
1121

1222
overrides:
1323
- files:

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
"@babel/core": "^7.2.2",
99
"@babel/preset-env": "^7.9.0",
1010
"@babel/preset-typescript": "^7.9.0",
11+
"@typescript-eslint/eslint-plugin": "^2.25.0",
12+
"@typescript-eslint/parser": "^2.25.0",
1113
"babel-jest": "^25.1.0",
1214
"babel-loader": "^8.0.5",
1315
"eslint": "^6.8.0",

0 commit comments

Comments
 (0)