修复ESLint发现的问题:重复定义、无效代码
- recoveries-ui.js:删除较早的 recoveryCardRate(与后一份逐字相同,运行时生效的本就是后一份) - server.js:删除不可达的重复 GET /api/shop-settings 处理与重复的店主校验;删除从未被读取的初始值 - 订单取消/归属表单:去掉每个分支都会覆盖的变量初始值 - 去掉无效转义;测试夹具中的重复键保留实际生效的值 - 浏览器脚本的 no-unused-vars 只检查局部变量(顶层声明为跨文件全局名字) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ac143d73ce
commit
2b9cb825be
13 files changed
+12
-25
No files matched your search
@@ -172,7 +172,7 @@ function refers(value, identity, key = '', depth = 0) {
|
||||
identity.names.has(value)
|
||||
)
|
||||
return true;
|
||||
if (/^[\s]*[\[{]/.test(value)) {
|
||||
if (/^[\s]*[[{]/.test(value)) {
|
||||
try {
|
||||
return refers(JSON.parse(value), identity, key, depth + 1);
|
||||
} catch {}
|
||||
|
||||
Reference in new issue
Block a user