{"size": 787, "ext": "js", "max_stars_repo_path": "eslint-plugin/rules/naming-policy/policy-ref-name.js", "max_stars_repo_name": "coffeemedia/build", "max_stars_repo_stars_event_min_datetime": "2018-05-22T09:15:31.000Z", "max_stars_repo_stars_event_max_datetime": "2021-03-01T14:32:04.000Z", "max_issues_repo_path": "eslint-plugin/rules/naming-policy/policy-ref-name.js", "max_issues_repo_name": "kaliberjs/build", "max_issues_repo_issues_event_min_datetime": "2017-05-17T20:45:22.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-25T11:57:16.000Z", "max_forks_repo_path": "eslint-plugin/rules/naming-policy/policy-ref-name.js", "max_forks_repo_name": "coffeemedia/build", "max_forks_repo_forks_event_min_datetime": "2018-04-30T08:18:01.000Z", "max_forks_repo_forks_event_max_datetime": "2019-07-01T09:18:08.000Z"}
{"max_stars_count": 9, "max_issues_count": 193, "max_forks_count": 4, "avg_line_length": 29.1481481481, "max_line_length": 106, "alphanum_fraction": 0.5311308767}
const { messages } = require('./')

module.exports = {
  valid: [
    `const xRef = React.useRef();`,
    `const xRef = React.useXyzRef();`,
    `const xRef = useXyzRef();`,
    `const x = React.useXyzRefx();`,
    `const x = React.xuseXyzRef();`,
    `const useRefX = x();`,
    `const x = <div />;`,
  ],
  invalid: [
    {
      code: `const x = React.useRef()`,
      errors: [{ message: messages['ref should end with Ref']('x', 'xRef'), type: 'Identifier' }],
    },
    {
      code: `const x = useXyzRef()`,
      errors: [{ message: messages['ref should end with Ref']('x', 'xRef'), type: 'Identifier' }],
    },
    {
      code: `const xRefx = useXyzRef()`,
      errors: [{ message: messages['ref should end with Ref']('xRefx', 'xRefxRef'), type: 'Identifier' }],
    },
  ]
}