Skip to content

Commit 3f9ae20

Browse files
committed
Rename lint rule
1 parent f57d426 commit 3f9ae20

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

.rtlintrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"@stdlib/_tools/repl-txt/rules/code-return-values": "error",
3+
"@stdlib/_tools/repl-txt/rules/code-semicolons": "error",
4+
"@stdlib/_tools/repl-txt/rules/has-parameters-section": "error",
5+
"@stdlib/_tools/repl-txt/rules/has-alias-signature": "error",
6+
"@stdlib/_tools/repl-txt/rules/line-length": [ "error", 80 ],
7+
"@stdlib/_tools/repl-txt/rules/match-signature": "error",
8+
"@stdlib/_tools/repl-txt/rules/resolvable-aliases": "error",
9+
"@stdlib/_tools/repl-txt/rules/section-order": "error",
10+
"@stdlib/_tools/repl-txt/rules/section-style": "error",
11+
"@stdlib/_tools/repl-txt/rules/see-also": "error",
12+
"@stdlib/_tools/repl-txt/rules/tag-description-style": "error",
13+
"@stdlib/_tools/repl-txt/rules/tag-typedef-typos": "error",
14+
"@stdlib/_tools/repl-txt/rules/whitelisted-sections": "error"
15+
}

lib/node_modules/@stdlib/_tools/repl-txt/rules/has-signature/lib/index.js renamed to lib/node_modules/@stdlib/_tools/repl-txt/rules/has-alias-signature/lib/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,22 @@ var startsWith = require( '@stdlib/string/starts-with' );
2626
// MAIN //
2727

2828
/**
29-
* Rule for enforcing that documentation starts with a proper function signature.
29+
* Rule for enforcing that documentation starts with an alias signature.
3030
*
3131
* @param {Context} context - lint context
3232
* @returns {Object} validators
3333
*/
3434
function main( context ) {
3535
/**
36-
* Checks whether function documentation starts with a proper function signature.
36+
* Checks whether function documentation starts with an alias signature.
3737
*
3838
* @private
3939
* @param {Object} ast - full AST
4040
*/
4141
function hasSignature( ast ) {
4242
var signature = ast.signature;
4343
if ( !signature ) {
44-
context.report( 'REPL documentation must start with function signature', ast );
44+
context.report( 'REPL documentation must start with an alias signature', ast );
4545
}
4646
if ( ast.idx === 0 && !startsWith( signature.raw, '{{alias}}' ) ) {
4747
context.report( 'First function signature must start with `{{alias}}`', ast );

lib/node_modules/@stdlib/_tools/repl-txt/rules/has-signature/package.json renamed to lib/node_modules/@stdlib/_tools/repl-txt/rules/has-alias-signature/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "@stdlib/_tools/repl-txt/rules/has-signature",
2+
"name": "@stdlib/_tools/repl-txt/rules/has-alias-signature",
33
"version": "0.0.0",
4-
"description": "Lint rule to enforce that documentation starts with a proper function signature.",
4+
"description": "Lint rule to enforce that documentation starts with an alias signature.",
55
"license": "Apache-2.0",
66
"author": {
77
"name": "The Stdlib Authors",
@@ -57,6 +57,9 @@
5757
"plugin",
5858
"code",
5959
"function",
60+
"constant",
61+
"alias",
62+
"aliases",
6063
"signature"
6164
]
6265
}

0 commit comments

Comments
 (0)