mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-20 16:42:45 +02:00
* Added changes to markdown files, reworked test boilerplate code + comment fixes * Update comments.md Removed references to jsdoc. Removed mention of @extends which doesn't even exist in tsdoc Increased clarity of documenting `args` parameter. Moved to using active voice instead of passive voice * Fix truncated sentence in returns example * fix create-test-boilerplate.js Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update gameManager.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update comments.md Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update gameManager.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update gameManager.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update gameManager.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update gameManager.ts * Fixed doc thing * Fixed the things Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Fixde boilerplate to use snake case * Update .gitignore to include workspace files * Update linting.md, fix lefthook etc. * Fix tpyo * Update create-test-boilerplate.js Co-authored-by: Dean <69436131+emdeann@users.noreply.github.com> * Update create-test-boilerplate.js Co-authored-by: Dean <69436131+emdeann@users.noreply.github.com> * Update create-test-boilerplate.js Co-authored-by: Dean <69436131+emdeann@users.noreply.github.com> * Reverted boilerplate code fixes and applied review comments Will now be handled by milkmaiden * Fixed up documentation for comments.md and linting.md Comments.md added info pertaining to Kev's review linting.md i just stopped spouting misinformation * Update `biome.jsonc` comments Update `comments.md` Update docs for `AddSubstituteAttr` in `move.ts` to match example * Apply suggestions to the suggestions --------- Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: Dean <69436131+emdeann@users.noreply.github.com>
118 lines
4.6 KiB
Plaintext
118 lines
4.6 KiB
Plaintext
{
|
|
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
|
|
"vcs": {
|
|
"enabled": false,
|
|
"clientKind": "git",
|
|
"useIgnoreFile": true,
|
|
"defaultBranch": "beta"
|
|
},
|
|
"formatter": {
|
|
"enabled": true,
|
|
"useEditorconfig": true,
|
|
"indentStyle": "space",
|
|
"ignore": ["src/enums/*", "src/data/balance/*"],
|
|
"lineWidth": 120
|
|
},
|
|
"files": {
|
|
"ignoreUnknown": true,
|
|
// Adding folders to the ignore list is GREAT for performance because it prevents biome from descending into them
|
|
// and having to verify whether each individual file is ignored
|
|
"ignore": [
|
|
"**/*.d.ts",
|
|
"dist/*",
|
|
"build/*",
|
|
"coverage/*",
|
|
"public/*",
|
|
".github/*",
|
|
"node_modules/*",
|
|
".vscode/*",
|
|
"*.css", // TODO?
|
|
"*.html", // TODO?
|
|
"src/overrides.ts",
|
|
// TODO: these files are too big and complex, ignore them until their respective refactors
|
|
"src/data/moves/move.ts",
|
|
"src/data/abilities/ability.ts",
|
|
"src/field/pokemon.ts",
|
|
|
|
// this file is just too big:
|
|
"src/data/balance/tms.ts"
|
|
]
|
|
},
|
|
|
|
// While it'd be nice to enable consistent sorting, enabling this causes issues due to circular import resolution order
|
|
// TODO: Remove if we ever get down to 0 circular imports
|
|
"organizeImports": { "enabled": false },
|
|
"linter": {
|
|
"ignore": [
|
|
"src/phases/move-effect-phase.ts" // TODO: unignore after move-effect-phase refactor
|
|
],
|
|
"enabled": true,
|
|
"rules": {
|
|
"recommended": true,
|
|
"correctness": {
|
|
"noUndeclaredVariables": "off",
|
|
"noUnusedVariables": "error",
|
|
"noSwitchDeclarations": "warn", // TODO: refactor and make this an error
|
|
"noVoidTypeReturn": "warn", // TODO: Refactor and make this an error
|
|
"noUnusedImports": "error"
|
|
},
|
|
"style": {
|
|
"noVar": "error",
|
|
"useEnumInitializers": "off", // large enums like Moves/Species would make this cumbersome
|
|
"useBlockStatements": "error",
|
|
"useConst": "error",
|
|
"useImportType": "error",
|
|
"noNonNullAssertion": "off", // TODO: Turn this on ASAP and fix all non-null assertions in non-test files
|
|
"noParameterAssign": "off",
|
|
"useExponentiationOperator": "off", // Too typo-prone and easy to mixup with standard multiplication (* vs **)
|
|
"useDefaultParameterLast": "off", // TODO: Fix spots in the codebase where this flag would be triggered, and then enable
|
|
"useSingleVarDeclarator": "off",
|
|
"useNodejsImportProtocol": "off",
|
|
"useTemplate": "off", // string concatenation is faster: https://stackoverflow.com/questions/29055518/are-es6-template-literals-faster-than-string-concatenation
|
|
"noNamespaceImport": "error"
|
|
},
|
|
"suspicious": {
|
|
"noDoubleEquals": "error",
|
|
// While this would be a nice rule to enable, the current structure of the codebase makes this infeasible
|
|
// due to being used for move/ability `args` params and save data-related code.
|
|
// This can likely be enabled for all non-utils files once these are eventually reworked, but until then we leave it off.
|
|
"noExplicitAny": "off",
|
|
"noAssignInExpressions": "off",
|
|
"noPrototypeBuiltins": "off",
|
|
"noFallthroughSwitchClause": "error", // Prevents accidental automatic fallthroughs in switch cases (use disable comment if needed)
|
|
"noImplicitAnyLet": "warn", // TODO: Refactor and make this an error
|
|
"noRedeclare": "info", // TODO: Refactor and make this an error
|
|
"noGlobalIsNan": "off",
|
|
"noAsyncPromiseExecutor": "warn" // TODO: Refactor and make this an error
|
|
},
|
|
"complexity": {
|
|
"noExcessiveCognitiveComplexity": "warn", // TODO: Refactor and make this an error
|
|
"useLiteralKeys": "off",
|
|
"noForEach": "off", // Foreach vs for of is not that simple.
|
|
"noUselessSwitchCase": "off", // Explicit > Implicit
|
|
"noUselessConstructor": "warn", // TODO: Refactor and make this an error
|
|
"noBannedTypes": "warn" // TODO: Refactor and make this an error
|
|
}
|
|
}
|
|
},
|
|
"javascript": {
|
|
"formatter": { "quoteStyle": "double", "arrowParentheses": "asNeeded" }
|
|
},
|
|
"overrides": [
|
|
{
|
|
"include": ["test/**/*.test.ts"],
|
|
"javascript": { "globals": [] },
|
|
"linter": {
|
|
"rules": {
|
|
"performance": {
|
|
"noDelete": "off" // TODO: evaluate if this is necessary for the test(s) to function
|
|
},
|
|
"style": {
|
|
"noNamespaceImport": "off" // this is required for `vi.spyOn` to work in some tests
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|