UNPKG

@isentinel/eslint-plugin-comment-length

Version:
11 lines 510 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isCommentOnOwnLine = void 0; function isCommentOnOwnLine(sourceCode, comment) { const previousToken = sourceCode.getTokenBefore(comment); const nextToken = sourceCode.getTokenAfter(comment); return (previousToken?.loc.end.line !== comment.loc?.start.line && nextToken?.loc.start.line !== comment.loc?.end.line); } exports.isCommentOnOwnLine = isCommentOnOwnLine; //# sourceMappingURL=is-on-own-line.js.map