frontend-maven-plugin
frontend-maven-plugin copied to clipboard
npx not finding source files
Using version 1.10.0 - the latest version in Sonatype
Do you want to request a feature or report a bug?
Report a bug
What is the current behavior?
The npx executor executes the eslint node package but does not list any issues to fix. Instead I get back the "no files found" message.
If the current behavior is a bug, please provide the steps to reproduce.
In your pom file add this execution to the executions for frontend-maven-plugin:
<execution>
<id>run eslint</id>
<goals>
<goal>npx</goal>
</goals>
<phase>process-sources</phase>
<configuration>
<arguments>eslint . --ext ts</arguments>
</configuration>
</execution>
What is the expected behavior?
A list of errors found in TypeScript files by eslint that need fixing. That is what is produced if I do this by using the npm goal instead of the npx goal like this:
<execution>
<id>run eslint</id>
<goals>
<goal>npm</goal>
</goals>
<phase>process-sources</phase>
<configuration>
<arguments>run lint</arguments>
</configuration>
</execution>
This runs the following lint script in my package.json file:
"lint": "eslint . --ext ts",
Please mention your frontend-maven-plugin and operating system version.
frontend-maven-plugin version 1.10.0 Windows 7 eslint version ^7.9.0
Hi,
Does eslint . --ext ts
or npm run lint work as expected when run on their own without maven? You could try adding --debug
and post the output.
That being said: The value you provide to the extension parameter looks suspicious to me. I think you are missing a dot there. And the order of the arguments seems to be wrong. The input files should be last parameter. Please refer to this.
You could try this command eslint --ext .ts .
Does that work?