Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wkillerud/semantic-release-publint
Run publint as part of the verify step in semantic-release
https://github.com/wkillerud/semantic-release-publint
publint semantic-release semantic-release-plugin
Last synced: about 2 months ago
JSON representation
Run publint as part of the verify step in semantic-release
- Host: GitHub
- URL: https://github.com/wkillerud/semantic-release-publint
- Owner: wkillerud
- License: mit
- Created: 2024-07-25T18:20:50.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-10-01T10:20:00.000Z (3 months ago)
- Last Synced: 2024-10-12T10:29:55.797Z (2 months ago)
- Topics: publint, semantic-release, semantic-release-plugin
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/semantic-release-publint
- Size: 243 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Publint Semantic Release Plugin
This is a plugin for [semantic-release] that runs [publint] as part of the [Verify Conditions step], to help you catch packaging errors before publishing.
By default the plugin will log all lint messages, but only fail verification if there are messages at the `error` level. You can turn on `strict` mode, which treats any `warning` as errors as well.
## Usage
```sh
npm install --save-dev semantic-release-publint
``````js
// release.config.mjs
/**
* @type {Partial}
*/
export default {
plugins: [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/npm",
{
tarballDir: "release",
},
],
[
"semantic-release-publint",
{
strict: true, // optional, to treat warnings as errors
},
],
[
"@semantic-release/github",
{
assets: "release/*.tgz",
},
],
],
branches: ["main"],
};
```## Options
The config is passed to [publint].
```js
{
/**
* Path to your package that contains a package.json file.
* Defaults to `process.cwd()`.
*/
pkgDir: './path/to/package',
/**
* The level of messages to log (default: `'suggestion'`).
* - `suggestion`: logs all messages
* - `warning`: logs only `warning` and `error` messages
* - `error`: logs only `error` messages
*/
level: 'warning',
/**
* Report warnings as errors (default: `false`)
*/
strict: true
}
```## Rules
See the [publint documentation] for an explanation of the different rules and messages.
[semantic-release]: https://github.com/semantic-release
[publint]: https://github.com/bluwy/publint
[Verify Conditions step]: https://github.com/semantic-release/semantic-release?tab=readme-ov-file#release-steps
[publint documentation]: https://publint.dev/rules