UNPKG

eslint-plugin-comment-length

Version:

An ESLint plugin that provides rules that limit the line length of your comments

17 lines (14 loc) 480 B
import { deepCloneValue } from '../../utils/immutable-deep-merge.js'; function mergeComments(a, b, separator = " ") { const newComment = deepCloneValue(a); newComment.value = `${a.value.trim()}${separator}${b.value.trim()}`; if (newComment.loc && b.loc) { newComment.loc.end = b.loc.end; } if (newComment.range && b.range) { newComment.range[1] = b.range[1]; } return newComment; } export { mergeComments }; //# sourceMappingURL=util.merge-comments.js.map