mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-03-21 17:25:10 -05:00
Mostly this is relevant for `context.tr` tagged lines to be unlimited length.
This commit is contained in:
parent
548f6911e9
commit
d25ab4b4b3
|
|
@ -68,7 +68,7 @@ export const defaultRules = {
|
|||
"@stylistic/max-len": ["warn", {
|
||||
"code": 120, "tabWidth": 0,
|
||||
// DO NOT EDIT DIRECTLY: see bottom of file for source
|
||||
"ignorePattern": "^\\s*(?:\\/\\/ \\s*)?(?:(?:export )?(?:let |const |readonly )?[a-zA-Z0-9_$.]+(?: \\+?=>? )|[a-zA-Z0-9$]+: \\[?|(?:return |throw )?(?:new )?(?:[a-zA-Z0-9$.]+\\()?)?(?:Utils\\.html|(?:this\\.)?(?:room\\.)?tr|\\$\\()?['\"`/]",
|
||||
"ignorePattern": "^\\s*(?:\\/\\/ \\s*)?(?:(?:export )?(?:let |const |readonly )?[a-zA-Z0-9_$.]+(?: \\+?=>? )|[a-zA-Z0-9$]+: \\[?|(?:return |throw )?(?:new )?(?:[a-zA-Z0-9$.]+\\()?)?(?:[A-Za-z0-9.]+|\\$\\()?['\"`/]",
|
||||
}],
|
||||
"prefer-const": ["warn", { "destructuring": "all" }],
|
||||
|
||||
|
|
@ -90,6 +90,7 @@ export const defaultRules = {
|
|||
"no-extend-native": "error",
|
||||
"no-extra-bind": "warn",
|
||||
"no-extra-label": "warn",
|
||||
"no-constant-condition": "warn",
|
||||
"no-eval": "error",
|
||||
"no-implied-eval": "error",
|
||||
"no-inner-declarations": ["error", "functions"],
|
||||
|
|
@ -99,11 +100,10 @@ export const defaultRules = {
|
|||
"no-return-assign": "error",
|
||||
"no-self-compare": "error",
|
||||
"no-sequences": "error",
|
||||
"no-shadow": "error",
|
||||
"no-shadow": "warn",
|
||||
"no-template-curly-in-string": "error",
|
||||
"no-throw-literal": "warn",
|
||||
"no-unmodified-loop-condition": "error",
|
||||
"no-unreachable": "warn",
|
||||
// best way to read first key of object
|
||||
// "no-unreachable-loop": "error",
|
||||
// ternary is used to convert callbacks to Promises
|
||||
|
|
@ -175,6 +175,7 @@ export const defaultRules = {
|
|||
"@stylistic/jsx-one-expression-per-line": "off",
|
||||
"@stylistic/jsx-max-props-per-line": "off",
|
||||
"@stylistic/jsx-function-call-newline": "off",
|
||||
"@stylistic/jsx-child-element-spacing": "error",
|
||||
"no-restricted-syntax": ["error",
|
||||
{ selector: "CallExpression[callee.name='Symbol']", message: "Annoying to serialize, just use a string" },
|
||||
],
|
||||
|
|
@ -269,7 +270,7 @@ export const defaultRulesTSChecked = {
|
|||
// style
|
||||
// =====
|
||||
"@typescript-eslint/no-unnecessary-type-arguments": "error",
|
||||
"@typescript-eslint/restrict-plus-operands": ["warn", {
|
||||
"@typescript-eslint/restrict-plus-operands": ["error", {
|
||||
allowBoolean: false, allowNullish: false, allowNumberAndString: false, allowRegExp: false,
|
||||
}],
|
||||
"@typescript-eslint/restrict-template-expressions": ["error", {
|
||||
|
|
@ -317,7 +318,7 @@ export const defaultRulesES3 = {
|
|||
ignoreRestSiblings: true,
|
||||
}],
|
||||
"no-restricted-syntax": ["error",
|
||||
{ selector: "TaggedTemplateExpression", message: "Hard to compile down to ES3" },
|
||||
{ selector: "TaggedTemplateExpression", message: "Not supported by ES3" },
|
||||
{ selector: "CallExpression[callee.name='Symbol']", message: "Annoying to serialize, just use a string" },
|
||||
],
|
||||
|
||||
|
|
@ -345,7 +346,7 @@ export const defaultRulesES3TSChecked = {
|
|||
...defaultRulesTSChecked,
|
||||
"radix": "off",
|
||||
"no-restricted-globals": ["error", "Proxy", "Reflect", "Symbol", "WeakSet", "WeakMap", "Set", "Map"],
|
||||
"no-restricted-syntax": ["error", "TaggedTemplateExpression", "YieldExpression", "AwaitExpression", "BigIntLiteral"],
|
||||
"no-restricted-syntax": ["error", "YieldExpression", "AwaitExpression", "BigIntLiteral"],
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -423,9 +424,8 @@ SOURCE FOR IGNOREPATTERN (compile with https://regexfree.k55.io/ )
|
|||
)?
|
||||
|
||||
(
|
||||
Utils\.html
|
||||
|
|
||||
(this\.)?(room\.)?tr
|
||||
# tagged template
|
||||
[A-Za-z0-9\.]+
|
||||
|
|
||||
\$\(
|
||||
)?
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user