We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 874106a + b7db9a5 commit 503ca0cCopy full SHA for 503ca0c
rules/file-name.js
@@ -46,7 +46,7 @@ function handleModuleCase(node, context, defaultFilename) {
46
});
47
48
// Check that the definition is an import declaration.
49
- if (variable.defs[0].parent.type !== 'ImportDeclaration') {
+ if (!(variable && variable.defs && variable.defs[0] && variable.defs[0].parent && variable.defs[0].parent.type === 'ImportDeclaration')) {
50
return defaultFilename;
51
}
52
0 commit comments