Enable react/prefer-stateless-function rule

This commit is contained in:
David Petersen
2016-03-02 09:11:46 -06:00
parent 246cde0de8
commit 03d0054a46
2 changed files with 4 additions and 1 deletions

View File

@@ -104,6 +104,9 @@ module.exports = {
// Require ES6 class declarations over React.createClass
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-es6-class.md
'react/prefer-es6-class': [2, 'always'],
// Require stateless functions when not using lifecycle methods, setState or ref
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-stateless-function.md
'react/prefer-stateless-function': 2,
// Prevent missing props validation in a React component definition
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md
'react/prop-types': [2, { 'ignore': [], 'customValidators': [] }],