rsbuild-plugin-publint
Version:
Run [publint](https://github.com/bluwy/publint) to lint npm packages after the build.
25 lines (24 loc) • 828 B
TypeScript
import { type RsbuildPlugin } from '@rsbuild/core';
import type { Options } from 'publint';
export type PluginPublintOptions = {
/**
* Whether to enable publint.
* @default true
*/
enable?: boolean;
/**
* Options for publint.
* @see https://github.com/bluwy/publint/blob/master/pkg/README.md#api
*/
publintOptions?: Options;
/**
* Specify when to throw an error based on message severity.
* - 'error': Only throw on errors (default)
* - 'warning': Throw on errors and warnings
* - 'suggestion': Throw on errors, warnings and suggestions
* - 'never': Never throw an error
* @default 'error'
*/
throwOn?: 'error' | 'warning' | 'suggestion' | 'never';
};
export declare const pluginPublint: (options?: PluginPublintOptions) => RsbuildPlugin;