# Travis 测试因 eslint 而失败

**URL:** <https://meta.discourse.org/t/travis-tests-failing-due-to-eslint/163268>\
**Category:** Development\
**Created:** [2020 年9 月 7 日 15:27 UTC](https://meta.discourse.org/t/travis-tests-failing-due-to-eslint/163268 "2020-09-07T15:27:41Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
发布日期： [2020 年9 月 7 日 15:27 UTC](https://meta.discourse.org/t/travis-tests-failing-due-to-eslint/163268/1 "2020-09-07T15:27:41Z")

</div>

我有两个插件在 Travis 测试中失败了。看起来它们里面没有任何 ES6 文件，所以 ESLint 觉得被冷落了吗？

```plaintext
运行 linters/prettyfiers
eslint yarn run v1.22.5
$ /var/www/discourse/node_modules/.bin/eslint -v
v6.8.0
Done in 0.32s.
prettier yarn run v1.22.5
$ /var/www/discourse/node_modules/.bin/prettier -v
2.1.1
Done in 0.28s.
[2020-09-07 01:34:21] bundle exec rubocop --parallel plugins/discourse-allow-pm-to-staff
检查 2 个文件
..
已检查 2 个文件，未发现违规
[2020-09-07 01:34:22] bundle exec ruby script/i18n_lint.rb plugins/discourse-allow-pm-to-staff/config/locales/{client,server}.en.yml
[2020-09-07 01:34:23] yarn eslint --global I18n --ext .es6 plugins/discourse-allow-pm-to-staff
yarn run v1.22.5
$ /var/www/discourse/node_modules/.bin/eslint --global I18n --ext .es6 plugins/discourse-allow-pm-to-staff
哎呀！出错了！: (
ESLint: 6.8.0.
未找到匹配模式 "plugins/discourse-allow-pm-to-staff" 的文件。
请检查模式中是否有拼写错误。
错误：命令执行失败，退出代码为 2。
有关此命令的文档，请访问 https://yarnpkg.com/en/docs/cli/run
列出 discourse-allow-pm-to-staff 中的 prettier 违规：

```

> **[Travis CI](https://app.travis-ci.com/github/pfaffman/discourse-allow-pm-to-staff/jobs/724771255)**
>
> Travis CI enables your team to test and ship your apps with confidence. Easily sync your projects with Travis CI and you'll be testing your code in minutes.

---

_[View the full topic](https://meta.discourse.org/t/travis-tests-failing-due-to-eslint/163268)._
