@pnp/cli-microsoft365
Version:
Manage Microsoft 365 and SharePoint Framework projects on any platform
40 lines • 1.02 kB
JavaScript
import { JsonRule } from '../../JsonRule.js';
export class FN004001_CFG_CA_schema extends JsonRule {
constructor(options) {
super();
this.schema = options.schema;
}
get id() {
return 'FN004001';
}
get title() {
return 'copy-assets.json schema';
}
get description() {
return `Update copy-assets.json schema URL`;
}
get resolution() {
return `{
"$schema": "${this.schema}"
}`;
}
get resolutionType() {
return 'json';
}
get severity() {
return 'Required';
}
get file() {
return './config/copy-assets.json';
}
visit(project, findings) {
if (!project.copyAssetsJson) {
return;
}
if (project.copyAssetsJson.$schema !== this.schema) {
const node = this.getAstNodeFromFile(project.copyAssetsJson, '$schema');
this.addFindingWithPosition(findings, node);
}
}
}
//# sourceMappingURL=FN004001_CFG_CA_schema.js.map