{"id":15290728,"url":"https://github.com/goodbyteco/styleguide","last_synced_at":"2026-02-03T14:33:53.233Z","repository":{"id":47266060,"uuid":"397768081","full_name":"GoodbyteCo/Styleguide","owner":"GoodbyteCo","description":"Linters that define and enforce the code styleguide for Goodbyte projects.","archived":false,"fork":false,"pushed_at":"2022-10-22T19:20:55.000Z","size":299,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-27T19:01:01.158Z","etag":null,"topics":["configuration","eslint-config","standards","styleguide","stylelint-config"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GoodbyteCo.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":"2021-08-19T00:18:55.000Z","updated_at":"2022-03-06T02:15:31.000Z","dependencies_parsed_at":"2023-01-20T10:33:29.249Z","dependency_job_id":null,"html_url":"https://github.com/GoodbyteCo/Styleguide","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GoodbyteCo/Styleguide","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoodbyteCo%2FStyleguide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoodbyteCo%2FStyleguide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoodbyteCo%2FStyleguide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoodbyteCo%2FStyleguide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GoodbyteCo","download_url":"https://codeload.github.com/GoodbyteCo/Styleguide/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoodbyteCo%2FStyleguide/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262773585,"owners_count":23362151,"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":["configuration","eslint-config","standards","styleguide","stylelint-config"],"created_at":"2024-09-30T16:09:13.071Z","updated_at":"2026-02-03T14:33:53.189Z","avatar_url":"https://github.com/GoodbyteCo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Goodbyte Styleguide\n\n[ [Usage](#usage) ]\n[ [Contributing](#contributing) ]\n[ [Rational](#rational) ]\n\nThe Styleguide is a set of formatting choices made to ensure our codebase is easy\nto read, easy to contribute to, and above all, consistent with itself. This style\nis defined and enforced by the linter configurations in this repository. These rules\nare not set in stone, and if you find that the linter is suggesting something you\nfind _less_ readable, please feel free to request a change to the rules (see: \n_[Contributing](#contributing)_).\n\n## Usage\n\nIt is recommended that you install the [ESLint](https://eslint.org),\n[Stylelint](https://stylelint.io), and [Textlint](https://textlint.github.io) plugins\navailable for your IDE, and configure it to autoformat on save. For Visual Studio\nCode, you can find them in the extension marketplace: \n[ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint),\n[Stylelint](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint),\n[Textlint](https://marketplace.visualstudio.com/items?itemName=taichi.vscode-textlint);\nand you can enable auto-formatting by adding [these settings](./.vscode/settings.json)\nto the repo’s `.vscode/settings.json` file.\n\nEach linter configuration covers a different set of languages and file types. For\nlanguages that are covered by multiple linters, install all of them. There are currently\nthree lint-configs:\n\n- **[ESLint](#eslint)**: Javascript, Vue\n- **[Stylelint](#stylelint)**: CSS, Vue (style blocks)\n- **[Textlint](#textlint)**: Markdown, plaintext\n\nFinally, it is recommended that you add [this yaml file](./.github/workflows/lint.yml)\nto the repo’s `.github/workflows/` directory to add a lint check to every push and\npull-request on the `main` branch.\n\n### ESLint\n\nFor Javascript and Vue projects (`.js`, `.jsx`, `.vue`). Install the\n[npm package](https://www.npmjs.com/package/eslint-config-goodbyte-styleguide) by running:\n\n```bash\nnpm install eslint eslint-config-goodbyte-styleguide --save-dev\n# or\npnpm add eslint-config-goodbyte-styleguide -D\n```\n\nThen, add it to the `.eslintrc` file at the root of the repo:\n\n```json\n{\n    \"extends\": \"goodbyte-styleguide\"\n}\n```\n\n### Stylelint\n\nFor CSS and Vue projects (`.css`, `.vue`). Install the\n[npm package](https://www.npmjs.com/package/stylelint-config-goodbyte-styleguide)\nby running:\n\n```bash\nnpm install stylelint stylelint-config-goodbyte-styleguide --save-dev\n# or\npnpm add stylelint-config-goodbyte-styleguide -D\n```\n\nThen, add it to the `.stylelintrc` file at the root of the repo:\n\n```json\n{\n    \"extends\": \"stylelint-config-goodbyte-styleguide\"\n}\n```\n\n### Textlint\n\nFor Markdown (or any projects containing a README) (`.md`, `.txt`). Install the\n[npm package](https://www.npmjs.com/package/textlint-rule-preset-goodbyte-styleguide)\nby running:\n\n```bash\nnpm install textlint textlint-rule-preset-goodbyte-styleguide --save-dev\n# or\npnpm add textlint-rule-preset-goodbyte-styleguide -D\n```\n\nThen, add it to the `.textlintrc` file at the root of the repo:\n\n```json\n{\n\t\"rules\": { \"preset-goodbyte-styleguide\": true }\n}\n```\n\n## Contributing\n\nIf you find a bug, a missing use-case, or wish to add an additional config, please\nfeel encouraged to contribute. This styleguide is a living document, and nothing is\nset in stone. If you find that the linter is too strict, not strict enough, or otherwise\nlacking, open an [issue](https://github.com/GoodbyteCo/Styleguide/issues) (or pull-request\nif you know what the fix would be).\n\nWhen updating the rules, note that each folder is published to npm separately. Packages\nwill only be published if the version number in the `package.json` file is increased.\n\n## Rational\n\nThe following covers some FAQs about the rational behind this styleguide’s choices.\n\n1. _**Why use a linter at all?**_\n\n\tWhen combined with an auto-formatter, linters are a very powerful tool. Not only\n\tdo they help keep the codebase consistent while reading, but they take a significant\n\tamount of the mental load off needing to think about formatting (although a linter\n\t_without_ an auto-formatter increases this mental load). They catch small mistakes\n\tyou’d regret missing, and reduce the need to ever fix the formatting of some other\n\tpart of the codebase.\n\n2. _**\"Styleguide\"?**_\n\t\n\tWe format _styleguide_ as a single word (rather than \"style-guide\" or \"style guide\") \n\tbecause it is its own thing, deserving of its own word. This styleguide can be referred\n\tto as \"the Styleguide\" with an uppercase _S_, since it is a proper noun, but otherwise\n\tthe word should be written like a common noun (lowercase).\n\n3. _**Tabs?**_\n\n\t\"Tabs vs Spaces\" is a common point of contention that many have agreed is rather\n\tpointless, concluding: _\"choose the one you like, it doesn’t really matter.\"_\n\tWe disagree. \n\t\n\tIndenting with spaces is stupid because it is overriding the computer’s built-in\n\ttab character and replacing it with something that might look like a tab character\n\tbut is actually a bunch of spaces in a row. The result is that the size of the\n\tindentation (2 spaces, 4 spaces, etc.) is burned into the code, and therefore \"more\n\tconsistent\" across environments. However, this is a misguided goal. Code does not\n\tneed to be consistent across all environments, just all of _your_ environments. I\n\tpersonally like my code indented at a width of 4, and when working with a codebase\n\tthat uses spaces, must adjust to the (now inconsistent) use of 2 or 4 or 8 spaces of\n\tindentation instead. Burning this width into the code is as if the codebase shipped\n\twith its own required font. All of my environments look consistent because I have\n\tconfigured them to look consistent (colors, font, tab-width), and forcing everyone\n\tto use the same tab-width because you cannot figure out how to configure your environment\n\tis silly. The code must be consistent with itself, but need not look identical across\n\tdifferent developers’ computers. \n\t\n\tBy using tabs, everyone can set their own preferred tab-width, and the usage is\n\tsimple: press the tab-key and get a tab character. Each level of indentation is\n\tone tab, and without the hackery of spaces pretending to be tabs, there is no such\n\tthing as a malformed tab-and-a-half.\n\n4. _**Why does CSS and JS have different curly-brace rules?**_\n\n\tThey are different languages and have different syntax. As a result, the formatting\n\tthat is most readable is not the same. Placing a newline character before the\n\tcurly-brace (`{`) creates a space between the header of the block and the content\n\tof the block, as well as a direct line between the opening brace and the closing brace.\n\tWhile this aides readability, some languages (such as Go) strongly enforce same-line-braces\n\tinstead. Despite allowing you to do either, Javascript has evolved as a language where\n\tsame-line-braces are so ubiquitous that it has shaped the syntax. As a result,\n\tsame-line-braces are often the most readable choice for Javascript, and the one we\n\tchoose here.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoodbyteco%2Fstyleguide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoodbyteco%2Fstyleguide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoodbyteco%2Fstyleguide/lists"}