如何从 eslint react/no-unescaped-entities eslintrc 文件中排除某些字符?
How to exclude certain characters from eslint react/no-unescaped-entities eslintrc file?
我正在尝试更新我的 eslintrc 文件以允许使用撇号而不需要使用 '
。
我查看了存储库中的文档,但那里列出的内容似乎没有解释如何允许字符?它只说明如何将更多字符添加到禁止列表中。
谁能告诉我哪里出错了?
"react/no-unescaped-entities": ["error", {"forbid" <I would presume there is an 'allow' option here instead of 'forbid?': ["'"]}],
提前致谢
到目前为止还没有'allow',所以你应该做的是禁止除了撇号之外的所有转义:
"react/no-unescaped-entities": ["error", {"forbid": ['>', '"', '}']}]
希望对您有所帮助。
我正在尝试更新我的 eslintrc 文件以允许使用撇号而不需要使用 '
。
我查看了存储库中的文档,但那里列出的内容似乎没有解释如何允许字符?它只说明如何将更多字符添加到禁止列表中。
谁能告诉我哪里出错了?
"react/no-unescaped-entities": ["error", {"forbid" <I would presume there is an 'allow' option here instead of 'forbid?': ["'"]}],
提前致谢
到目前为止还没有'allow',所以你应该做的是禁止除了撇号之外的所有转义:
"react/no-unescaped-entities": ["error", {"forbid": ['>', '"', '}']}]
希望对您有所帮助。