-
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
The dependency checker also includes false positives from comment lines:
this should be better (proposal by github copilot - needs to be testet)
const DEPENDENCY_CAPTURE_PATTERNS = Object.freeze([
// CommonJS require - with const/let/var declaration
/^(?!\s*//)(?!\s*/*)(?!\s**)\s*(?:const|let|var)\s+.=\srequire\s*(\s*"'["']\s*)/gmu,
// ES6 from import - ONLY with import/export keyword
/^(?!\s*//)(?!\s*/*)(?!\s**)\s*(?:import|export)\s+.*\bfrom\s+"'["']/gmu,
// ES6 side-effect import
/^(?!\s*//)(?!\s*/*)(?!\s**)\s*import\s+"'["']/gmu,
// Dynamic import
/^(?!\s*//)(?!\s*/*)(?!\s**)\s*.import\s(\s*"'["']\s*)/gmu
]);
Metadata
Metadata
Assignees
Labels
No labels