-
Notifications
You must be signed in to change notification settings - Fork 28
/
.eslintrc
60 lines (60 loc) · 2.17 KB
/
.eslintrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "react-app"],
"env": { "browser": true, "node": true },
"overrides": [
{
// enable the rule specifically for TypeScript files
"files": ["*.ts", "*.js"],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": [0],
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-non-null-asserted-optional-chain": 0,
"complexity": ["error", 6], // if a function is getting too complex it should be broken down
"curly": ["error", "all"], // use curly brace even for single line functions
"comma-dangle": ["error", "always-multiline"], // easier to see git diff
"prefer-template": ["error"], // easier to read code when variables are used,
"prettier/prettier": [
"error",
{
"endOfLine": "auto" // This is need to handle different end-of-line in windows/mac
}
],
"no-case-declarations": "warn",
"no-empty": ["error", { "allowEmptyCatch": true }],
"@typescript-eslint/no-unused-vars": [
"error",
{ "vars": "all", "args": "after-used", "ignoreRestSiblings": false, "argsIgnorePattern": "^_" }
],
"@typescript-eslint/no-explicit-any": 0,
"react/jsx-curly-brace-presence": [
2,
{
"props": "never"
}
],
"react/self-closing-comp": [
"error",
{
"component": true,
"html": false
}
]
}
},
{
// https://stackoverflow.com/questions/37558795/nice-way-to-get-rid-of-no-unused-expressions-linter-error-with-chai
"files": ["*.spec.ts"],
"rules": {
"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": ["off"]
}
}
],
"ignorePatterns": ["**/dist/**", "**/src/models/Noise.js"]
}