{"id":16981979,"url":"https://github.com/1602/coding-style-guide","last_synced_at":"2025-07-20T16:03:36.815Z","repository":{"id":12175223,"uuid":"14774439","full_name":"1602/coding-style-guide","owner":"1602","description":null,"archived":false,"fork":false,"pushed_at":"2013-11-29T10:54:32.000Z","size":104,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-21T23:43:00.992Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1602.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-28T10:45:02.000Z","updated_at":"2013-11-29T10:54:32.000Z","dependencies_parsed_at":"2022-08-20T10:00:33.283Z","dependency_job_id":null,"html_url":"https://github.com/1602/coding-style-guide","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/1602/coding-style-guide","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1602%2Fcoding-style-guide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1602%2Fcoding-style-guide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1602%2Fcoding-style-guide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1602%2Fcoding-style-guide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1602","download_url":"https://codeload.github.com/1602/coding-style-guide/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1602%2Fcoding-style-guide/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266152253,"owners_count":23884473,"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-10-14T02:06:59.796Z","updated_at":"2025-07-20T16:03:36.797Z","avatar_url":"https://github.com/1602.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"### Naming\n\n- use camelCase everywhere, except constants which are `UPPER_CASE_WITH_UNDERSCORE`\n- start constructor name with upper case letter\n- do not use short variable names\n\n### Spaces\n\n- operators should be surrounded with spaces\n- anonyous function should not have space between `function` and `(`\n- maned function should have not have space between function name and `(`\n\n### Identation\n\nWe use 4 spaces for identation. No deep identation, i.e. use this way:\n\n```javascrtipt\n    do.something.awesome(function(imdone) {\n        imdone();\n    });\n```\n\ninstead of this\n\n```javascrtipt\n    do.something.awesome(function(imdone) {\n                             imdone();\n                         });\n```\n\n### Callback names\n\nUse `done`, `next`, `callback`, `cb` or `fn` as callback param name.\n\n### Callback context binding, using `self` and `that`\n\nDo not use bind, do not save `this` in `self` or `that` variable. Use meaningful\nvariable name, for example:\n\n```javascrtipt\nListing.prototype.update = function(done) {\n    var listing = this;\n    listing.products.update(function() {\n        listing.update(done);\n    });\n};\n```\n\n### Strings\n\nDo not use `\"`, use `'` for strings.\n\n### Objects, arrays formatting\n\nRight:\n\n```\n[\n    'hello',\n    'world',\n    { foo: 'bar' }\n];\n```\n\nWrong:\n\n[  'hello'\n,  'world'\n,  {   'foo': 'bar'\n   ,   'bar': 'baz'\n   }\n]\n\n### Chaining\n\nDo not indent, start with dot:\n\n```javascrtipt\n$('#element')\n.addClass('active')\n.show();\n```\n\n### Semicolons\n\nUse them\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1602%2Fcoding-style-guide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1602%2Fcoding-style-guide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1602%2Fcoding-style-guide/lists"}