Skip to content

Commit f8306b4

Browse files
committed
Reorder function declarations
1 parent 11b8104 commit f8306b4

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

  • lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-leading-description-sentence/lib

lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-leading-description-sentence/lib/main.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,12 @@ var DOPTS = {
2828
function main( context ) {
2929
var source = context.getSourceCode();
3030

31-
/**
32-
* Reports the error message.
33-
*
34-
* @private
35-
* @param {Object} loc - lines of code (object with `start` and `end` properties)
36-
*/
37-
function report( loc ) {
38-
context.report({
39-
'node': null,
40-
'message': 'Description must start with an uppercase letter and end with a period',
41-
'loc': loc
42-
});
43-
} // end FUNCTION report()
31+
return {
32+
'FunctionExpression:exit': validate,
33+
'FunctionDeclaration:exit': validate,
34+
'VariableDeclaration:exit': validate,
35+
'ExpressionStatement:exit': validate
36+
};
4437

4538
/**
4639
* Checks whether JSDoc comments have a capitalized description that ends with a period.
@@ -73,12 +66,19 @@ function main( context ) {
7366
}
7467
} // end FUNCTION validate()
7568

76-
return {
77-
'FunctionExpression:exit': validate,
78-
'FunctionDeclaration:exit': validate,
79-
'VariableDeclaration:exit': validate,
80-
'ExpressionStatement:exit': validate
81-
};
69+
/**
70+
* Reports the error message.
71+
*
72+
* @private
73+
* @param {Object} loc - lines of code (object with `start` and `end` properties)
74+
*/
75+
function report( loc ) {
76+
context.report({
77+
'node': null,
78+
'message': 'Description must start with an uppercase letter and end with a period',
79+
'loc': loc
80+
});
81+
} // end FUNCTION report()
8282
} // end FUNCTION main()
8383

8484

0 commit comments

Comments
 (0)