<commit_before>module.exports = {
  extends: ['prettier/react'],
  plugins: ['react'],
  parserOptions: {
    ecmaFeatures: {
      jsx: true,
    },
  },
  settings: {
    'import/extensions': ['.js', 'jsx'],
  },
  rules: {
    'class-methods-use-this': [
      'error',
      {
        exceptMethods: [
          'render',
          'getInitialState',
          'getDefaultProps',
          'getChildContext',
          'componentWillMount',
          'componentDidMount',
          'componentWillReceiveProps',
          'shouldComponentUpdate',
          'componentWillUpdate',
          'componentDidUpdate',
          'componentWillUnmount',
        ],
      },
    ],
    'jsx-quotes': ['error', 'prefer-double'],
    'no-unused-expressions': ['error', {allowShortCircuit: true}],
    // https://github.com/yannickcr/eslint-plugin-react
    'react/boolean-prop-naming': 'off',
    'react/button-has-type': 'error',
    'react/default-props-match-prop-types': 'error',
    'react/destructuring-assignment': 'off', // TODO: decide on what option to use
    'react/display-name': 'error',
    'react/forbid-component-props': 'off',
    'react/forbid-dom-props': 'off',
    'react/forbid-elements': 'off',
    'react/forbid-foreign-prop-types': 'off',
    'react/forbid-prop-types': ['error', {forbid: ['any', 'array', 'object']}],
    'react/jsx-boolean-value': ['error', 'never'],
    'react/jsx-child-element-spacing': 'off', // TODO: remove once `eslint-config-prettier` adds this
    'react/jsx-curly-brace-presence': ['error', 'never'],
    'react/jsx-filename-extension': ['error', {extensions: ['.jsx']}],
    'react/jsx-handler-names': [
      'off',
      {eventHandlerPrefix: 'handle', eventHandlerPropPrefix: 'on'},
    ],
    'react/jsx-key': 'error',
    // TODO: disable `ignoreRefs` and`allowArrowFunctions` options
    'react/jsx-no-bind': [
      'error',
      {ignoreRefs: true, allowArrowFunctions: true, allowBind: false},
    ],
    'react/jsx-no-comment-textnodes': 'error',
    'react/jsx-no-duplicate-props': ['error', {ignoreCase: true}],
    'react/jsx-no-literals': 'off',
    'react/jsx-no-target-blank': 'error',
    'react/jsx-no-undef': 'error',
    'react/jsx-one-expression-per-line': 'off',
    'react/jsx-pascal-case': ['error', {allowAllCaps: true, ignore: []}],
    'react/jsx-sort-default-props': 'off',
    'react/jsx-sort-prop-types': 'off', // deprecated in favor of react/jsx-sort-props
    'react/jsx-sort-props': 'off',
    'react/jsx-uses-react': 'error',
    'react/jsx-uses-vars': 'error',
    'react/no-access-state-in-setstate': 'error',
    'react/no-array-index-key': 'error',
    'react/no-children-prop': 'error',
    'react/no-comment-textnodes': 'off', // deprecated in favor of react/jsx-no-comment-textnodes
    'react/no-danger-with-children': 'error',
    'react/no-danger': 'error',
    'react/no-deprecated': 'error',<commit_msg>feat(react): add new `eslint-plugin-react` rules<commit_after>module.exports = {
  extends: ['prettier/react'],
  plugins: ['react'],
  parserOptions: {
    ecmaFeatures: {
      jsx: true,
    },
  },
  settings: {
    'import/extensions': ['.js', 'jsx'],
  },
  rules: {
    'class-methods-use-this': [
      'error',
      {
        exceptMethods: [
          'render',
          'getInitialState',
          'getDefaultProps',
          'getChildContext',
          'componentWillMount',
          'componentDidMount',
          'componentWillReceiveProps',
          'shouldComponentUpdate',
          'componentWillUpdate',
          'componentDidUpdate',
          'componentWillUnmount',
        ],
      },
    ],
    'jsx-quotes': ['error', 'prefer-double'],
    'no-unused-expressions': ['error', {allowShortCircuit: true}],
    // https://github.com/yannickcr/eslint-plugin-react
    'react/boolean-prop-naming': 'off',
    'react/button-has-type': 'error',
    'react/default-props-match-prop-types': 'error',
    'react/destructuring-assignment': 'off', // TODO: decide on what option to use
    'react/display-name': 'error',
    'react/forbid-component-props': 'off',
    'react/forbid-dom-props': 'off',
    'react/forbid-elements': 'off',
    'react/forbid-foreign-prop-types': 'off',
    'react/forbid-prop-types': ['error', {forbid: ['any', 'array', 'object']}],
    'react/jsx-boolean-value': ['error', 'never'],
    'react/jsx-child-element-spacing': 'off', // TODO: remove once `eslint-config-prettier` adds this
    'react/jsx-curly-brace-presence': ['error', 'never'],
    'react/jsx-filename-extension': ['error', {extensions: ['.jsx']}],
    'react/jsx-handler-names': [
      'off',
      {eventHandlerPrefix: 'handle', eventHandlerPropPrefix: 'on'},
    ],
    'react/jsx-key': 'error',
    // TODO: disable `ignoreRefs` and`allowArrowFunctions` options
    'react/jsx-no-bind': [
      'error',
      {ignoreRefs: true, allowArrowFunctions: true, allowBind: false},
    ],
    'react/jsx-max-depth': 'off',
    'react/jsx-no-comment-textnodes': 'error',
    'react/jsx-no-duplicate-props': ['error', {ignoreCase: true}],
    'react/jsx-no-literals': 'off',
    'react/jsx-no-target-blank': 'error',
    'react/jsx-no-undef': 'error',
    'react/jsx-one-expression-per-line': 'off',
    'react/jsx-pascal-case': ['error', {allowAllCaps: true, ignore: []}],
    'react/jsx-sort-default-props': 'off',
    'react/jsx-sort-prop-types': 'off', // deprecated in favor of react/jsx-sort-props
    'react/jsx-sort-props': 'off',
    'react/jsx-uses-react': 'error',
    'react/jsx-uses-vars': 'error',
    'react/no-access-state-in-setstate': 'error',
    'react/no-array-index-key': 'error',
    'react/no-children-prop': 'error',
    'react/no-comment-textnodes': 'off', // deprecated in favor of react/jsx-no-comment-textnodes
    'react/no-danger-with-children': 'error',
    'react/no-danger': 'error',
    'react/no-deprecated': 'error',
{'fraction_non_alphanumeric': 0.19928339873741682, 'fraction_numerical': 0.0, 'mean_word_length': 3.0371900826446283, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '804540', 'n_tokens_mistral': 2026, 'n_tokens_neox': 2019, 'n_words': 323}