Skip to content

Commit

Permalink
style(lint): fix no-use-before-define
Browse files Browse the repository at this point in the history
  • Loading branch information
gregswindle committed Feb 16, 2018
1 parent 36eaf52 commit 32769a9
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions lib/crc/crc-responsibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,21 @@ const getComments = (crcClass) => {
));
};

const getPrimaryDescription =
(comments) => get(
comments.find((comment) => !isEmpty(comment.description)),
"description"
);

const getDescriptionFromTags = (comments) => {
const comment = comments.find((cmt) => {
const tags = get(cmt, "tags", []);
return tags.find((tag) => doctrineOpts.descriptions.includes(tag.title));
});
const tags = get(comment, "tags", []);
return get(first(tags), "description");
};

const descriptionFromContext = (context) => {
const cxtComments = get(context, "code.ast.comments", []);
const comments =
Expand Down Expand Up @@ -52,21 +67,6 @@ const setDescription = (crcClass) => {
crcClass.meta.description = getDescription(crcClass);
};

const getDescriptionFromTags = (comments) => {
const comment = comments.find((cmt) => {
const tags = get(cmt, "tags", []);
return tags.find((tag) => doctrineOpts.descriptions.includes(tag.title));
});
const tags = get(comment, "tags", []);
return get(first(tags), "description");
};

const getPrimaryDescription =
(comments) => get(
comments.find((comment) => !isEmpty(comment.description)),
"description"
);

/**
* Evaluates objects for declarations of intent, i.e., responsibility.
*
Expand Down

0 comments on commit 32769a9

Please sign in to comment.