简体   繁体   English

属性“parser”是错误的类型(预期为 string/null 但得到了 `["@babel/eslint-parser"]`)

[英]Property "parser" is the wrong type (expected string/null but got `["@babel/eslint-parser"]`)

I'm trying to deploy the backend part of my project onto firebase.我正在尝试将项目的后端部分部署到 firebase 上。 The backend of my project is located in the "functions" directory.我项目的后端位于“功能”目录中。 I locate my functions directory and use the command.我找到我的函数目录并使用命令。 firebase deploy --only functions . firebase deploy --only functions However, I get this error.但是,我收到此错误。 Here is a screenshot of my error:这是我的错误的屏幕截图:

在此处输入图像描述

Here is my .eslintrc.js where the error happens:这是我的.eslintrc.js发生错误的地方:

 module.exports = { root: true, env: { es6: true, node: true, }, extends: [ "eslint:recommended", "google", ], rules: { quotes: ["error", "double"], }, parser: ["@babel/eslint-parser"] };

I'm not sure why I'm receiving this error.我不确定为什么会收到此错误。 Any ideas why this is happening?任何想法为什么会这样? Any help is appreciated.任何帮助表示赞赏。 Thanks in advance:)提前致谢:)

It should be它应该是

parser: "@babel/eslint-parser"解析器:“@babel/eslint-parser”

please refer docs https://www.npmjs.com/package/@babel/eslint-parser请参考文档https://www.npmjs.com/package/@babel/eslint-parser

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM