@code-pushup/eslint-plugin
Version:
Code PushUp plugin for detecting problems in source code using ESLint.📋
28 lines (27 loc) • 1.11 kB
TypeScript
import type { ESLintTarget } from '../config.js';
/**
* Accepts a target Nx projects, finds projects it depends on, and converts lint configurations to Code PushUp ESLint plugin parameters.
*
* Use when you wish to include a targeted subset of your Nx monorepo in your Code PushUp project.
* If you prefer to include all Nx projects, refer to {@link eslintConfigFromAllNxProjects} instead.
* if you'd like to skip dependencies of the provided target project use {@link eslintConfigFromNxProject} instead.
*
* @example
* import eslintPlugin, {
* eslintConfigFromNxProjectAndDeps,
* } from '@code-pushup/eslint-plugin';
*
* const projectName = 'backoffice'; // <-- name from project.json
*
* export default {
* plugins: [
* await eslintPlugin(
* await eslintConfigFromNxProjectAndDeps(projectName)
* )
* ]
* }
*
* @param projectName Nx project serving as main entry point
* @returns ESLint config and patterns, intended to be passed to {@link eslintPlugin}
*/
export declare function eslintConfigFromNxProjectAndDeps(projectName: string): Promise<ESLintTarget[]>;