Skip to content

Commit

Permalink
feat(react): update eslint-plugin-react
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinspecker committed May 27, 2017
1 parent d96bc28 commit 0a441f2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -38,7 +38,7 @@
"eslint-plugin-ava": "^2.2.1",
"eslint-plugin-new-with-error": "^1.1.0",
"eslint-plugin-no-use-extend-native": "^0.3.4",
"eslint-plugin-react": "^5.0.1",
"eslint-plugin-react": "^7.0.1",
"eslint-plugin-xo": "^0.4.0",
"is-plain-obj": "^1.0.0",
"nyc": "^6.0.0",
Expand Down
16 changes: 16 additions & 0 deletions src/jsx.js
Expand Up @@ -10,6 +10,9 @@ config.plugins.push('react')

config.rules['jsx-quotes'] = [2, 'prefer-single']
config.rules['react/display-name'] = [2, {ignoreTranspilerName: false}]
config.rules['react/forbid-component-props'] = 2
config.rules['react/forbid-elements'] = 0
config.rules['react/forbid-foreign-prop-types'] = 2
config.rules['react/forbid-prop-types'] = [2, {forbid: ['any']}]
config.rules['react/jsx-boolean-value'] = [2, 'never']
config.rules['react/jsx-closing-bracket-location'] = [2, 'line-aligned']
Expand All @@ -26,6 +29,7 @@ config.rules['react/jsx-indent-props'] = [2, 2]
config.rules['react/jsx-key'] = 2
config.rules['react/jsx-max-props-per-line'] = [2, {maximum: 1}]
config.rules['react/jsx-no-bind'] = 2
config.rules['react/jsx-no-comment-textnodes'] = 2
config.rules['react/jsx-no-duplicate-props'] = 2
config.rules['react/jsx-no-literals'] = 2
config.rules['react/jsx-no-target-blank'] = 2
Expand All @@ -34,30 +38,42 @@ config.rules['react/jsx-pascal-case'] = 2
config.rules['react/jsx-sort-prop-types'] = 2
config.rules['react/jsx-sort-props'] = 2
config.rules['react/jsx-space-before-closing'] = [2, 'always']
config.rules['react/jsx-tag-spacing'] = 2
config.rules['react/jsx-uses-react'] = 2
config.rules['react/jsx-uses-vars'] = 2
config.rules['react/jsx-wrap-multilines'] = 2
config.rules['react/no-array-index-key'] = 2
config.rules['react/no-children-prop'] = 2
config.rules['react/no-comment-textnodes'] = 2
config.rules['react/no-danger'] = 2
config.rules['react/no-danger-with-children'] = 2
config.rules['react/no-deprecated'] = 2
config.rules['react/no-did-mount-set-state'] = 2
config.rules['react/no-did-update-set-state'] = 2
config.rules['react/no-direct-mutation-state'] = 2
config.rules['react/no-find-dom-node'] = 2
config.rules['react/no-unescaped-entities'] = 2
config.rules['react/no-is-mounted'] = 2
config.rules['react/no-multi-comp'] = 2
config.rules['react/no-render-return-value'] = 2
config.rules['react/no-set-state'] = 2
config.rules['react/no-string-refs'] = 2
config.rules['react/no-unknown-property'] = 2
config.rules['react/no-unused-prop-types'] = 2
config.rules['react/no-will-update-set-state'] = 2
config.rules['react/prefer-es6-class'] = [2, 'never']
config.rules['react/prefer-stateless-function'] = 2
config.rules['react/prop-types'] = 2
config.rules['react/react-in-jsx-scope'] = 2
config.rules['react/require-extension'] = [2, {extensions: ['.js', '.jsx']}]
config.rules['react/require-default-props'] = 2
config.rules['react/require-render-return'] = 2
config.rules['react/require-optimization'] = 2
config.rules['react/self-closing-comp'] = 2
config.rules['react/sort-comp'] = 2
config.rules['react/sort-prop-types'] = 2
config.rules['react/style-prop-object'] = 2
config.rules['react/wrap-multilines'] = [2, {assignment: false, declaration: false, return: false}]
config.rules['react/void-dom-elements-no-children'] = 2

module.exports = config

0 comments on commit 0a441f2

Please sign in to comment.