{"size": 767, "ext": "js", "max_stars_repo_path": "node_modules/@vue/cli-plugin-eslint/migrator/index.js", "max_stars_repo_name": "lldenisll/front-end-dash", "max_stars_repo_stars_event_min_datetime": "2020-10-31T19:45:40.000Z", "max_stars_repo_stars_event_max_datetime": "2021-09-09T08:35:31.000Z", "max_issues_repo_path": "node_modules/@vue/cli-plugin-eslint/migrator/index.js", "max_issues_repo_name": "lldenisll/front-end-dash", "max_issues_repo_issues_event_min_datetime": "2020-06-05T20:54:23.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-12T00:14:30.000Z", "max_forks_repo_path": "node_modules/@vue/cli-plugin-eslint/migrator/index.js", "max_forks_repo_name": "lldenisll/front-end-dash", "max_forks_repo_forks_event_min_datetime": "2021-01-28T12:58:19.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-21T15:38:06.000Z"}
{"max_stars_count": 10, "max_issues_count": 8, "max_forks_count": 7, "avg_line_length": 28.4074074074, "max_line_length": 101, "alphanum_fraction": 0.6114732725}
module.exports = (api) => {
  // if project is scaffolded by Vue CLI 3.0.x or earlier,
  // the ESLint dependency (ESLint v4) is inside @vue/cli-plugin-eslint;
  // in Vue CLI v4 it should be extracted to the project dependency list.
  if (api.fromVersion('^3')) {
    const pkg = require(api.resolve('package.json'))
    const hasESLint = [
      'dependencies',
      'devDependencies',
      'peerDependencies',
      'optionalDependencies'
    ].some(depType =>
      Object.keys(pkg[depType] || {}).includes('eslint')
    )

    if (!hasESLint) {
      api.extendPackage({
        devDependencies: {
          eslint: '^4.19.1'
        }
      })
    }

    // TODO: add a prompt for users to optionally upgrade their eslint configs to a new major version
  }
}
