如何解决无法解决“错误解析错误:意外令牌..”
我正在尝试通过 eslint,但我不断收到这个对我来说没有意义的错误。有什么想法吗?
控制台输出
➜ indb-graphgw-api git:(feat/create-online-order) ✗ docker-compose -f docker-compose.yml -f docker-compose.tests.yml exec graphgw-api-node bash
app@3c189a5907a7:/srv/indb-graphgw-api/current$ npm run check
> graphql-api@1.0.0 check /srv/indb-graphgw-api/current
> $(npm bin)/eslint . && $(npm bin)/editorconfig-checker .
/srv/indb-graphgw-api/current/tests/functional/online/absentee-bids.spec.js
34:18 error Parsing error: Unexpected token ..
✖ 1 problem (1 error,0 warnings)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! graphql-api@1.0.0 check: `$(npm bin)/eslint . && $(npm bin)/editorconfig-checker .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the graphql-api@1.0.0 check script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/app/.npm/_logs/2021-02-22T17_46_10_163Z-debug.log
app@3c189a5907a7:/srv/indb-graphgw-api/current$
所谓的有罪代码(带有 return
的那一行):
function absenteeBidDataBuilder (fieldsToBeReassigned = {}) {
const absenteeBidDataTemplate = {
id: `${Faker.random.number()}`,subscription_id: `${Faker.random.number()}`,amount: Faker.random.number()
};
return { ...absenteeBidDataTemplate,...fieldsToBeReassigned };
}
这与点差运算符有关吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。