繁体   English   中英

无法在 eslint 中为 typescript linting 关闭规则显式函数返回类型

[英]Can not get rule explicit-function-return-type to turn off in eslint for typescript linting

我正在使用:eslint v7.5.0 - 在命令行上运行 Angular 文件 typescript-eslint/eslint-plugin v3.7.0 typescript-eslint/parser v3.7.0。

尽管禁用了规则'@typescript-eslint/explicit-function-return-type': 'off',但我一直收到warning Missing return type on function

在未禁用此规则的情况下,我做错了什么?

module.exports = {
  root: true,
  parser: '@typescript-eslint/parser',
  plugins: ["@typescript-eslint"],
  extends: [
    "plugin:@typescript-eslint/recommended",
  ],
  rules: {
    '@typescript-eslint/explicit-function-return-type': 'off',
  },
};

这实际上是 eslint 和 typescript 的回归。 此处提交的错误报告https://github.com/typescript-eslint/typescript-eslint/issues/2267

暂无
暂无

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

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