首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >ESLint-TypeError-jest给出"ESLint堆栈跟踪: TypeError:无法读取未定义的属性'meta‘“

ESLint-TypeError-jest给出"ESLint堆栈跟踪: TypeError:无法读取未定义的属性'meta‘“
EN

Stack Overflow用户
提问于 2019-05-23 01:46:46
回答 1查看 573关注 0票数 1

在向.eslintrc.js添加jest插件时,我得到以下堆栈错误:

TypeError: Cannot read property 'meta' of undefined

  1. 使用react-native CLI创建新的react本机项目
  2. 安装eslint并在.eslintrc.js

中的插件阵列中运行./node_modules/.bin/eslint --init

  • Install eslint-plugin-jest

  • Add jest

.eslintrc.js

代码语言:javascript
复制
module.exports = {
  env: {
    browser: true,
    es6: true
  },
  extends: ["standard", "plugin:jest/recommended"],
  globals: {
    Atomics: "readonly",
    SharedArrayBuffer: "readonly"
  },
  parserOptions: {
    ecmaFeatures: {
      jsx: true
    },
    ecmaVersion: 2018,
    sourceType: "module"
  },
  plugins: ["react", "jest"],
  rules: {}
};

我预计eslint会选择eslint- plugin -jest插件,但是我得到了

代码语言:javascript
复制
[Error - 18:38:16] ESLint stack trace:
[Error - 18:38:16] TypeError: Cannot read property 'meta' of undefined
    at c.isFunction.H.handled.has.p.getRules.forEach (/home/bob/.vscode/extensions/dbaeumer.vscode-eslint-1.9.0/server/out/eslintServer.js:1:55431)
    at Map.forEach (<anonymous>)
    at /home/bob/.vscode/extensions/dbaeumer.vscode-eslint-1.9.0/server/out/eslintServer.js:1:55413
    at W.E.get.N.then.n (/home/bob/.vscode/extensions/dbaeumer.vscode-eslint-1.9.0/server/out/eslintServer.js:1:55555)
EN

回答 1

Stack Overflow用户

发布于 2019-05-23 03:42:40

这是22.6到22.6.2中的一个临时问题。它现在已经在今天发布的22.6.3中得到了修复。只需要更新包即可。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56262332

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档