gitbeaker/scripts/auto-before-commit-changelog-plugin.cjs
2025-11-16 16:45:39 -05:00

22 lines
507 B
JavaScript

/* eslint-disable */
const { execPromise } = require('@auto-it/core');
module.exports = class LintDocsPlugin {
constructor() {
this.name = 'Linting Docs';
}
/**
* Setup the plugin
*
* @param {import('@auto-canary/core').default} auto
*/
apply(auto) {
auto.hooks.beforeCommitChangelog.tapPromise(this.name, async () => {
await execPromise('yarn', ['lint:fix']);
await execPromise('yarn', ['format:fix']);
await execPromise('git', ['add', '.']);
});
}
};