Sync eslint-ps-standard.mjs

This commit is contained in:
Guangcong Luo 2026-07-21 02:19:22 -07:00
parent 50602f06fc
commit 8bdc42b09c

View file

@ -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<Config['rules']>} */
@ -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"],
};