From 8bdc42b09cc2be4e4a0385dd897ac0aedc95fa23 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Tue, 21 Jul 2026 02:19:22 -0700 Subject: [PATCH] Sync eslint-ps-standard.mjs --- eslint-ps-standard.mjs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/eslint-ps-standard.mjs b/eslint-ps-standard.mjs index 38c7965cf3..4494a6bfea 100644 --- a/eslint-ps-standard.mjs +++ b/eslint-ps-standard.mjs @@ -188,7 +188,7 @@ export const defaultRules = { "@stylistic/lines-between-class-members": "off", "@stylistic/multiline-ternary": "off", "@stylistic/object-curly-spacing": ["error", "always"], - "@stylistic/indent": ["error", "tab", { "flatTernaryExpressions": true }], + "@stylistic/indent": ["error", "tab", { "flatTernaryExpressions": true, "SwitchCase": 0 }], }; /** @type {NonNullable} */ @@ -332,7 +332,8 @@ export const defaultRulesES3 = { "no-invalid-this": "error", "no-new-wrappers": "error", // Map/Set can be polyfilled but it's nontrivial and it's easier just to use bare objects - "no-restricted-globals": ["error", "Proxy", "Reflect", "Symbol", "WeakSet", "WeakMap", "Set", "Map"], + // fetch can be polyfilled, but our standard is to use $.get or Net as appropriate. + "no-restricted-globals": ["error", "Proxy", "Reflect", "Symbol", "WeakSet", "WeakMap", "Set", "Map", "fetch"], "unicode-bom": "error", }; @@ -345,7 +346,9 @@ export const defaultRulesES3 = { export const defaultRulesES3TSChecked = { ...defaultRulesTSChecked, "radix": "off", - "no-restricted-globals": ["error", "Proxy", "Reflect", "Symbol", "WeakSet", "WeakMap", "Set", "Map"], + // Map/Set can be polyfilled but it's nontrivial and it's easier just to use bare objects + // fetch can be polyfilled, but our standard is to use $.get or Net as appropriate. + "no-restricted-globals": ["error", "Proxy", "Reflect", "Symbol", "WeakSet", "WeakMap", "Set", "Map", "fetch"], "no-restricted-syntax": ["error", "YieldExpression", "AwaitExpression", "BigIntLiteral"], };