@@ -506,8 +506,7 @@ module.exports = {
506506
507507 // Prevent usage of `javascript:` URLs
508508 // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-script-url.md
509- // TODO: enable, semver-major
510- 'react/jsx-no-script-url' : [ 'off' , [
509+ 'react/jsx-no-script-url' : [ 'error' , [
511510 {
512511 name : 'Link' ,
513512 props : [ 'to' ] ,
@@ -516,8 +515,7 @@ module.exports = {
516515
517516 // Disallow unnecessary fragments
518517 // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md
519- // TODO: enable, semver-major
520- 'react/jsx-no-useless-fragment' : 'off' ,
518+ 'react/jsx-no-useless-fragment' : 'error' ,
521519
522520 // Prevent adjacent inline elements not separated by whitespace
523521 // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-adjacent-inline-elements.md
@@ -526,9 +524,8 @@ module.exports = {
526524
527525 // Enforce a specific function type for function components
528526 // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md
529- // TODO: enable! semver-minor, but do it in a major to be safe
530527 // TODO: investigate if setting namedComponents to expression vs declaration is problematic
531- 'react/function-component-definition' : [ 'off ' , {
528+ 'react/function-component-definition' : [ 'error ' , {
532529 namedComponents : 'function-expression' ,
533530 unnamedComponents : 'function-expression' ,
534531 } ] ,
@@ -539,23 +536,31 @@ module.exports = {
539536
540537 // Prevent react contexts from taking non-stable values
541538 // https://github.com/yannickcr/eslint-plugin-react/blob/e2eaadae316f9506d163812a09424eb42698470a/docs/rules/jsx-no-constructed-context-values.md
542- // TODO: enable, semver-minor
543- 'react/jsx-no-constructed-context-values' : 'off' ,
539+ 'react/jsx-no-constructed-context-values' : 'error' ,
544540
545541 // Prevent creating unstable components inside components
546542 // https://github.com/yannickcr/eslint-plugin-react/blob/c2a790a3472eea0f6de984bdc3ee2a62197417fb/docs/rules/no-unstable-nested-components.md
547- // TODO: enable, semver-major
548- 'react/no-unstable-nested-components' : 'off' ,
543+ 'react/no-unstable-nested-components' : 'error' ,
549544
550545 // Enforce that namespaces are not used in React elements
551546 // https://github.com/yannickcr/eslint-plugin-react/blob/8785c169c25b09b33c95655bf508cf46263bc53f/docs/rules/no-namespace.md
552- // TODO: enable, semver-minor
553- 'react/no-namespace' : 'off' ,
547+ 'react/no-namespace' : 'error' ,
554548
555549 // Prefer exact proptype definitions
556550 // https://github.com/yannickcr/eslint-plugin-react/blob/8785c169c25b09b33c95655bf508cf46263bc53f/docs/rules/prefer-exact-props.md
557- // TODO: enable, semver-major, just in case
558- 'react/prefer-exact-props' : 'off' ,
551+ 'react/prefer-exact-props' : 'error' ,
552+
553+ // Lifecycle methods should be methods on the prototype, not class fields
554+ // https://github.com/yannickcr/eslint-plugin-react/blob/21e01b61af7a38fc86d94f27eb66cda8054582ed/docs/rules/no-arrow-function-lifecycle.md
555+ 'react/no-arrow-function-lifecycle' : 'error' ,
556+
557+ // Prevent usage of invalid attributes
558+ // https://github.com/yannickcr/eslint-plugin-react/blob/21e01b61af7a38fc86d94f27eb66cda8054582ed/docs/rules/no-invalid-html-attribute.md
559+ 'react/no-invalid-html-attribute' : 'error' ,
560+
561+ // Prevent declaring unused methods of component class
562+ // https://github.com/yannickcr/eslint-plugin-react/blob/21e01b61af7a38fc86d94f27eb66cda8054582ed/docs/rules/no-unused-class-component-methods.md
563+ 'react/no-unused-class-component-methods' : 'error' ,
559564 } ,
560565
561566 settings : {
0 commit comments