mirror of
https://github.com/nodejs/node.git
synced 2025-05-05 18:29:06 +00:00

Create tools/update-babel-eslint.sh script and execute it to do the first installation of the package. Update tools/license-builder.sh and execute it to add babel-eslint's license to our LICENSE file. PR-URL: https://github.com/nodejs/node/pull/17820 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
18 lines
472 B
JavaScript
18 lines
472 B
JavaScript
"use strict";
|
|
|
|
module.exports = function(comments) {
|
|
for (var i = 0; i < comments.length; i++) {
|
|
var comment = comments[i];
|
|
if (comment.type === "CommentBlock") {
|
|
comment.type = "Block";
|
|
} else if (comment.type === "CommentLine") {
|
|
comment.type = "Line";
|
|
}
|
|
// sometimes comments don't get ranges computed,
|
|
// even with options.ranges === true
|
|
if (!comment.range) {
|
|
comment.range = [comment.start, comment.end];
|
|
}
|
|
}
|
|
};
|