UNPKG

@atlaskit/eslint-plugin-design-system

Version:

The essential plugin for use with the Atlassian Design System.

7 lines 319 B
/** * 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. */ export function cleanComments(str) { return str.replace(/\/\*([\s\S]*?)\*\//g, '').replace(/\/\/(.*)/g, ''); }