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.
1 parent 7739546 commit b7db9a5Copy full SHA for b7db9a5
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