UNPKG

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