首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >@类型记录-eslint/命名-约定中断衬里

@类型记录-eslint/命名-约定中断衬里
EN

Stack Overflow用户
提问于 2021-12-20 01:45:31
回答 1查看 181关注 0票数 0

因此,如果不使用函数参数,我希望允许对它们进行_

我编辑了我的回避规则:

"@typescript-eslint/naming-convention"

使用

代码语言:javascript
复制
          {
            "selector": "parameter",
            "modifiers": ["unused"],
            "trailingUnderscore": "require"
          },
    ```

Following the guide 


https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/naming-convention.md#individual-selectors

This sould work, but I get the following error :
代码语言:javascript
复制
    Value {"selector":"parameter","modifiers":["unused"],"trailingUnderscore":"require"} should have required property 'format'.
    Value {"selector":"parameter","modifiers":["unused"],"trailingUnderscore":"require"} should match exactly one schema in oneOf.
代码语言:javascript
复制
EN

回答 1

Stack Overflow用户

发布于 2022-02-07 17:32:50

必须将规则的format属性作为数组或空值包括在内,例如:

代码语言:javascript
复制
{
    "format": null,
    "selector": "parameter",
    "modifiers": ["unused"],
    "trailingUnderscore": "require"
}

或者:

代码语言:javascript
复制
{
    "format": ["PascalCase"],
    ...
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70416658

复制
相关文章

相似问题

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