Run `publint` to lint npm packages after the build.
22
stars
93
commits
TypeScript
primary language
Sep 8, 2026
updated
Run publint to lint npm packages after the build.
rsbuild-plugin-publint is the perfect partner for Rslib. When building a library, publint helps you to lint the npm package and give suggestions to improve its compatibility with different environments.
Install:
npm add rsbuild-plugin-publint -D
Add plugin to your rslib.config.ts or rsbuild.config.ts:
import { pluginPublint } from 'rsbuild-plugin-publint';
export default {
plugins: [pluginPublint()],
};
Whether to enable publint.
booleantrueFor example, only run publint in the CI environment:
pluginPublint({
enable: Boolean(process.env.CI),
});
Options for publint. See publint - API for more details.
import('publint').Optionsconst defaultOptions = {
pkgDir: api.context.rootPath,
};
pluginPublint({
publintOptions: {
level: 'error',
},
});
Specify when to throw an error based on message severity.
'error' | 'warning' | 'suggestion' | 'never''error'pluginPublint({
throwOn: 'warning',
});
Optional values:
'error': Only throw on errors.'warning': Throw on errors and warnings.'suggestion': Throw on errors, warnings and suggestions.'never': Never throw an error.:::warning When running in watch mode, this plugin will print the error instead of throwing it. :::
MIT.
TypeScript
94.1%
CSS
5.1%
Run `publint` to lint npm packages after the build.
22
stars
93
commits
TypeScript
primary language
Sep 8, 2026
updated
Run publint to lint npm packages after the build.
rsbuild-plugin-publint is the perfect partner for Rslib. When building a library, publint helps you to lint the npm package and give suggestions to improve its compatibility with different environments.
Install:
npm add rsbuild-plugin-publint -D
Add plugin to your rslib.config.ts or rsbuild.config.ts:
import { pluginPublint } from 'rsbuild-plugin-publint';
export default {
plugins: [pluginPublint()],
};
Whether to enable publint.
booleantrueFor example, only run publint in the CI environment:
pluginPublint({
enable: Boolean(process.env.CI),
});
Options for publint. See publint - API for more details.
import('publint').Optionsconst defaultOptions = {
pkgDir: api.context.rootPath,
};
pluginPublint({
publintOptions: {
level: 'error',
},
});
Specify when to throw an error based on message severity.
'error' | 'warning' | 'suggestion' | 'never''error'pluginPublint({
throwOn: 'warning',
});
Optional values:
'error': Only throw on errors.'warning': Throw on errors and warnings.'suggestion': Throw on errors, warnings and suggestions.'never': Never throw an error.:::warning When running in watch mode, this plugin will print the error instead of throwing it. :::
MIT.
TypeScript
94.1%
CSS
5.1%