{"id":35474681,"url":"https://github.com/rstackjs/rsbuild-plugin-publint","last_synced_at":"2026-01-27T09:20:47.642Z","repository":{"id":267634480,"uuid":"901764069","full_name":"rstackjs/rsbuild-plugin-publint","owner":"rstackjs","description":"Run `publint` to lint npm packages after the build.","archived":false,"fork":false,"pushed_at":"2026-01-15T03:28:54.000Z","size":93,"stargazers_count":21,"open_issues_count":2,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-01-15T09:37:55.388Z","etag":null,"topics":["npm","rsbuild","rsbuild-plugin","rslib","rspack"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rstackjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-11T09:17:31.000Z","updated_at":"2026-01-15T03:28:57.000Z","dependencies_parsed_at":"2024-12-11T14:40:28.599Z","dependency_job_id":"eb5d769b-e600-46ac-90d2-b7a98fb1b403","html_url":"https://github.com/rstackjs/rsbuild-plugin-publint","commit_stats":null,"previous_names":["rspack-contrib/rsbuild-plugin-publint","rstackjs/rsbuild-plugin-publint"],"tags_count":9,"template":false,"template_full_name":"rstackjs/rsbuild-plugin-template","purl":"pkg:github/rstackjs/rsbuild-plugin-publint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstackjs%2Frsbuild-plugin-publint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstackjs%2Frsbuild-plugin-publint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstackjs%2Frsbuild-plugin-publint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstackjs%2Frsbuild-plugin-publint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rstackjs","download_url":"https://codeload.github.com/rstackjs/rsbuild-plugin-publint/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstackjs%2Frsbuild-plugin-publint/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28810476,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["npm","rsbuild","rsbuild-plugin","rslib","rspack"],"created_at":"2026-01-03T12:00:40.056Z","updated_at":"2026-01-27T09:20:47.615Z","avatar_url":"https://github.com/rstackjs.png","language":"TypeScript","readme":"# rsbuild-plugin-publint\n\nRun [publint](https://github.com/bluwy/publint) to lint npm packages after the build.\n\n\u003cp\u003e\n  \u003ca href=\"https://npmjs.com/package/rsbuild-plugin-publint\"\u003e\n   \u003cimg src=\"https://img.shields.io/npm/v/rsbuild-plugin-publint?style=flat-square\u0026colorA=564341\u0026colorB=EDED91\" alt=\"npm version\" /\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square\u0026colorA=564341\u0026colorB=EDED91\" alt=\"license\" /\u003e\n  \u003ca href=\"https://npmcharts.com/compare/rsbuild-plugin-publint?minimal=true\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/rsbuild-plugin-publint.svg?style=flat-square\u0026colorA=564341\u0026colorB=EDED91\" alt=\"downloads\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Preview\n\n`rsbuild-plugin-publint` is the perfect partner for [Rslib](https://github.com/web-infra-dev/rslib). When building a library, publint helps you to lint the npm package and give suggestions to improve its compatibility with different environments.\n\n![Preview](https://github.com/user-attachments/assets/bb6940df-ab15-4155-bdf5-03b7bae5458f)\n\n## Usage\n\nInstall:\n\n```bash\nnpm add rsbuild-plugin-publint -D\n```\n\nAdd plugin to your `rslib.config.ts` or `rsbuild.config.ts`:\n\n```ts\nimport { pluginPublint } from \"rsbuild-plugin-publint\";\n\nexport default {\n  plugins: [pluginPublint()],\n};\n```\n\n## Options\n\n### enable\n\nWhether to enable publint.\n\n- Type: `boolean`\n- Default: `true`\n\nFor example, only run publint in the CI environment:\n\n```ts\npluginPublint({\n  enable: Boolean(process.env.CI),\n});\n```\n\n### publintOptions\n\nOptions for publint. See [publint - API](https://github.com/bluwy/publint/blob/master/pkg/README.md#api) for more details.\n\n- Type: `import('publint').Options`\n- Default:\n\n```js\nconst defaultOptions = {\n  pkgDir: api.context.rootPath,\n};\n```\n\n- Example:\n\n```js\npluginPublint({\n  publintOptions: {\n    level: \"error\",\n  },\n});\n```\n\n### throwOn\n\nSpecify when to throw an error based on message severity.\n\n- Type: `'error' | 'warning' | 'suggestion' | 'never'`\n- Default: `'error'`\n- Example:\n\n```ts\npluginPublint({\n  throwOn: \"warning\",\n});\n```\n\nOptional values:\n\n- `'error'`: Only throw on errors.\n- `'warning'`: Throw on errors and warnings.\n- `'suggestion'`: Throw on errors, warnings and suggestions.\n- `'never'`: Never throw an error.\n\n:::warning\nWhen running in watch mode, this plugin will print the error instead of throwing it.\n:::\n\n## License\n\n[MIT](./LICENSE).\n","funding_links":[],"categories":["Plugins"],"sub_categories":["Rsbuild Plugins"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frstackjs%2Frsbuild-plugin-publint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frstackjs%2Frsbuild-plugin-publint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frstackjs%2Frsbuild-plugin-publint/lists"}