UNPKG

4.22 kBJavaScriptView Raw
1module.exports = {
2 "extends": "airbnb",
3 "parser": "babel-eslint",
4 "plugins": [
5 "jest",
6 ],
7 "env": {
8 "node": true,
9 "jest/globals": true,
10 },
11 "globals": {
12 "window": true,
13 "document": true,
14 "__DEV__": true,
15 "__BROWSER__": true,
16 },
17 "rules": {
18 "no-confusing-arrow": ["off"],
19 "default-case": ["off"],
20 "no-console": ["off"],
21 "jsx-a11y/no-noninteractive-tabindex": ["off"],
22 "import/prefer-default-export": ["off"],
23 "global-require": ["off"],
24 "react/prop-types": ["off"],
25 "react/no-array-index-key": ["off"],
26 "react/jsx-filename-extension": [
27 1,
28 {
29 "extensions": [
30 ".jsx",
31 ".tsx"
32 ]
33 }
34 ],
35 "no-trailing-spaces": "off",
36 "object-curly-newline": "off",
37 "prefer-destructuring": "off",
38 "class-methods-use-this": "off",
39 "comma-dangle": ["error", {
40 "arrays": "always-multiline",
41 "objects": "always-multiline",
42 "functions": "ignore",
43 }],
44 "function-paren-newline": "off",
45 "import/no-unresolved": "off",
46 "no-underscore-dangle": "off",
47 "camelcase": "off",
48 "max-len": "off",
49 "no-restricted-syntax": [
50 2,
51 "DebuggerStatement",
52 "LabeledStatement",
53 "WithStatement",
54 ],
55 "indent": ["error", 4],
56 "import/extensions": ["off"],
57 "import/no-extraneous-dependencies": ["off"],
58 "prefer-template": ["off"],
59 "no-prototype-builtins": ["off"],
60 "react/sort-comp": [1, {
61 order: [
62 "type-annotations",
63 "static-methods",
64 "lifecycle",
65 "everything-else",
66 "render"
67 ],
68 groups: {
69 lifecycle: [
70 "displayName",
71 "propTypes",
72 "contextTypes",
73 "childContextTypes",
74 "mixins",
75 "statics",
76 "defaultProps",
77 "constructor",
78 "getDefaultProps",
79 "getInitialState",
80 "state",
81 "getChildContext",
82 "componentWillMount",
83 "componentDidMount",
84 "componentWillReceiveProps",
85 "shouldComponentUpdate",
86 "componentWillUpdate",
87 "componentDidUpdate",
88 "componentWillUnmount"
89 ],
90 },
91 }],
92 "react/no-unescaped-entities": ["off"],
93 "react/prop-types": "off",
94 "react/forbid-prop-types": ["off"],
95 "react/jsx-indent": ["error", 4],
96 "react/jsx-pascal-case": "off",
97 "react/require-default-props": "off",
98 "react/jsx-indent-props": ["error", 4],
99 "react/no-unused-prop-types": ["off"],
100 "react/prefer-stateless-function": "off",
101 "jsx-a11y/no-static-element-interactions": "off",
102 "jsx-a11y/click-events-have-key-events": "off",
103 "guard-for-in": "off",
104 "no-plusplus": ["off"],
105 "arrow-parens": ["off"],
106 },
107 "overrides": [
108 {
109 "parser": "typescript-eslint-parser",
110 "files": ["**/*.ts", "**/*.tsx"],
111 "rules": {
112 "no-unused-vars": ["off"],
113 "no-undef": ["off"]
114 }
115 },
116 {
117 "files": ["cypress/**/*.js"],
118 "rules": {
119 "no-param-reassign": ["off"]
120 },
121 "env": {
122 "browser": true,
123 "mocha": true
124 },
125 "globals": {
126 "cy": false,
127 "Cypress": false,
128 "describe": false,
129 "context": false,
130 "beforeEach": false,
131 "afterEach": false,
132 "it": false,
133 "assert": false,
134 "expect": false
135 }
136 }
137 ]
138}