{"id":20810214,"url":"https://github.com/sencha/code-guidelines","last_synced_at":"2025-12-25T16:26:49.920Z","repository":{"id":22312809,"uuid":"25647961","full_name":"sencha/code-guidelines","owner":"sencha","description":"Code Style Guidelines for JavaScript","archived":false,"fork":false,"pushed_at":"2018-09-13T23:30:31.000Z","size":70,"stargazers_count":122,"open_issues_count":0,"forks_count":28,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-01-18T14:29:31.500Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sencha.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}},"created_at":"2014-10-23T16:56:00.000Z","updated_at":"2024-12-06T08:08:15.000Z","dependencies_parsed_at":"2022-08-20T10:50:46.111Z","dependency_job_id":null,"html_url":"https://github.com/sencha/code-guidelines","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sencha%2Fcode-guidelines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sencha%2Fcode-guidelines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sencha%2Fcode-guidelines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sencha%2Fcode-guidelines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sencha","download_url":"https://codeload.github.com/sencha/code-guidelines/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243158482,"owners_count":20245656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-17T20:21:06.170Z","updated_at":"2025-12-25T16:26:44.882Z","avatar_url":"https://github.com/sencha.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"right\"\u003e\n  \u003ca href=\"README.md\"\u003e\u003cimg alt=\"English (US)\" title=\"English (US)\" src=\"https://raw.githubusercontent.com/sencha/flags/master/png/256/US.png\" height=\"18\"\u003e\u003c/a\u003e\n  \u003ca href=\"ja/README.md\"\u003e\u003cimg alt=\"Japanese\" title=\"Japanese\" src=\"https://raw.githubusercontent.com/sencha/flags/master/png/256/JP.png\" height=\"18\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n# Sencha's Guide to JavaScript Style and Best Practices\n\nThe following document contains a series of best practices and recommendations for building enterprise web applications \nwith JavaScript and HTML5. \n\nMuch of this advice is used internally at Sencha and certainly applies to building applications with the Sencha \nframeworks -- but this JavaScript style guide can also help teams building applications with any framework, or \neven just vanilla JavaScript.\n\n## Mission Statement\n\nSencha firmly believes that high quality JavaScript is above all else consistent, and addresses four main pillars:\n\n  - **Readability:** JavaScript code should be clear and easy to understand at first glance\n  - **Maintainability:** JavaScript code should be consistent and cohesive\n  - **Error Prevention:** JavaScript code should strategically avoid common problems\n  - **Performance:** JavaScript code should always consider faster implementations\n\nThis style guide will attempt to provide some ground rules for building enterprise web applications with JavaScript and \nHTML5, and as such is intended primarily for medium-to-large development teams. \n\nThese recommendations are based on our own experiences, as well as direct interaction with our enterprise customers.\n\n## Dogma vs Doctrine\n\nAvoid obsessing about code style -- this document is merely a guide, not infallible dogma. It is not intended to be a \ncomprehensive list of all \"best practices\", but rather a list of the most common areas on which people ask our \nopinions. Many others have created [similar documents](Resources.md) and clearly not everyone agrees on every point. \n\nThe overall goal for this document is to help you evaluate what we consider to be the important aspects of \"quality\" \ncode, and ultimately create your own readable, maintainable and scalable JavaScript projects. Our suggestions stand as \na baseline from which your teams should implement your own strategy for building a high quality JavaScript codebase. \n\n# Outline\n\nTo best articulate Sencha's experience building both frameworks and enterprise applications, we will divide this \ndiscussion into four parts:\n\n  1. [Readability](Readable_JavaScript.md)\n  2. [Maintainability](Maintainable_JavaScript.md)\n  3. [Preventing Errors](Preventing_JavaScript_Errors.md)\n  4. [Performance](JavaScript_Performance.md)\n\nIt is worth noting that many of the points we will cover might fit into more than one of these pillars. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsencha%2Fcode-guidelines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsencha%2Fcode-guidelines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsencha%2Fcode-guidelines/lists"}