UNPKG

1.27 kBJavaScriptView Raw
1module.exports = {
2 plugins: ['react', 'react-hooks', 'relay'],
3 settings: {
4 react: {
5 version: '16.5',
6 },
7 },
8 parserOptions: {
9 ecmaFeatures: {
10 jsx: true,
11 },
12 },
13 rules: {
14 'react/display-name': [
15 'warn',
16 {
17 ignoreTranspilerName: false,
18 },
19 ],
20 'react/jsx-boolean-value': 'warn',
21 'react/jsx-no-duplicate-props': 'error',
22 'react/jsx-no-undef': 'error',
23 'react/jsx-uses-react': 'error',
24 'react/jsx-uses-vars': 'error',
25 'react/no-multi-comp': [
26 'error',
27 {
28 ignoreStateless: true,
29 },
30 ],
31 'react/no-unknown-property': 'error',
32 'react/prop-types': 'warn',
33 'react/react-in-jsx-scope': 'error',
34 'react/self-closing-comp': 'error',
35 'react/sort-comp': 'warn',
36 'react/prefer-es6-class': ['warn', 'always'],
37 'react/prefer-stateless-function': 'warn',
38 'react/jsx-no-target-blank': 'warn',
39 'react-hooks/rules-of-hooks': 'error',
40 'react-hooks/exhaustive-deps': 'warn',
41 'relay/graphql-syntax': 'warn',
42 'relay/no-future-added-value': 'warn',
43 },
44};