mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-18 21:39:28 +02:00
Added more biome rules
This commit is contained in:
parent
907e3c8208
commit
502c2f0777
20
biome.jsonc
20
biome.jsonc
@ -54,7 +54,7 @@
|
|||||||
"rules": {
|
"rules": {
|
||||||
"recommended": true,
|
"recommended": true,
|
||||||
"correctness": {
|
"correctness": {
|
||||||
"noUndeclaredVariables": "off",
|
"noUndeclaredVariables": "error",
|
||||||
"noUnusedVariables": "error",
|
"noUnusedVariables": "error",
|
||||||
"noSwitchDeclarations": "error",
|
"noSwitchDeclarations": "error",
|
||||||
"noVoidTypeReturn": "error",
|
"noVoidTypeReturn": "error",
|
||||||
@ -67,6 +67,8 @@
|
|||||||
"noPrivateImports": "error"
|
"noPrivateImports": "error"
|
||||||
},
|
},
|
||||||
"style": {
|
"style": {
|
||||||
|
"noDoneCallback": "error",
|
||||||
|
"useForOf": "error',
|
||||||
"useEnumInitializers": "off", // large enums like Moves/Species would make this cumbersome
|
"useEnumInitializers": "off", // large enums like Moves/Species would make this cumbersome
|
||||||
"useBlockStatements": {
|
"useBlockStatements": {
|
||||||
"level": "error",
|
"level": "error",
|
||||||
@ -83,7 +85,7 @@
|
|||||||
"level": "warn",
|
"level": "warn",
|
||||||
"fix": "none"
|
"fix": "none"
|
||||||
},
|
},
|
||||||
"useSingleVarDeclarator": "off",
|
"useSingleVarDeclarator": "warn", // TODO: upgrade to "error"
|
||||||
"useNodejsImportProtocol": "off",
|
"useNodejsImportProtocol": "off",
|
||||||
"useTemplate": "off", // string concatenation is faster: https://stackoverflow.com/questions/29055518/are-es6-template-literals-faster-than-string-concatenation
|
"useTemplate": "off", // string concatenation is faster: https://stackoverflow.com/questions/29055518/are-es6-template-literals-faster-than-string-concatenation
|
||||||
"useAsConstAssertion": "error",
|
"useAsConstAssertion": "error",
|
||||||
@ -110,18 +112,19 @@
|
|||||||
// This can likely be enabled for all non-utils files once these are eventually reworked, but until then we leave it off.
|
// This can likely be enabled for all non-utils files once these are eventually reworked, but until then we leave it off.
|
||||||
"noExplicitAny": "off",
|
"noExplicitAny": "off",
|
||||||
"noAssignInExpressions": "off",
|
"noAssignInExpressions": "off",
|
||||||
"noPrototypeBuiltins": "off",
|
"noPrototypeBuiltins": "off", // TOZO: consider enabling?
|
||||||
"noFallthroughSwitchClause": "error", // Prevents accidental automatic fallthroughs in switch cases (use disable comment if needed)
|
"noFallthroughSwitchClause": "error", // Prevents accidental automatic fallthroughs in switch cases (use disable comment if needed)
|
||||||
"noImplicitAnyLet": "warn", // TODO: Refactor and make this an error
|
"noImplicitAnyLet": "warn", // TODO: Refactor and make this an error
|
||||||
"noRedeclare": "info", // TODO: Refactor and make this an error
|
"noRedeclare": "info", // TODO: Refactor and make this an error
|
||||||
"noGlobalIsNan": "off",
|
"noGlobalIsNan": "error",
|
||||||
"noAsyncPromiseExecutor": "warn", // TODO: Refactor and make this an error
|
"noAsyncPromiseExecutor": "warn", // TODO: Refactor and make this an error
|
||||||
"noVar": "error",
|
"noVar": "error",
|
||||||
"noDocumentCookie": "off" // Firefox has minimal support for the "Cookie Store API"
|
"noDocumentCookie": "off" // Firefox has minimal support for the "Cookie Store API"
|
||||||
},
|
},
|
||||||
"complexity": {
|
"complexity": {
|
||||||
|
"noUselessStringConcat": "error",
|
||||||
"noExcessiveCognitiveComplexity": "info", // TODO: Refactor and make this an error
|
"noExcessiveCognitiveComplexity": "info", // TODO: Refactor and make this an error
|
||||||
"useLiteralKeys": "off",
|
"useLiteralKeys": "off", // TODO: enable?
|
||||||
"noForEach": "off", // Foreach vs for of is not that simple.
|
"noForEach": "off", // Foreach vs for of is not that simple.
|
||||||
"noUselessSwitchCase": "off", // Explicit > Implicit
|
"noUselessSwitchCase": "off", // Explicit > Implicit
|
||||||
"noUselessConstructor": "error",
|
"noUselessConstructor": "error",
|
||||||
@ -132,13 +135,16 @@
|
|||||||
},
|
},
|
||||||
"performance": {
|
"performance": {
|
||||||
"noNamespaceImport": "error",
|
"noNamespaceImport": "error",
|
||||||
"noDelete": "error"
|
"noDelete": "error",
|
||||||
|
"noBarrelFile": "error",
|
||||||
},
|
},
|
||||||
"nursery": {
|
"nursery": {
|
||||||
|
"useSingleJsDocAsterisk": "error",
|
||||||
|
"useUnifiedTypeSignature": "info", // TODO: promote to "error" at some pt
|
||||||
"useAdjacentGetterSetter": "error",
|
"useAdjacentGetterSetter": "error",
|
||||||
"noConstantBinaryExpression": "error",
|
"noConstantBinaryExpression": "error",
|
||||||
"noTsIgnore": "error",
|
"noTsIgnore": "error",
|
||||||
"noAwaitInLoop": "off",
|
"noAwaitInLoop": "off", // we do this a lot
|
||||||
"useJsonImportAttribute": "off", // "Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'. ts(2823)"
|
"useJsonImportAttribute": "off", // "Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'. ts(2823)"
|
||||||
"useIndexOf": "error",
|
"useIndexOf": "error",
|
||||||
"useObjectSpread": "error",
|
"useObjectSpread": "error",
|
||||||
|
Loading…
Reference in New Issue
Block a user