Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/plugin-coverage/src/lib/coverage-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
type CoverageType,
coveragePluginConfigSchema,
} from './config.js';
import { createRunnerFunction } from './runner/index.js';
import { createRunnerFunction } from './runner/runner.js';
import { coverageDescription, coverageTypeWeightMapper } from './utils.js';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { expect } from 'vitest';
import { type AuditOutputs, DEFAULT_PERSIST_CONFIG } from '@code-pushup/models';
import { createRunnerFunction } from './index.js';
import { createRunnerFunction } from './runner.js';

describe('createRunnerFunction', () => {
it('should successfully execute runner', async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-eslint/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export {
eslintConfigFromNxProject,
eslintConfigFromNxProjectAndDeps,
eslintConfigFromNxProjects,
} from './lib/nx/index.js';
} from './lib/nx/nx.js';
4 changes: 2 additions & 2 deletions packages/plugin-eslint/src/lib/eslint-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
eslintPluginOptionsSchema,
} from './config.js';
import { ESLINT_PLUGIN_SLUG, ESLINT_PLUGIN_TITLE } from './constants.js';
import { listAuditsAndGroups } from './meta/index.js';
import { createRunnerFunction } from './runner/index.js';
import { listAuditsAndGroups } from './meta/list.js';
import { createRunnerFunction } from './runner/runner.js';

/**
* Instantiates Code PushUp ESLint plugin for use in core config.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { pluginConfigSchema } from '@code-pushup/models';
import { eslintPlugin } from './eslint-plugin.js';
import * as metaModule from './meta/index.js';
import * as metaModule from './meta/list.js';

describe('eslintPlugin', () => {
const listAuditsAndGroupsSpy = vi.spyOn(metaModule, 'listAuditsAndGroups');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ import {
teardownTestFolder,
} from '@code-pushup/test-utils';
import { executeProcess } from '@code-pushup/utils';
import type { ESLintTarget } from './config.js';
import { eslintConfigFromNxProject } from './nx/find-project-without-deps.js';
import type { ESLintTarget } from '../config.js';
import {
eslintConfigFromAllNxProjects,
eslintConfigFromNxProject,
eslintConfigFromNxProjectAndDeps,
} from './nx/index.js';
} from './nx.js';

type Project = 'cli' | 'core' | 'nx-plugin' | 'utils';

// skipping tests on Windows due to a problem with createProjectGraphAsync that hangs forever, issue seems to be connected to nested git or some other Nx graph related problem https://github.com/nrwl/nx/issues/27494#issuecomment-2633836688
describe.skipIf(process.platform === 'win32')('Nx helpers', () => {
const thisDir = fileURLToPath(path.dirname(import.meta.url));
const fixturesDir = path.join(thisDir, '..', '..', 'mocks', 'fixtures');
const fixturesDir = path.join(thisDir, '..', '..', '..', 'mocks', 'fixtures');
const tmpDir = path.join(process.cwd(), 'tmp', 'int', 'plugin-eslint');
let cwdSpy: MockInstance<[], string>;

Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-eslint/src/lib/nx/projects-to-config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ProjectConfiguration, ProjectGraph } from '@nx/devkit';
import type { ESLintTarget } from '../config.js';
import { detectConfigVersion } from '../meta/index.js';
import { detectConfigVersion } from '../meta/list.js';
import {
findCodePushupEslintConfig,
findEslintConfig,
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-eslint/src/lib/nx/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ProjectConfiguration } from '@nx/devkit';
import path from 'node:path';
import { fileExists, toArray } from '@code-pushup/utils';
import type { ConfigFormat } from '../meta/index.js';
import type { ConfigFormat } from '../meta/list.js';

const ESLINT_CONFIG_EXTENSIONS: Record<ConfigFormat, string[]> = {
// https://eslint.org/docs/latest/use/configure/configuration-files#configuration-file-formats
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import {
restoreNxIgnoredFiles,
teardownTestFolder,
} from '@code-pushup/test-utils';
import type { ESLintTarget } from './config.js';
import { listAuditsAndGroups } from './meta/index.js';
import { createRunnerFunction } from './runner/index.js';
import type { ESLintTarget } from '../config.js';
import { listAuditsAndGroups } from '../meta/list.js';
import { createRunnerFunction } from './runner.js';

describe('executeRunner', () => {
let cwdSpy: MockInstance<[], string>;
Expand All @@ -34,7 +34,7 @@ describe('executeRunner', () => {
};

const thisDir = fileURLToPath(path.dirname(import.meta.url));
const fixturesDir = path.join(thisDir, '..', '..', 'mocks', 'fixtures');
const fixturesDir = path.join(thisDir, '..', '..', '..', 'mocks', 'fixtures');
const tmpDir = path.join(process.cwd(), 'tmp', 'int', 'plugin-eslint');
const appDir = path.join(tmpDir, 'todos-app');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
} from '@code-pushup/models';
import { logger } from '@code-pushup/utils';
import type { ESLintTarget } from '../config.js';
import { createRunnerFunction } from './index.js';
import * as lintModule from './lint.js';
import { createRunnerFunction } from './runner.js';
import type { LinterOutput } from './types.js';
import * as utilsFileModule from './utils.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-eslint/src/lib/runner/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
logger,
truncateIssueMessage,
} from '@code-pushup/utils';
import { ruleIdToSlug } from '../meta/index.js';
import { ruleIdToSlug } from '../meta/list.js';
import type { LinterOutput } from './types.js';

type LintIssue = Linter.LintMessage & {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from './config.js';
import { dependencyDocs, dependencyGroupWeights } from './constants.js';
import { packageManagers } from './package-managers/package-managers.js';
import { createRunnerFunction } from './runner/index.js';
import { createRunnerFunction } from './runner/runner.js';
import { normalizeConfig } from './utils.js';

/**
Expand Down