3 Star 56 Fork 123

HarmonyOS_Samples/BestPracticeSnippets
关闭

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
code-linter2.json5 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
WX1379483 提交于 2025-05-23 15:22 +08:00 . feat:废弃API修改,添加代码标识
{
"rules": {
"@typescript-eslint/no-restricted-syntax": [
// Alarm level: Enumeration type, supports configuration as error, warn, off
"error",
{
// The selector attribute is mandatory. Configure the syntax to be disabled
// The statements to be restricted can be filtered through a specific DSL. The CallExpression represents the method call expression, and the square brackets behind it are the filtering conditions (determined according to the Node of the syntax tree).
// Among them, callee.oobject.name filters the objects (class, namespace, or module) that call the method based on the specified name, which is "Foo" in the above example
// Callee-propey.name filters the called methods based on the specified name, which is "bar" in the above example
"selector": "CallExpression[callee.object.name='Foo'][callee.property.name='bar']",
// The message attribute is optional, configure the error message to be displayed
"message": "Foo.bar() is not allowed"
}
]
},
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/harmonyos_samples/BestPracticeSnippets.git
git@gitee.com:harmonyos_samples/BestPracticeSnippets.git
harmonyos_samples
BestPracticeSnippets
BestPracticeSnippets
master

搜索帮助