Skip to content

Commit

Permalink
docs(plugin-eslint): jsdoc for eslintPlugin function
Browse files Browse the repository at this point in the history
  • Loading branch information
matejchalk committed Oct 9, 2023
1 parent 56e1aee commit 890cf4c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/plugin-eslint/src/lib/eslint-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,26 @@ import { name, version } from '../../package.json';
import { ESLintPluginConfig, eslintPluginConfigSchema } from './config';
import { listAudits } from './meta/audits';

/**
* Instantiates Code PushUp ESLint plugin for use in core config.
*
* @example
* import eslintPlugin from '@code-pushup/eslint-plugin'
*
* export default {
* // ... core config ...
* plugins: [
* // ... other plugins ...
* await eslintPlugin({
* eslintrc: '.eslintrc.json',
* patterns: ['src', 'test/*.spec.js']
* })
* ]
* }
*
* @param config Configuration options.
* @returns Plugin configuration as a promise.
*/
export async function eslintPlugin(
config: ESLintPluginConfig,
): Promise<PluginConfig> {
Expand Down

0 comments on commit 890cf4c

Please sign in to comment.