{"size": 1056, "ext": "js", "max_stars_repo_path": "test/config.test.js", "max_stars_repo_name": "yceffort/eslint-config-triple", "max_stars_repo_stars_event_min_datetime": "2021-12-03T01:27:16.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T03:14:34.000Z", "max_issues_repo_path": "test/config.test.js", "max_issues_repo_name": "yceffort/eslint-config-triple", "max_issues_repo_issues_event_min_datetime": "2021-12-07T01:02:13.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-19T02:45:43.000Z", "max_forks_repo_path": "test/config.test.js", "max_forks_repo_name": "yceffort/eslint-config-triple", "max_forks_repo_forks_event_min_datetime": "2021-12-11T06:29:47.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-18T16:14:06.000Z"}
{"max_stars_count": 49, "max_issues_count": 14, "max_forks_count": 3, "avg_line_length": 25.1428571429, "max_line_length": 66, "alphanum_fraction": 0.6638257576}
const path = require('path')

const { ESLint } = require('eslint')

test('eslint javascript config', async () => {
  const eslint = new ESLint({
    extensions: ['js', 'jsx'],
    overrideConfigFile: path.resolve(__dirname, '../index.js'),
    useEslintrc: false,
  })

  const config = await eslint.calculateConfigForFile('./mock.js')

  expect(config).toMatchSnapshot()
})

test('eslint typescript config', async () => {
  const eslint = new ESLint({
    extensions: ['ts', 'tsx'],
    overrideConfigFile: path.resolve(__dirname, '../index.js'),
    useEslintrc: false,
  })

  const config = await eslint.calculateConfigForFile('./mock.tsx')

  expect(config).toMatchSnapshot({
    parser: expect.stringMatching(/@typescript-eslint/),
  })
})

test('eslint frontend config', async () => {
  const eslint = new ESLint({
    extensions: ['ts', 'tsx'],
    overrideConfigFile: path.resolve(__dirname, '../frontend.js'),
    useEslintrc: false,
  })

  const config = await eslint.calculateConfigForFile('./mock.tsx')

  expect(config).toMatchSnapshot()
})
