Correct eslint command in lint
script
#2570
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
The
lint
script of the "arduino-ide-extension" package is intended to use the ESLint linter tool to check for problems in all the package's JavaScript and TypeScript code files. It is used by the continuous integration system to validate contributions:arduino-ide/.github/workflows/check-javascript.yml
Lines 84 to 88 in 788017b
Previously, the command invoked
eslint
without any arguments. With the 8.x version of ESLint used by the project, it is necessary to provide a path argument in order to cause it to lint the contents of files (support for linting all files when the argument is omitted was added in 9.0.0). Because that argument was not provided, the script didn't do anything at all and so would return a 0 exit status even if the code had linting rule violations.Change description
Add a
.
path argument to the command invoked by the script. This will cause ESLint to recurse through thearduino-ide-extension
folder and lint the code in all relevant files.Reviewer checklist