Closed klein0r closed 2 years ago
Sorry, I don't understand the problem. Did eslint not catch something it did after the change?
The issue is, that the workflow executes the default lint command npm run lint
- which has no target / checks no files (missing directory or glob pattern) in the current configuration.
When running npm run lint .
(current dir), the ouput looks like this:
npm run lint .
> iobroker.luftdaten@2.2.4 lint
> eslint --ext .js,.jsx "."
/home/mkleine/ioBroker.luftdaten/main.js
105:28 error Promise executor functions should not be async no-async-promise-executor
got it, thanks!
I've generated a new adapter. After that, the following npm script was added to my package.json:
https://github.com/ioBroker/create-adapter/blob/f82bffb5f86889e7c7f51298f137654007945c34/templates/package.json.ts#L189
The workflow also executes
ioBroker/testing-action-check
with lint flag.https://github.com/ioBroker/create-adapter/blob/f82bffb5f86889e7c7f51298f137654007945c34/templates/_github/workflows/test-and-release.yml.ts#L47-L59
The default lint command is
without additional parameters. See
https://github.com/ioBroker/testing-action-check/blob/eee7d831dda68face4148bd37fd1514ad2c82eaf/action.yml#L21-L23
When running
npm run lint
, no files will be checkedSolution:
lint-command
intest-and-release.yml
(e.g. tonpm run lint .
)lint
command inpackage.json
(e.g. tonpm run lint .
)(tested with eslint 8.6.0)