{"id":20863210,"url":"https://github.com/mysterypancake/rule-book","last_synced_at":"2026-01-15T23:09:41.416Z","repository":{"id":162571092,"uuid":"97486264","full_name":"MysteryPancake/Rule-Book","owner":"MysteryPancake","description":"My strict law","archived":false,"fork":false,"pushed_at":"2021-07-06T08:09:13.000Z","size":180,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T15:38:15.279Z","etag":null,"topics":["book","essential","github","guide","law","laws","rule","rules","style","style-guide","styleguide"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MysteryPancake.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-17T14:33:05.000Z","updated_at":"2024-07-15T12:53:00.000Z","dependencies_parsed_at":"2023-06-03T17:30:19.754Z","dependency_job_id":null,"html_url":"https://github.com/MysteryPancake/Rule-Book","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MysteryPancake/Rule-Book","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MysteryPancake%2FRule-Book","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MysteryPancake%2FRule-Book/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MysteryPancake%2FRule-Book/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MysteryPancake%2FRule-Book/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MysteryPancake","download_url":"https://codeload.github.com/MysteryPancake/Rule-Book/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MysteryPancake%2FRule-Book/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28473974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T22:27:41.514Z","status":"ssl_error","status_checked_at":"2026-01-15T21:54:47.910Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["book","essential","github","guide","law","laws","rule","rules","style","style-guide","styleguide"],"created_at":"2024-11-18T05:28:04.855Z","updated_at":"2026-01-15T23:09:41.409Z","avatar_url":"https://github.com/MysteryPancake.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# MysteryPancake's Rule Book\nPlease don't use this rule book. The rules are extremely arbitrary and change all the time.\n\nThis is a journal to help me remain consistent. It also helps me spot and fix common mistakes.\n\n## GitHub\n### Generic\n* Repositories must have `README` files.\n* Editing code directly on this site mustn't occur (too often).\n* Repository names must be capitalized.\n* Repository names must be as short as possible.\n* Repository names must use `-` to separate words.\n* Repository descriptions mustn't include a full stop.\n* Repository descriptions must be as short as possible.\n* Repositories intended for personal use must include an `MIT License` with `MysteryPancake` as the legal name.\n* Repositories intended for external use must include an `Unlicense`.\n* Variables to insert must be named `\u003cVAR\u003e`, not `INSERT_VAR_HERE`.\n* Images in `README` files must be included in the repository, not on an external site.\n* [Commits closing issues must be named `resolved`, `fixes`, or `resolves`, followed by the issue number](https://help.github.com/articles/closing-issues-using-keywords).\n* [Small unused scripts must be added to the Fun repository](https://github.com/MysteryPancake/Fun).\n\n### Garry's Mod\n* Repositories intended for external use must be named `GMod-\u003cAddon-Name\u003e`.\n* Repositories must include the tags `garrys-mod`, `garrysmod`, `garry-mod`, `garrysmod-addon`, `lua`, `addon`, `glua`, `gmod`, and `gmod-lua`.\n* Repositories for Scripted Tools must include the tag `garrysmod-tool`.\n* Repository descriptions must be `\u003cAddon Name\u003e for Garry's Mod`.\n* Repositories must include an addon icon and the associated Photoshop file.\n* Repositories must include a link to the addon.\n* Repository `README` files must use this template:\n```md\n\u003cimg src=\"\u003cICON_PATH\u003e?raw=true\" width=\"75\" align=\"left\"\u003e\n\n# Garry's Mod \u003cAddon Name\u003e\nAll the code for my \u003cAddon Name\u003e addon can be found here, and the actual addon is available [here](\u003cWORKSHOP_LINK\u003e).\n```\n\n### Discord\n* Repositories must include the tags `discord`, `discord-bot`, `discord-js`, `discord-api`, `discordjs`, `discordjs-bot`, `javascript`, `discordjsbot`, `discordapp`, `discordbot`, `nodejs-bot`, `nodejs`, `node-js`, and `bot`.\n* Repositories must include a `Procfile` containing `worker: npm start`.\n* Repository `README` files must include setup instructions.\n* Repository `README` files must include a command list.\n* Repositories must include a bot icon.\n* Repository `package.json` files must use this template:\n```json\n{\n  \"name\": \"\u003cRepository-Name\u003e\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\u003cRepository Description\u003e\",\n  \"main\": \"\u003cSCRIPT_PATH\u003e\",\n  \"engines\": {\n    \"node\": \"10.x\",\n    \"npm\": \"*\"\n  },\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" \u0026\u0026 exit 1\",\n    \"start\": \"node \u003cSCRIPT_PATH\u003e\"\n  },\n  \"keywords\": [\n    \"discord\",\n    \"discord-bot\",\n    \"discord-js\",\n    \"discord-api\",\n    \"discordjs\",\n    \"discordjs-bot\",\n    \"javascript\",\n    \"discordjsbot\",\n    \"discordapp\",\n    \"discordbot\",\n    \"nodejs-bot\",\n    \"nodejs\",\n    \"node-js\",\n    \"bot\"\n  ],\n  \"author\": \"MysteryPancake\",\n  \"license\": \"MIT\",\n  \"dependencies\": {\n    \"discord.js\": \"\u003cVERSION\u003e\"\n  }\n}\n```\n\n### GitHub Pages\n* Repositories must include the tags `github-pages`, `github-page`, `github-io`, `html`, `css`, `javascript`, `github-api`, `website`, `online`, and all website keywords.\n* Website links must have lowercase domains.\n* Website links mustn't have a `/` at the end.\n* Repositories must include a website link.\n\n## Programming\n### Generic\n* Functions with applicable default arguments mustn't be called with the arguments.\n* Generic `string` variables must be named `str`, not `txt`, or `text`.\n* `-foo` and `!foo` must be used to invert variables, not `foo * -1`.\n* Functions with `enum` arguments mustn't be called with raw values.\n* Literal collections must be on a single line unless wrapping.\n* `if` statements must be on a single line unless wrapping.\n* `if bool then` must be used, not `if bool == true then`.\n* Variables mustn't share the names of existing variables.\n* [The last condition of `switch` statements must `break`](https://stackoverflow.com/a/26139061).\n* `return` early from functions containing lots of code.\n* Functions mustn't have unintentional side effects.\n* [`application/xml` must be used, not `text/xml`](https://stackoverflow.com/a/6141983).\n* [`switch` statements mustn't have additional tabs](https://stackoverflow.com/a/3005855).\n* Unused variables must be set as `_`, or removed.\n* `x *= 0.75` must be used, not `x = x - x / 4`.\n* `Clientside` must be used, not `client-side`.\n* `Serverside` must be used, not `server-side`.\n* [Multiplication must be used, not division](https://stackoverflow.com/questions/226465).\n* Powers of two must be used where possible.\n* Triple newlines `\\n\\n\\n` mustn't be used.\n* Validate, sanitize and escape user data.\n* Variable names must be in `camelCase`.\n* [`Generic` must be used, not `general`](https://ell.stackexchange.com/a/16225).\n* No unnecessary variables in loops.\n* `Setup` must be used, not `init`.\n* [Strings must use `\"`, not `'`](https://stackoverflow.com/a/2004178).\n* Errors must be handled safely.\n* No unnecessary `(` or `)`.\n* No unnecessary variables.\n\n### Lua\n* `tbl[ math.random( #tbl ) ]` must be used to get a random value from a table.\n* Sequential tables must be iterated with `ipairs` or a numeric `for` loop.\n* `next( table ) == nil` must be used to check if a string-table is empty.\n* Variables must be `local` unless intended to be globally overridden.\n* `#table == 0` must be used to check if an integer-table is empty.\n* `math.random( 1, n )` must be shortened to `math.random( n )`.\n* Strings in tables must be `tbl.string`, not `tbl[ \"string\" ]`.\n* `math.random() \u003e= 0.5` must be used to get a random boolean.\n* Unused keys and values in loops must be set as `_`.\n* Generic table variables must be named `tbl`.\n* `return end` must be followed by a newline.\n* `not foo` must be used to invert booleans.\n* Tab indentation must be used, not spaces.\n* Tables must be sequential where possible.\n* `return` must be used, not `return nil`.\n* Spaces must be on both sides of `..`.\n* Spacing must be between everything.\n* `local foo = foo` mustn't be used.\n* No unnecessary metamethods.\n* [`module` mustn't be used](https://lua-users.org/wiki/LuaModuleFunctionCritiqued).\n* `select` mustn't be used.\n\n### Garry's Mod\n* `player_manager.AddValidModel( \"Model Name\", \"models/player/model.mdl\" )` must be used to add playermodels.\n* `foo:BoundingRadius()` must be used, not `foo:OBBMins():Distance( foo:OBBMaxs() )`.\n* `tobool( foo:GetInfo( \"bar\" ) )` must be used to check a ConVar as a bool.\n* In `PlayerSay` and `OnPlayerChat`, `text` must be used, not `txt` or `str`.\n* `foo:GetInfo( \"bar\" )` must be used, not `foo:GetInfoNum( \"bar\" )`.\n* [`IsValid( foo )` must be used for validation, not `foo:IsValid()`](https://github.com/MysteryPancake/Rule-Book/issues/4).\n* [`player.GetHumans()` must be used, not `player.GetAll()`](https://wiki.garrysmod.com/page/player/GetHumans).\n* `AddCSLuaFile` mustn't be used for files in `lua/autorun`.\n* [`or`, `and`, `not`, `~=`, `--[[ ]]` and `--` must be used](https://wiki.garrysmod.com/page/Specific_Operators).\n* Generic player variables must be named `ply`, not `pl`.\n* Assume data sent to the server has malicious intent.\n* [`self:GetOwner()` must be used, not `self.Owner`](https://github.com/Facepunch/garrysmod/pull/1417).\n* [`SOLID_OBB` must be used, not `SOLID_BBOX`](https://facepunch.com/showthread.php?t=1548067\u0026p=52780912\u0026viewfull=1#post52780912).\n* Hooks must be added in `lua/autorun` files.\n* `CurTime` must be used for in-game events.\n* `SysTime` must be used for benchmarking.\n* `RealTime` must be used for HUD events.\n* `Panel` must be used, not `DPanel`.\n* [`foo:PhysWake()` must be used](https://wiki.garrysmod.com/page/Entity/PhysWake).\n* `table.Random` mustn't be used.\n* `Material` must be cached.\n* `SENT`s must use this template:\n```lua\nAddCSLuaFile()\n\nENT.Type = \"anim\"\n\nENT.Spawnable = true\nENT.AdminOnly = true\nENT.Editable = false\n\nENT.PrintName = \"Entity Name\"\nENT.Author = \"MysteryPancake\"\nENT.Purpose = \"Entity purpose\"\nENT.Instructions = \"Entity instructions\"\nENT.Category = \"Entity category\"\nENT.RenderGroup = RENDERGROUP_OPAQUE\n```\n\n### XCode\n* The iOS requirement must be kept as low as possible.\n* Projects must include a complete icon set.\n* All build warnings must be enabled.\n* Warnings must be treated as errors.\n\n### Swift\n* Repeating arrays must be `x: [Any] = Array(repeating: n, count: n)`, not `x = [Any](repeating: n, count: n)`.\n* `arc4random_uniform(max - min) + min` must be used to get random numbers in a range.\n* `UserDefaults.standard` must be used to save data such as scores and progress.\n* `arc4random` and `arc4random_uniform` must be used to get random numbers.\n* `.init` mustn't be used when calling functions with specific arguments.\n* Variables must be `private` unless intended to be globally overridden.\n* [Overridable classes must have as many `final` properties as possible](https://stackoverflow.com/questions/35818703).\n* Dictionaries must be `x: [Any: Any] = [:]`, not `x = [Any: Any]()`.\n* `.` must be used when calling functions with specific arguments.\n* Extensions and enums must be used to reduce namespace clutter.\n* `\"String \\(foo)\"` must be used to join variables with strings.\n* Variables must use `get`, `set`, and `didSet` where possible.\n* Variables mustn't be type declared unless they're numbers.\n* Classes must be `final` unless intended to be overridden.\n* Generic `SKAction.wait` variables must be named `delay`.\n* `struct` must be used, not `class`, where possible.\n* Variables mustn't be above the level of `internal`.\n* Arrays must be `x: [Any] = []`, not `x = [Any]()`.\n* `Array` and `Dictionary` must be used, not `Set`.\n* Double space indentation must be used, not tabs.\n* `let` must be used unless `var` is essential.\n* Ranges in `for` loops mustn't include spaces.\n* `===` and `!==` must be used where possible.\n* Unnecessary libraries mustn't be imported.\n* `\u0026\u0026` must be used unless `,` is essential.\n* `?` and `!` variables mustn't be used.\n* Unused pointers must be set as `nil`.\n* `DispatchQueue` mustn't be used.\n* A newline mustn't be before `}`.\n* [`SKShapeNode` mustn't be used](http://sartak.org/2014/03/skshapenode-you-are-dead-to-me.html).\n* [`Int` must be used, not `UInt`](https://stackoverflow.com/questions/24180630).\n* `\u0026` must be used for pointers.\n\n### C++\n[Classes must be indented like this](https://stackoverflow.com/a/4960434):\n```cpp\nclass Person\n{\nprivate:\n\tstring name;\npublic:\n\tvoid setName(string);\n};\n```\n* [`'\\n'` must be used, not `std::endl`](https://stackoverflow.com/a/213977).\n\n### HTML\n[This template](https://validator.w3.org) [must be used](https://gethead.info):\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\t\u003chead\u003e\n\t\t\u003cmeta charset=\"utf-8\"\u003e\n\t\t\u003ctitle\u003e\u003cRepository Name\u003e\u003c/title\u003e\n\t\t\u003cmeta name=\"description\" content=\"\u003cRepository Description\u003e\"\u003e\n\t\t\u003cmeta name=\"keywords\" content=\"\u003cRepository, Key, Words\u003e\"\u003e\n\t\t\u003cmeta property=\"og:title\" content=\"\u003cRepository Title\u003e\"\u003e\n\t\t\u003cmeta property=\"og:type\" content=\"website\"\u003e\n\t\t\u003cmeta property=\"og:url\" content=\"\u003cWEBSITE_URL\u003e\"\u003e\n\t\t\u003cmeta property=\"og:image\" content=\"\u003cICON_PATH\u003e\"\u003e\n\t\t\u003cmeta property=\"og:site_name\" content=\"\u003cRepository Title\u003e\"\u003e\n\t\t\u003cmeta property=\"og:description\" content=\"\u003cRepository Description\u003e\"\u003e\n\t\t\u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\"\u003e\n\t\t\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"style.css\"\u003e\n\t\t\u003cscript src=\"script.js\"\u003e\u003c/script\u003e\n\t\u003c/head\u003e\n\t\u003cbody\u003e\n\t\t\u003cspan\u003eContent\u003c/span\u003e\n\t\u003c/body\u003e\n\u003c/html\u003e\n```\n* [CSS must be used for sizing iframes, not `\u003ciframe width=\u003cWIDTH\u003e height=\u003cHEIGHT\u003e`](https://benmarshall.me/responsive-iframes).\n* [`\u003cscript\u003e` must be used, not `\u003cscript type=\"text/javascript\"\u003e`](https://stackoverflow.com/a/4243934).\n* [`\u003cstyle\u003e` must be used, not `\u003cstyle type=\"text/css\"\u003e`](https://forum.webflow.com/t/style-vs-style-type-text-css/10685/2).\n* [`async` and `defer` must be used carefully](https://stackoverflow.com/a/44443936).\n* [Attributes must be quoted](https://stackoverflow.com/a/6495345).\n* Alphabetize keywords.\n\n### CSS\n* [`font-size: small` and `font-size: large` must be used, not `font-size: smaller` or `font-size:larger`](https://www.w3schools.com/cssref/pr_font_font-size.asp).\n* [`-moz-user-select: none` must be used alongside `user-select: none`](https://developer.mozilla.org/en-US/docs/Web/CSS/user-select).\n* [Box shadows must be used for inset borders](https://stackoverflow.com/a/8452798).\n* [Hex colors must be lowercase](https://google.github.io/styleguide/htmlcssguide.html#Capitalization).\n* [Use `outline: none` sparingly](http://www.outlinenone.com).\n* Alphabetize declarations.\n\n### JavaScript\n* [`encodeURIComponent` and `decodeURIComponent` must be used, not `encodeURI` or `decodeURI`](https://stackoverflow.com/a/747700).\n* [`haystack.indexOf(needle) !== -1;` must be used to check if a string contains a substring](https://jsperf.com/exec-vs-match-vs-test-vs-search).\n* [`.split(\"str\")[0]` must be used to get text before a string, not `.split(\"str\").shift()`](https://stackoverflow.com/a/33437745).\n* `foo += bar` and `foo -= bar` must be used, not `foo = foo + bar` or `foo = foo - bar`.\n* [`window.innerWidth` and `window.innerHeight` must be used to get the document size](https://www.w3schools.com/jsref/prop_win_innerheight.asp).\n* JavaScript names mustn't be used in objects: `{ \"false\": true }[false] -\u003e true`\n* `.catch(console.error)` is preferred over `.catch(e =\u003e console.error(e))`.\n* `foo++` and `foo--` must be used, not `foo += 1` or `foo -= 1`.\n* [`responseText` and `responseXML` must be used, not `response`](https://stackoverflow.com/a/46751655).\n* [`console.error` must be used to log errors, not `console.log`](https://stackoverflow.com/a/25532848).\n* [`onmousedown` must be used instead of `onclick` where possible](https://hackernoon.com/instant-actions-onmousedown-vs-onclick-37f20b00eaf0).\n* [`Math.log2(x)` must be used, not `Math.log(x) / Math.log(2)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log2).\n* [`str.replace(/\\.[^/.]+$/, \"\")` must be used to get a file name](https://stackoverflow.com/a/4250408).\n* [`fetch` must be used for newer websites, not `XMLHttpRequest`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch).\n* [`str.split(\".\").pop()` must be used to get a file extension](https://stackoverflow.com/a/190878).\n* [`string.charAt` must be used to get a character in a string](https://stackoverflow.com/a/3427148).\n* [`textContent` must be used, unless `innerHTML` is essential](https://stackoverflow.com/a/21311670).\n* `bool ? foo : bar` must be used, not `bool \u0026\u0026 foo || bar`.\n* `window.` must be before `window` methods and properties.\n* Global variables must be declared at the top of the script.\n* [`style.display = none` must be used, not `removeChild`](https://stackoverflow.com/a/2457637).\n* [`parseInt` and `parseFloat` must be used, not `Number`](https://stackoverflow.com/a/1133780).\n* [Function arguments must have spacing `(like, this)`](https://github.com/airbnb/javascript).\n* [`parentNode` must be used, not `parentElement`](https://stackoverflow.com/a/8685780).\n* [`textContent` must be used, not `innerText`](https://stackoverflow.com/a/35213204).\n* [`const` must be used for arrays and objects](https://mathiasbynens.be/notes/es6-const).\n* [Objects must have spacing `{ like: this }`](https://github.com/airbnb/javascript).\n* [Asynchronous callbacks must use promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#Guarantees).\n* [`childNodes` must be used, not `children`](https://stackoverflow.com/a/7935719).\n* [Canvas contexts must have alpha disabled](https://webglfundamentals.org/webgl/lessons/webgl-and-alpha.html).\n* [`\u0026\u0026`, `!`, and `||` must be used carefully](https://github.com/airbnb/javascript/pull/590).\n* [`.toString()` must be used, not `String`](https://stackoverflow.com/a/5765406).\n* [`\"property\" in window` mustn't be used](http://2ality.com/2013/09/window.html).\n* [`XMLHttpRequest` must be asynchronous](https://blogs.msdn.microsoft.com/wer/2011/08/03/why-you-should-use-xmlhttprequest-asynchronously).\n* [`keydown` must be used, not `keypress`](https://www.mutuallyhuman.com/blog/keydown-is-the-only-keyboard-event-we-need).\n* [`wheel` must be used, not `mousewheel`](https://developer.mozilla.org/en-US/docs/Web/Events/mousewheel).\n* [`initial` must be used, not `origin`](https://www.w3schools.com/jsref/prop_loc_origin.asp).\n* [`for` must be used, not `forEach`](https://coderwall.com/p/kvzbpa/don-t-use-array-foreach-use-for-instead).\n* [Constructors must be capitalized](https://stackoverflow.com/a/1564489).\n* `Object.keys()` mustn't be used.\n* [No use before define](https://eslint.org/docs/rules/no-use-before-define).\n* [`;` must be used](https://stackoverflow.com/a/444082).\n* [This must be used to remove an element from an array](https://stackoverflow.com/a/5767357):\n```\nvar index = array.indexOf(foo);\nif (index !== -1) {\n\tarray.splice(index, 1);\n}\n```\n\n### Unity\n* Class functions must be sorted by `Awake`, `Start`, `Update`, `FixedUpdate`, `OnCollisionEnter`, `OnCollisionStay`, `OnCollisionExit`, `OnTriggerEnter`, `OnTriggerStay`, `OnTriggerExit`, and `OnBecameInvisible`.\n* [`rigid2D.simulated = false` must be used to disable a `Rigidbody2D`, not `isKinematic = true`, or `Sleep()`](https://docs.unity3d.com/ScriptReference/Rigidbody2D-simulated.html).\n* [`localPosition`, `localRotation`, and `localScale` must be used, unless `position` or `rotation` are essential](https://twitter.com/devangerist/status/1069501290026287104).\n* For 2D games, `Vector2` must be used where possible, unless `Vector3` is essential.\n* Class variables must be sorted by `internal`, `public`, then `private`.\n* Variables not intended to be set in the editor must be `internal`.\n* Class functions must be sorted by accessibility levels.\n* [`sqrMagnitude` must be used when comparing vectors](https://docs.unity3d.com/ScriptReference/Vector2-sqrMagnitude.html).\n* [`override` must be placed after the access modifier](https://unity3d.com/learn/tutorials/topics/scripting/overriding).\n* [`Time.time \u003e last` must only be used for delays](https://answers.unity.com/questions/890258/have-a-delay-after-each-jump-so-user-cant-spam-jum.html).\n* [String switches must be used, not enum switches](https://stackoverflow.com/a/1947901).\n* [`Awake` must be used, unless `Start` is essential](https://answers.unity.com/questions/382658/use-of-awake-vs-start.html).\n* [`Time.deltaTime` must only be used for timers](https://answers.unity.com/questions/225213/c-countdown-timer.html).\n* [`StartCoroutine`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.StartCoroutine.html) must be used, not [`Invoke`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.Invoke.html).\n* `int` must be used, unless `float` is essential.\n* [Animation layers must be used, not animators](https://docs.unity3d.com/Manual/AnimationLayers.html).\n* [`StartsWith` and `EndsWith` mustn't be used](https://docs.unity3d.com/Manual/BestPracticeUnderstandingPerformanceInUnity5.html).\n* [Variables must be as inaccessible as possible](https://stackoverflow.com/a/1295997).\n* [Variables must be `private` where possible](https://stackoverflow.com/a/7385005).\n* Animations mustn't affect enabled states.\n* [`for` must be used, not `foreach`](https://forum.unity.com/threads/is-foreach-still-bad-for-performance.434782/).\n* [Floats must be followed by `f`](https://stackoverflow.com/a/11590321).\n* [`GetComponent` must be cached](https://unity3d.com/learn/tutorials/topics/performance-optimization/optimizing-scripts-unity-games).\n* [Coroutines must be cached](https://twitter.com/bivolt_studio/status/1066695127995990016).\n\n### GitHub Pages\n* `window.alert` must be used for important errors, not `console.warn` or `console.log`.\n* [Strings must be concatenated with `\"foo\" + bar`, not `\"foo${bar}\"`](https://stackoverflow.com/a/16124072).\n* [Always `\"use strict\";`](https://stackoverflow.com/a/1335881).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmysterypancake%2Frule-book","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmysterypancake%2Frule-book","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmysterypancake%2Frule-book/lists"}