MCPcopy Create free account
hub / github.com/code-pushup/cli / setupESLint

Function setupESLint

packages/plugin-eslint/src/lib/setup.ts:4–10  ·  view source on GitHub ↗
(eslintrc: ESLintTarget['eslintrc'])

Source from the content-addressed store, hash-verified

2import type { ESLintTarget } from './config.js';
3
4export async function setupESLint(eslintrc: ESLintTarget['eslintrc']) {
5 const eslintConstructor = await loadESLint();
6 return new eslintConstructor({
7 overrideConfigFile: eslintrc,
8 errorOnUnmatchedPattern: false,
9 });
10}
11
12async function loadESLint() {
13 const eslint = await import('eslint');

Callers 2

lintFunction · 0.85
loadRulesForLegacyConfigFunction · 0.85

Calls 1

loadESLintFunction · 0.85

Tested by

no test coverage detected