-
Notifications
You must be signed in to change notification settings - Fork 132
/
.eslintrc.js
95 lines (94 loc) · 2.85 KB
/
.eslintrc.js
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/* eslint quote-props: ["error", "always"] */
/* eslint quotes: ["error", "double"] */
module.exports = {
"env": {
"node": true,
"es6": true,
"jest": true,
},
"plugins": ["lodash"],
"extends": ["airbnb-base", "plugin:lodash/recommended"],
"rules": {
"array-bracket-newline": ["error", { "multiline": true }],
"arrow-parens": ["error", "as-needed", { "requireForBlockBody": true }],
"default-param-last": "off",
"func-names": "off",
"no-else-return": ["error", { "allowElseIf": true }],
"no-underscore-dangle": "off",
"function-call-argument-newline": "off",
"function-paren-newline": "off",
"implicit-arrow-linebreak": "off",
"indent": [
"error",
2,
{
"CallExpression": { "arguments": "first" },
"FunctionDeclaration": { "parameters": "first" },
"FunctionExpression": { "parameters": "first" },
},
],
"lodash/prefer-lodash-method": [0],
"lodash/prefer-noop": [0],
"max-len": ["error", { "code": 110 }],
"no-param-reassign": ["error", { "props": false }],
"operator-linebreak": ["error", "before"],
// override airbnb-base dev dependencies, latest version does not white list __mocks__
"import/no-extraneous-dependencies": [
"error", {
"devDependencies": [
"**/test/**",
"**/__mocks__/*",
"**/*.{test,spec}.js",
"**/jest.config.js",
"**/webpack.*.js",
],
"optionalDependencies": false,
},
],
},
"overrides": [
{
"files": "**/*.ts",
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": [
"./tsconfig.json",
"./packages/core/tsconfig.json",
],
},
"plugins": ["@typescript-eslint", "lodash"],
"extends": ["airbnb-typescript/base", "plugin:lodash/recommended"],
"rules": {
"import/prefer-default-export": "off",
"import/no-default-export": "error",
"lodash/prefer-lodash-method": [0],
"lodash/prefer-noop": [0],
"@typescript-eslint/default-param-last": "off",
"@typescript-eslint/indent": [
"error",
2,
{
"CallExpression": { "arguments": "first" },
"FunctionDeclaration": { "parameters": "first" },
"FunctionExpression": { "parameters": "first" },
},
],
"@typescript-eslint/lines-between-class-members": [
"error",
"always",
{ "exceptAfterSingleLine": true },
],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "default",
"format": null,
"leadingUnderscore": "allow",
},
],
"@typescript-eslint/return-await": "off",
"@typescript-eslint/type-annotation-spacing": "error",
},
},
],
};