@pfaffman reported that two plugins are failing Travis tests due to eslint issues. The problem arises when eslint doesn’t find any files to lint.
@pfaffman jokingly suggested creating an empty .es6 file to satisfy eslint, but later acknowledged that this wasn’t the real solution.
@joffreyjaffeux provided a fix by updating the eslint command to handle cases where no files are found, which was also applied to the rake task. The updated commit is available here.
@pfaffman still experienced issues with another plugin, but @joffreyjaffeux explained that the fix was not yet in the tests-passed branch, which is used by the discourse-plugin-ci script.
So basically new eslint doesn’t like when it doesn’t match anything. I also took the opportunity to simplify the commands, will apply the same to our rake task no worries.
2 files inspected, no offenses detected
[2020-09-10 18:43:13] bundle exec ruby script/i18n_lint.rb plugins/discourse-topic-default-tag/config/locales/{client,server}.en.yml
[2020-09-10 18:43:13] yarn eslint --global I18n --ext .es6 plugins/discourse-topic-default-tag
yarn run v1.22.5
$ /var/www/discourse/node_modules/.bin/eslint --global I18n --ext .es6 plugins/discourse-topic-default-tag
Oops! Something went wrong! :(
ESLint: 6.8.0.
No files matching the pattern "plugins/discourse-topic-default-tag" were found.
Please check for typing mistakes in the pattern.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Listing prettier offenses in discourse-topic-default-tag: