in rules/component-name.js [32:63]
CallExpression: function(node) {
var prefix = context.options[0];
var convertedPrefix; // convert string from JSON .eslintrc to regex
if (prefix === undefined) {
return;
}
convertedPrefix = utils.convertPrefixToRegex(prefix);
if (utils.isAngularComponentDeclaration(node)) {
var name = node.arguments[0].value;
if (name !== undefined && name.indexOf('ng') === 0) {
context.report(node, 'The {{component}} component should not start with "ng". This is reserved for AngularJS components', {
component: name
});
} else if (name !== undefined && !convertedPrefix.test(name)) {
if (typeof prefix === 'string' && !utils.isStringRegexp(prefix)) {
context.report(node, 'The {{component}} component should be prefixed by {{prefix}}', {
component: name,
prefix: prefix
});
} else {
context.report(node, 'The {{component}} component should follow this pattern: {{prefix}}', {
component: name,
prefix: prefix.toString()
});
}
}
}
}