forked from dendronhq/dendron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
96 lines (96 loc) · 2.77 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
96
module.exports = {
env: {
browser: true,
es6: true,
jest: true,
},
extends: ["plugin:react/recommended", "airbnb"],
globals: {
Atomics: "readonly",
SharedArrayBuffer: "readonly",
},
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: "module",
},
plugins: ["react", "@typescript-eslint", "jest"],
rules: {
// don't care
"comma-dangle": "off",
"object-curly-newline": "off",
"arrow-body-style": "off",
"array-callback-return": "off",
"lines-between-class-members": "off",
"arrow-parens": "off",
"no-else-return": "off",
"implicit-arrow-linebreak": "off",
"no-unused-vars": "off",
"max-len": "off",
"prefer-template": "off",
"consistent-return": "off",
// don't agree with
"dot-notation": "off",
// prettier
indent: "off",
quotes: "off",
"function-paren-newline": "off",
"brace-style": "off",
// runs into max-len issue
"operator-linebreak": "off",
// rest
"import/no-extraneous-dependencies": "on",
// A temporary hack related to IDE not resolving correct package.json
"import/no-extraneous-dependencies": "off",
// copy from packages/web-client/.eslintrc.json
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/no-unused-vars": "off",
"react/no-children-prop": "off",
"react/prop-types": "off",
"import/order": "off",
"import/no-cycle": "off",
"react/destructuring-assignment": "off",
"react/jsx-curly-newline": "off",
"react/jsx-props-no-spreading": "off",
"react/jsx-indent": "off",
"react/jsx-indent-props": "off",
"react/static-property-placement": "off",
"react/prefer-stateless-function": "off",
"react/no-did-update-set-state": "off",
"react/sort-comp": [
1,
{
order: [
"static-methods",
"instance-variables",
"lifecycle",
"/^on.+$/",
"everything-else",
"render",
],
},
],
// used for redux toolkit
"no-param-reassign": "off",
"max-classes-per-file": "off",
"spaced-comment": "off",
"prefer-destructuring": "off",
"no-useless-return": "off",
"import/prefer-default-export": "off",
"no-underscore-dangle": "off",
"class-methods-use-this": "off",
// problems with this
"prettier/prettier": "off",
"import/no-unresolved": "off",
"import/extensions": "off",
},
};