forked from msupply-foundation/mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
68 lines (68 loc) · 2.23 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
61
62
63
64
65
66
67
68
{
"env": { "jest": true },
"extends": ["airbnb-typescript"],
"globals": {
"fetch": false
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"plugins": ["@typescript-eslint", "prettier"],
"rules": {
"arrow-body-style": ["error", "as-needed"],
"arrow-parens": ["error", "as-needed"],
"comma-dangle": "off",
"@typescript-eslint/comma-dangle": [
"error",
{
"arrays": "always-multiline",
"exports": "always-multiline",
"functions": "never",
"imports": "always-multiline",
"objects": "always-multiline"
}
],
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
"function-paren-newline": "off",
"implicit-arrow-linebreak": "off",
"import/prefer-default-export": "off",
"indent": ["warn", 2, { "SwitchCase": 1 }],
"max-len": ["warn", { "code": 100, "ignoreTemplateLiterals": true }],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "memberLike",
"modifiers": ["private"],
"leadingUnderscore": "require",
"format": ["camelCase"]
}
],
"no-underscore-dangle": "off",
"no-confusing-arrow": "off",
"no-param-reassign": "off",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["error", { "variables": false }],
"object-curly-newline": ["error", { "ObjectPattern": { "multiline": true } }],
"operator-linebreak": "off",
"prettier/prettier": "error",
"quotes": ["error", "single", { "avoidEscape": true }],
"react/jsx-boolean-value": "off",
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx", ".ts", ".tsx"] }],
"react/jsx-one-expression-per-line": "off",
"react/jsx-props-no-spreading": "off",
"react/static-property-placement": ["warn", "property assignment"],
"strict": "off",
// disable the rule for js files (its enabled for ts files in overrides)
"@typescript-eslint/explicit-module-boundary-types": "off"
},
"overrides": [
{
// enable rule specifically for ts files
"files": ["*.ts", "*.tsx"],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": ["error"]
}
}
]
}