UNPKG

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