1 | module.exports = {
|
2 | parser: 'babel-eslint',
|
3 | extends: ['plugin:jest/recommended', 'airbnb', 'prettier', 'prettier/flowtype', 'prettier/react'],
|
4 | env: {
|
5 | browser: true,
|
6 | node: true,
|
7 | mocha: true,
|
8 | es6: true,
|
9 | jest: true,
|
10 | jasmine: true,
|
11 | 'jest/globals': true,
|
12 | },
|
13 | globals: {
|
14 | fetch: true,
|
15 | navigator: true,
|
16 | __DEV__: true,
|
17 | XMLHttpRequest: true,
|
18 | FormData: true,
|
19 | React$Element: true,
|
20 | Generator: true,
|
21 | SyntheticEvent: true,
|
22 | SyntheticAnimationEvent: true,
|
23 | SyntheticClipboardEvent: true,
|
24 | SyntheticCompositionEvent: true,
|
25 | SyntheticInputEvent: true,
|
26 | SyntheticUIEvent: true,
|
27 | SyntheticFocusEvent: true,
|
28 | SyntheticKeyboardEvent: true,
|
29 | SyntheticMouseEvent: true,
|
30 | SyntheticDragEvent: true,
|
31 | SyntheticWheelEvent: true,
|
32 | SyntheticTouchEvent: true,
|
33 | SyntheticTransitionEvent: true,
|
34 | },
|
35 | plugins: ['react', 'import', 'jest', 'flowtype', 'prettier'],
|
36 | parserOptions: {
|
37 | ecmaVersion: 2017,
|
38 | sourceType: 'module',
|
39 | ecmaFeatures: {
|
40 | jsx: true,
|
41 | },
|
42 | },
|
43 | settings: {
|
44 | flowtype: {
|
45 | onlyFilesWithFlowAnnotation: false,
|
46 | },
|
47 | },
|
48 | rules: {
|
49 | 'prettier/prettier': [
|
50 | 1,
|
51 | {
|
52 | printWidth: 100,
|
53 | trailingComma: 'es5',
|
54 | semi: false,
|
55 | singleQuote: true,
|
56 | jsxBracketSameLine: true,
|
57 | },
|
58 | ],
|
59 | 'eol-last': 0,
|
60 | 'consistent-return': 1,
|
61 | 'prefer-const': 1,
|
62 | 'no-var': 1,
|
63 | 'spaced-comment': 1,
|
64 | 'comma-dangle': 0,
|
65 | 'import/no-named-as-default': 0,
|
66 | 'import/prefer-default-export': 0,
|
67 | 'react/jsx-filename-extension': 0,
|
68 | 'react/require-default-props': 0,
|
69 | 'default-case': 1,
|
70 | 'global-require': 0,
|
71 | 'one-var': 0,
|
72 | 'no-case-declarations': 0,
|
73 | 'no-debugger': 1,
|
74 | 'no-empty': 1,
|
75 | 'no-shadow': 0,
|
76 | 'no-use-before-define': 0,
|
77 | 'no-plusplus': [1, { allowForLoopAfterthoughts: true }],
|
78 | 'no-unused-expressions': [1, { allowTernary: true, allowShortCircuit: true }],
|
79 | 'no-underscore-dangle': [1, { allow: ['_component', '__REDUX_DEVTOOLS_EXTENSION__'] }],
|
80 | 'no-unused-vars': 1,
|
81 | 'react/jsx-closing-tag-location': 0,
|
82 | 'react/jsx-no-bind': 1,
|
83 | 'react/jsx-uses-react': 1,
|
84 | 'react/jsx-uses-vars': 1,
|
85 | 'react/no-did-mount-set-state': 1,
|
86 | 'react/no-did-update-set-state': 1,
|
87 | 'react/no-will-update-set-state': 1,
|
88 | 'react/no-is-mounted': 1,
|
89 | 'react/no-multi-comp': 1,
|
90 | 'react/no-string-refs': 1,
|
91 | 'react/prefer-stateless-function': 1,
|
92 | 'react/prop-types': 1,
|
93 | 'react/self-closing-comp': 1,
|
94 | 'react/sort-comp': 1,
|
95 | 'react/no-unused-prop-types': 1,
|
96 | 'react/no-array-index-key': 1,
|
97 | 'jsx-a11y/alt-text': 1,
|
98 | 'jsx-a11y/img-redundant-alt': 1,
|
99 | 'jsx-a11y/label-has-for': 1,
|
100 | 'jsx-a11y/lang': 1,
|
101 | 'jsx-a11y/no-static-element-interactions': 1,
|
102 | 'jsx-a11y/no-noninteractive-element-interactions': 1,
|
103 | 'jsx-a11y/iframe-has-title': 1,
|
104 | 'jsx-a11y/media-has-caption': 1,
|
105 | },
|
106 | }
|