File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -41,10 +41,15 @@ function gatherImported() {
41
41
42
42
for ( const { imports} of dependencyGraph . values ( ) ) {
43
43
for ( const [ importedFilename , importedIdentifiers ] of imports ) {
44
- filenames . add ( importedFilename )
44
+ // require.resolve will expand any symlinks to their fully qualified
45
+ // directories. We can use this (with the absolute path given in
46
+ // importedFilename to quickly expand symlinks, which allows us to have
47
+ // symlinks (aka workspaces) in node_modules, and not fail the lint.
48
+ const fullyQualifiedImportedFilename = require . resolve ( importedFilename )
49
+ filenames . add ( fullyQualifiedImportedFilename )
45
50
46
51
for ( const importedIdentifier of importedIdentifiers ) {
47
- identifiers . add ( `${ importedFilename } #${ importedIdentifier } ` )
52
+ identifiers . add ( `${ fullyQualifiedImportedFilename } #${ importedIdentifier } ` )
48
53
}
49
54
}
50
55
}
You can’t perform that action at this time.
0 commit comments