eslint - 如何从 eslint react/no-unescaped-entities eslintrc 文件中排除某些字符?
问题描述
我正在尝试更新我的 eslintrc 文件以允许撇号而不需要使用'
.
我查看了 repo 中的文档,但那里列出的内容似乎没有解释如何允许一个角色?它仅说明如何将更多字符添加到禁止列表中。
谁能告诉我我哪里出错了?
"react/no-unescaped-entities": ["error", {"forbid" <I would presume there is an 'allow' option here instead of 'forbid?': ["'"]}],
提前致谢
解决方案
到目前为止还没有“允许”,所以你应该做的是禁止除撇号之外的所有转义:
"react/no-unescaped-entities": ["error", {"forbid": ['>', '"', '}']}]
希望能帮助到你。
推荐阅读
- c# - Linq 中的 Sql YEAR(),MONTH()
- expo - Sentry 找不到我的源代码
- lotusscript - LotusScript - AppendDocLink 不在 RichTextItem 中创建 doclink
- android - 更新 gradle 后出现 AAPT 错误
- c# - 入站循环控制变量越界?
- javascript - .addClass 在functions.php中的元素上
- stm32 - STM32 从特定的 NOR 块启动
- c++ - 以编程方式在任何按钮上应用 Qt 鼠标悬停按钮突出显示
- java - Katalon Studio Java jar 文件
- swift - 包含闭包的 Swift 数组