Bump eslint-plugin-import to avoid vulnerability in dependency
This commit is contained in:
parent
10695e6a20
commit
ed9506bbaf
1660 changed files with 67726 additions and 27926 deletions
5
node_modules/eslint-module-utils/unambiguous.js
generated
vendored
5
node_modules/eslint-module-utils/unambiguous.js
generated
vendored
|
|
@ -1,8 +1,7 @@
|
|||
'use strict';
|
||||
exports.__esModule = true;
|
||||
|
||||
|
||||
const pattern = /(^|;)\s*(export|import)((\s+\w)|(\s*[{*=]))/m;
|
||||
const pattern = /(^|;)\s*(export|import)((\s+\w)|(\s*[{*=]))|import\(/m;
|
||||
/**
|
||||
* detect possible imports/exports without a full parse.
|
||||
*
|
||||
|
|
@ -26,5 +25,5 @@ const unambiguousNodeType = /^(?:(?:Exp|Imp)ort.*Declaration|TSExportAssignment)
|
|||
* @return {Boolean}
|
||||
*/
|
||||
exports.isModule = function isUnambiguousModule(ast) {
|
||||
return ast.body.some(node => unambiguousNodeType.test(node.type));
|
||||
return ast.body && ast.body.some(node => unambiguousNodeType.test(node.type));
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue