Skip to content

Commit e87258f

Browse files
author
Simon Planinschek
committed
Add eslint config file to the project root
1 parent bd2bf5a commit e87258f

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

.eslintrc.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"env": {
4+
"browser": true,
5+
"node": true
6+
},
7+
"plugins": [
8+
"prettier",
9+
"@typescript-eslint",
10+
"jest",
11+
"import"
12+
],
13+
"extends": [
14+
"prettier",
15+
"plugin:prettier/recommended",
16+
"plugin:@typescript-eslint/recommended",
17+
"plugin:import/typescript"
18+
],
19+
"parserOptions": {
20+
"sourceType": "module",
21+
"ecmaVersion": 2018
22+
},
23+
"rules": {
24+
"import/namespace": "off",
25+
"import/order": [
26+
"error"
27+
],
28+
"no-unused-vars": "off",
29+
"@typescript-eslint/no-unused-vars": "error",
30+
"@typescript-eslint/member-delimiter-style": "off",
31+
"@typescript-eslint/explicit-function-return-type": "off",
32+
"@typescript-eslint/no-var-requires": "off",
33+
"@typescript-eslint/no-extra-semi": "off"
34+
},
35+
"overrides": [
36+
{
37+
// enable the rule specifically for TypeScript files
38+
"files": [
39+
"*.ts",
40+
"*.tsx"
41+
],
42+
"rules": {
43+
"@typescript-eslint/explicit-function-return-type": [
44+
"error"
45+
]
46+
}
47+
}
48+
]
49+
}

0 commit comments

Comments
 (0)