Closed
Description
TypeError: Cannot read property 'match' of undefined at VariableDeclarator (node_modules/eslint-plugin-testing-library/lib/rules/no-manual-cleanup.js:62:66)
This is the only rule that fails in any file. It seems to fail in every file which uses require
imports.
This is the value of node.init.arguments[0]
when it has no value
Node {
type: 'CallExpression',
start: 3230,
end: 3302,
loc: SourceLocation {
start: Position { line: 116, column: 23 },
end: Position { line: 118, column: 6 }
},
range: [ 3230, 3302 ],
callee: Node {
type: 'MemberExpression',
start: 3230,
end: 3242,
loc: SourceLocation { start: [Position], end: [Position] },
range: [ 3230, 3242 ],
object: Node {
type: 'Identifier',
start: 3230,
end: 3237,
loc: [SourceLocation],
range: [Array],
name: 'resolve',
_babelType: 'Identifier',
parent: [Circular]
},
property: Node {
type: 'Identifier',
start: 3238,
end: 3242,
loc: [SourceLocation],
range: [Array],
name: 'sync',
_babelType: 'Identifier',
parent: [Circular]
},
computed: false,
_babelType: 'MemberExpression',
parent: [Circular]
},
arguments: [
Node {
type: 'Literal',
start: 3243,
end: 3255,
loc: [SourceLocation],
range: [Array],
value: 'typescript',
raw: '"typescript"',
_babelType: 'Literal',
parent: [Circular]
},
Node {
type: 'ObjectExpression',
start: 3257,
end: 3301,
loc: [SourceLocation],
range: [Array],
properties: [Array],
extra: [Object],
_babelType: 'ObjectExpression',
parent: [Circular]
}
],
_babelType: 'CallExpression',
parent: Node {
type: 'CallExpression',
start: 3222,
end: 3303,
loc: SourceLocation { start: [Position], end: [Position] },
range: [ 3222, 3303 ],
callee: Node {
type: 'Identifier',
start: 3222,
end: 3229,
loc: [SourceLocation],
range: [Array],
name: 'require',
_babelType: 'Identifier',
parent: [Circular]
},
arguments: [ [Circular] ],
_babelType: 'CallExpression',
parent: Node {
type: 'VariableDeclarator',
start: 3217,
end: 3303,
loc: [SourceLocation],
range: [Array],
id: [Node],
init: [Circular],
_babelType: 'VariableDeclarator',
parent: [Node]
}
}
}