.eslintrc.js linked to @wordpress/scripts may cause "The "path" argument must be of type string. Received type undefined" error #20235
Labels
Needs Testing
Needs further testing to be confirmed.
[Tool] WP Scripts
/packages/scripts
[Type] Bug
An existing feature does not function as intended
Describe the bug
To ensure VSCode is using the same ESLint config as
wp-scripts lint-js
I created a file.eslintrc.js
withThis is working fine unless the project is a sub-project.
To reproduce
Steps to reproduce the behavior:
project
sub-project
sub-project
createpackage.json
withsub-project
create.eslintrc.js
withnpm i
project
in VSCodesub-project
create a filetest.js
withconsole.log( "Hello World" );
In the console of ESLint you should also see this line:
I tracked this down to
gutenberg/packages/scripts/utils/file.js
Line 13 in 95be294
getPackagePath()
is returning undefined.If
sub-project
is directly opened in VS Code the path returned bygetPackagePath()
is/Users/Dominik/Desktop/project/sub-project/package.json
Additional context
Debug log of VS Code
The text was updated successfully, but these errors were encountered: