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() {
4141
4242 for ( const { imports} of dependencyGraph . values ( ) ) {
4343 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 )
4550
4651 for ( const importedIdentifier of importedIdentifiers ) {
47- identifiers . add ( `${ importedFilename } #${ importedIdentifier } ` )
52+ identifiers . add ( `${ fullyQualifiedImportedFilename } #${ importedIdentifier } ` )
4853 }
4954 }
5055 }
You can’t perform that action at this time.
0 commit comments