首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使埃林特不能承诺-执行者-返回?

如何使埃林特不能承诺-执行者-返回?
EN

Stack Overflow用户
提问于 2022-10-11 16:50:04
回答 1查看 191关注 0票数 0

有可能禁用eslint无承诺执行器-返回吗?

我的文件.eslintrc

代码语言:javascript
复制
{
  "env": {
    "es6": true,
    "node": true
  },
  "extends": [
    "airbnb-base"
  ],
  "globals": {
    "describe": true,
    "it": true,
    "expect": true,
    "beforeEach": true
  },
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "ecmaVersion": 2018,
    "sourceType": "module",
    "project": "./tsconfig.json",
    "tsconfigRootDir": "./"
  },
  "plugins": [
    "@typescript-eslint",
    "import"
  ],
  "rules": {
    "import/extensions": [
      "error",
      "ignorePackages",
      {
        "ts": "never"
      }
    ],
    "import/no-duplicates": "off",
    "import/no-promise-executor-return": "off",
    "@typescript/max-classes-per-file": "off",
    "max-classes-per-file": "off",
    "@typescript-eslint/camelcase": "off",
    "@typescript-eslint/no-explicit-any": "off",
    "no-underscore-dangle": "off",
    "import/prefer-default-export": "off",
    "no-plusplus": "off",
    "class-methods-use-this": "off",
    "no-unused-vars": "off",
    "max-len": "off",
    "no-lone-blocks": "off",
    "@typescript-eslint/no-non-null-assertion": "off",
    "no-restricted-syntax": "off",
    "@typescript-eslint/explicit-function-return-type": "off",
    "camelcase": "off",
    "no-undef": "off",
    "no-use-before-define": "off",
    "no-shadow": "off"
  },
  "settings": {
    "import/resolver": {
      "node":{
        "extensions": [".js", ".jsx", ".ts", ".tsx",".d.ts"],
        "moduleDirectory": ["src", "node_modules"]
      },
      "typescript": {}
    }
  }
}

我的错误皮棉

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-10-12 15:54:00

看起来您正在禁用规则import/no-promise-executor-return,这将是来自eslint-plugin-import集的规则。基于eslint的输出,您似乎只想禁用no-promise-executor-return,根据docs,这只是一个基本的eslint规则(https://eslint.org/docs/latest/rules/no-promise-executor-return)。

如果你换掉

代码语言:javascript
复制
"import/no-promise-executor-return": "off",

使用

代码语言:javascript
复制
 "no-promise-executor-return": "off",

这应该会使规则失效。

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

https://stackoverflow.com/questions/74031546

复制
相关文章

相似问题

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