| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 1× 1× 1× 1× 1× 1× 1× 5× 4× 1× 1× 1× | 'use strict';
const isLowercase = require('./../validators/format').isLowercase;
const LintIssue = require('./../LintIssue');
const lintId = 'name-format';
const nodeName = 'name';
const message = 'Format should be all lowercase';
const ruleType = 'format';
const lint = function(packageJsonData, lintType) {
if (!isLowercase(packageJsonData, nodeName)) {
return new LintIssue(lintId, lintType, nodeName, message);
}
return true;
};
module.exports.lint = lint;
module.exports.ruleType = ruleType;
|