all files / src/rules/ homepage-type.js

100% Statements 14/14
100% Branches 2/2
100% Functions 1/1
100% Lines 14/14
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22               
"use strict";
 
let LintIssue = require("./../LintIssue");
let isString = require("./../validators/type").isString;
const lintId = "homepage-type";
const lintType = "error";
const nodeName = "homepage";
const message = "Type should be a string";
const ruleType = "type";
 
let lint = function(packageJsonData) {
  if (!isString(packageJsonData, nodeName)) {
    return new LintIssue(lintId, lintType, nodeName, message);
  }
 
  return true;
};
 
module.exports.lint = lint;
module.exports.lintType = lintType;
module.exports.ruleType = ruleType;