<commit_before>#!/usr/bin/env node
const { setup } = require('setup-eslint-config');

const packageInfo = require('./package.json');

setup({
  name: 'eslint-config-relekang',
  packageInfo,
  prompts: [
    { name: 'react', type: 'confirm', message: 'Use react?' },
    { name: 'jest', type: 'confirm', message: 'Use jest?' },
  ],
  createEslintConfig: config => {
    const eslintConfig = { extends: ['relekang'] };
    if (config.babel) {
      eslintConfig.parser = 'babel-eslint';
    }
    if (config.typescript) {
      eslintConfig.parser = 'typescript-eslint-parser';
      eslintConfig.extends.push('relekang/configs/typescript');
    }
    if (config.jest) {
      eslintConfig.extends.push('relekang/configs/jest');
    }
    if (config.flowtype) {
      eslintConfig.extends.push('relekang/configs/flowtype');
    }
    if (config.react) {
      eslintConfig.extends.push('relekang/configs/react');
    }
    return eslintConfig;
  },
  createDependencyList: config => {
    const list = [
      'eslint',
      'eslint-plugin-prettier',
      'eslint-config-prettier',
      'prettier',
    ];
    if (config.babel) {
      list.push('babel-eslint');
    }
    if (config.typescript) {
      list.push('typescript-eslint-parser');
      list.push('eslint-plugin-typescript');
    }
    if (config.react) {
      list.push('eslint-plugin-react');
    }
    return list;
  },
});<commit_msg>fix: Add react-hooks plugins<commit_after>#!/usr/bin/env node
const { setup } = require('setup-eslint-config');

const packageInfo = require('./package.json');

setup({
  name: 'eslint-config-relekang',
  packageInfo,
  prompts: [
    { name: 'react', type: 'confirm', message: 'Use react?' },
    { name: 'jest', type: 'confirm', message: 'Use jest?' },
  ],
  createEslintConfig: config => {
    const eslintConfig = { extends: ['relekang'] };
    if (config.babel) {
      eslintConfig.parser = 'babel-eslint';
    }
    if (config.typescript) {
      eslintConfig.parser = 'typescript-eslint-parser';
      eslintConfig.extends.push('relekang/configs/typescript');
    }
    if (config.jest) {
      eslintConfig.extends.push('relekang/configs/jest');
    }
    if (config.flowtype) {
      eslintConfig.extends.push('relekang/configs/flowtype');
    }
    if (config.react) {
      eslintConfig.extends.push('relekang/configs/react');
    }
    return eslintConfig;
  },
  createDependencyList: config => {
    const list = [
      'eslint',
      'eslint-plugin-prettier',
      'eslint-config-prettier',
      'prettier',
    ];
    if (config.babel) {
      list.push('babel-eslint');
    }
    if (config.typescript) {
      list.push('typescript-eslint-parser');
      list.push('eslint-plugin-typescript');
    }
    if (config.react) {
      list.push('eslint-plugin-react');
      list.push('eslint-plugin-react-hooks');
    }
    return list;
  },
});
{'fraction_non_alphanumeric': 0.16835134193098641, 'fraction_numerical': 0.0, 'mean_word_length': 2.888888888888889, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5018740', 'n_tokens_mistral': 1012, 'n_tokens_neox': 979, 'n_words': 150}