@atlaskit/eslint-plugin-design-system
Version:
The essential plugin for use with the Atlassian Design System.
13 lines (12 loc) • 431 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.cleanComments = cleanComments;
/**
* Function that removes JS comments from a string of code,
* sometimes makers will have single or multiline comments in their tagged template literals styles, this can mess with our parsing logic.
*/
function cleanComments(str) {
return str.replace(/\/\*([\s\S]*?)\*\//g, '').replace(/\/\/(.*)/g, '');
}