Slide 41
Slide 41 text
rules: {
'react/jsx-uses-vars': 'warn',
'react/prop-types': 'off',
'react/no-string-refs': 'warn', // string refs is deprecated
'react/no-deprecated': 'off', // deprecated methods
'react/display-name': 'warn', // Component's display name is necessary
'react/no-unescaped-entities': 'warn', // should be error
'react/jsx-key': 'warn', // should be error
'no-unused-vars': 'warn', // should be error
'no-redeclare': 'warn', // should be error
'no-async-promise-executor': 'warn', // should be error
'react/jsx-no-duplicate-props': 'warn', // should be error
'no-case-declarations': 'warn',
'no-prototype-builtins': 'warn',
},
Prettierで全てfix!
それでもエラーが発生する場合はwarnで許容
.eslintrc.js を書こう!
.eslintrc