Skip to content

Commit

Permalink
build(aio): implement rules to prevent short parameter names (angular…
Browse files Browse the repository at this point in the history
  • Loading branch information
petebacondarwin authored and wKoza committed Apr 13, 2018
1 parent 374a2cb commit 6dbd3c3
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions aio/tools/transforms/angular-api-package/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,16 @@ module.exports = new Package('angular-api', [basePackage, typeScriptPackage])
})

.config(function(checkContentRules, EXPORT_DOC_TYPES) {
const createNoMarkdownHeadings = require('./content-rules/noMarkdownHeadings');
const noMarkdownHeadings = createNoMarkdownHeadings();
const allowOnlyLevel3Headings = createNoMarkdownHeadings(1, 2, '4,');
// Min length rules
const createMinLengthRule = require('./content-rules/minLength');
const paramRuleSet = checkContentRules.docTypeRules['parameter'] = checkContentRules.docTypeRules['parameter'] || {};
const paramRules = paramRuleSet['name'] = paramRuleSet['name'] || [];
paramRules.push(createMinLengthRule());

// Heading rules
const createNoMarkdownHeadingsRule = require('./content-rules/noMarkdownHeadings');
const noMarkdownHeadings = createNoMarkdownHeadingsRule();
const allowOnlyLevel3Headings = createNoMarkdownHeadingsRule(1, 2, '4,');
const DOC_TYPES_TO_CHECK = EXPORT_DOC_TYPES.concat(['member', 'overload-info']);
const PROPS_TO_CHECK = ['description', 'shortDescription'];

Expand Down

0 comments on commit 6dbd3c3

Please sign in to comment.