<commit_before>import * as es from 'estree'
import { IError } from '../types/error'
import { Rule } from '../types/static'

export class NoImplicitReturnUndefinedError implements IError {
  constructor(public node: es.ReturnStatement) {}

  get location() {
    return this.node.loc!
  }

  explain() {
    return 'Missing value in return statement'
  }

  elaborate() {
    return 'TODO'
  }
}

const noImplicitReturnUndefined: Rule<es.ReturnStatement> = {
  name: 'no-implicit-declare-undefined',

  checkNodes: {
    ReturnStatement(node: es.ReturnStatement) {
      if (!node.argument) {
        return [new NoImplicitReturnUndefinedError(node)]
      } else {
        return []
      }
    }
  }
}

export default noImplicitReturnUndefined<commit_msg>Fix rule name<commit_after>import * as es from 'estree'
import { IError } from '../types/error'
import { Rule } from '../types/static'

export class NoImplicitReturnUndefinedError implements IError {
  constructor(public node: es.ReturnStatement) {}

  get location() {
    return this.node.loc!
  }

  explain() {
    return 'Missing value in return statement'
  }

  elaborate() {
    return 'TODO'
  }
}

const noImplicitReturnUndefined: Rule<es.ReturnStatement> = {
  name: 'no-implicit-return-undefined',

  checkNodes: {
    ReturnStatement(node: es.ReturnStatement) {
      if (!node.argument) {
        return [new NoImplicitReturnUndefinedError(node)]
      } else {
        return []
      }
    }
  }
}

export default noImplicitReturnUndefined
{'fraction_non_alphanumeric': 0.11383189940436797, 'fraction_numerical': 0.0, 'mean_word_length': 3.259154929577465, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '3952867', 'n_tokens_mistral': 466, 'n_tokens_neox': 462, 'n_words': 107}