1 | {
|
2 | "root": true,
|
3 | "extends": [
|
4 | "standard",
|
5 | "plugin:flowtype/recommended",
|
6 | "plugin:react/recommended",
|
7 | "prettier",
|
8 | "prettier/flowtype",
|
9 | "prettier/react",
|
10 | "prettier/standard"
|
11 | ],
|
12 | "plugins": ["flowtype", "react", "prettier", "standard", "react-hooks"],
|
13 | "parser": "babel-eslint",
|
14 | "parserOptions": {
|
15 | "ecmaVersion": 6,
|
16 | "sourceType": "module",
|
17 | "ecmaFeatures": {
|
18 | "jsx": true
|
19 | }
|
20 | },
|
21 | "env": {
|
22 | "es6": true,
|
23 | "browser": true
|
24 | },
|
25 | "rules": {
|
26 | "react/prop-types": 0,
|
27 | "react/display-name": 0,
|
28 | "react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
|
29 | "react-hooks/exhaustive-deps": "warn" // Checks effect dependencies
|
30 | },
|
31 | "settings": {
|
32 | "react": {
|
33 | "version": "detect",
|
34 | "flowVersion": "0.102"
|
35 | }
|
36 | },
|
37 | "overrides": [
|
38 | {
|
39 | "files": ["**/*.test.js"],
|
40 | "env": {
|
41 | "jest": true // now **/*.test.js files' env has both es6 *and* jest
|
42 | },
|
43 | // Can't extend in overrides: https://github.com/eslint/eslint/issues/8813
|
44 | // "extends": ["plugin:jest/recommended"]
|
45 | "plugins": ["jest"],
|
46 | "rules": {
|
47 | "jest/no-alias-methods": "warn",
|
48 | "jest/no-disabled-tests": "warn",
|
49 | "jest/no-focused-tests": "error",
|
50 | "jest/no-identical-title": "error",
|
51 | "jest/no-jest-import": "error",
|
52 | "jest/no-jasmine-globals": "warn",
|
53 | "jest/no-test-prefixes": "error",
|
54 | "jest/valid-describe": "error",
|
55 | "jest/valid-expect": "error",
|
56 | "jest/valid-expect-in-promise": "error"
|
57 | }
|
58 | }
|
59 | ]
|
60 | }
|