feat(format): Enhance format module with rollback, diff reporting, and improved parallel execution
This commit is contained in:
22
ts/mod_format/formatters/readme.formatter.ts
Normal file
22
ts/mod_format/formatters/readme.formatter.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { BaseFormatter } from '../classes.baseformatter.js';
|
||||
import type { IPlannedChange } from '../interfaces.format.js';
|
||||
import * as formatReadme from '../format.readme.js';
|
||||
|
||||
export class ReadmeFormatter extends BaseFormatter {
|
||||
get name(): string {
|
||||
return 'readme';
|
||||
}
|
||||
|
||||
async analyze(): Promise<IPlannedChange[]> {
|
||||
return [{
|
||||
type: 'modify',
|
||||
path: 'readme.md',
|
||||
module: this.name,
|
||||
description: 'Ensure readme files exist'
|
||||
}];
|
||||
}
|
||||
|
||||
async applyChange(change: IPlannedChange): Promise<void> {
|
||||
await formatReadme.run();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user