/** * Because of the test infrastructure (PhantomJS) the RegEx can't use the "s" flag (gis vs gi) or named groups */ export interface INamedGroups { name: string; idx: number; } /** * Identifies the checks to apply as part of the es3Check() rollup plugin */ export interface IEs3CheckKeyword { /** * These RegEx's are used to identify the presence of keywords (code) that should not exist (for es3Check()) or * should be attempted to be replaced (es3Poly()). */ funcNames: RegExp[]; /** * When the RegEx identifies a positive match, this is the error message that will be included in the failure. * If you specify "%funcName%" within the error message, this will be replaced with the result of the matching RegEx value */ errorMsg: string; /** * An optional array of strings to match with the id/filename to ignore this check (Used for both check and Poly), * internally this uses indexOf() to provide a partial existence check */ ignoreIds?: string[]; /** * A Set of strings to use for matching funcNames to ignore, this is required because of infra (build) issues * with negative lookbehind, internally this uses indexOf() to provide a partial existence check. */ ignoreFuncMatch?: Array; /** * The prefix added to any reported error, defaults to "Invalid ES3 function" */ errorTitle?: string; } /** * Identifies the checks and replacement values to apply as part of the es3Poly() rollup plugin */ export interface IEs3Keyword extends IEs3CheckKeyword { /** * The RegEx used to match and extract the function details, don't use named groups (?<name>....); the "s" flag or * positive or negative lookbehind (?<=....); (?