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