{"id":23290802,"url":"https://github.com/cellbang/style-guide","last_synced_at":"2026-02-25T08:04:48.263Z","repository":{"id":193884080,"uuid":"689446900","full_name":"cellbang/style-guide","owner":"cellbang","description":"Cellbang's engineering style guide","archived":false,"fork":false,"pushed_at":"2024-05-04T13:50:58.000Z","size":64,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-17T14:30:21.943Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/cellbang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2023-09-09T20:45:19.000Z","updated_at":"2024-12-04T10:11:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"72c51184-9869-408e-8da3-ff50028f422b","html_url":"https://github.com/cellbang/style-guide","commit_stats":null,"previous_names":["cellbang/style-guide"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cellbang%2Fstyle-guide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cellbang%2Fstyle-guide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cellbang%2Fstyle-guide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cellbang%2Fstyle-guide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cellbang","download_url":"https://codeload.github.com/cellbang/style-guide/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230537058,"owners_count":18241515,"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-12-20T05:12:30.808Z","updated_at":"2026-02-25T08:04:43.243Z","avatar_url":"https://github.com/cellbang.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Cellbang Style Guide\n\n[![npm version](https://img.shields.io/npm/v/@celljs/style-guide.svg?style=flat)](https://www.npmjs.com/package/@celljs/style-guide)\n[![npm downloads](https://img.shields.io/npm/dm/@celljs/style-guide.svg?style=flat)](https://www.npmjs.com/package/@celljs/style-guide)\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/cellbang/style-guide/blob/master/LICENSE)\n\n\n## 介绍\n\n本存储库是 Cellbang 风格指南的所在地，其中包括以下配置：\n- [Prettier](#prettier)\n- [ESLint](#eslint)\n- [TypeScript](#typescript)\n\n## 安装\n\n我们的所有配置都包含在一个包`@celljs/style-guide`中。安装命令如下：\n\n```sh\n# If you use npm\nnpm i --save-dev @celljs/style-guide\n\n# If you use pmpm\npnpm i --save-dev @celljs/style-guide\n\n# If you use Yarn\nyarn add --dev @celljs/style-guide\n```\n\n我们的一些 ESLint 配置需要 peer 依赖。具体内容可以查看 [ESLint](#eslint)。\n\n## Prettier\n\n\n\u003e 注意：Prettier 是此软件包的对等依赖项，应安装\n\u003e 在项目的根目录下。\n\u003e\n\u003e 请参阅：https://prettier.io/docs/en/install.html\n\n要使用共享 Prettier 配置，请在 `package.json` 中设置以下内容。\n\n\n```json\n{\n  \"prettier\": \"@celljs/style-guide/prettier\"\n}\n```\n\n## ESLint\n\n\u003e 注意：ESLint 是此软件包的 peer 依赖项，应安装\n\u003e 在项目的根目录下。\n\u003e\n\u003e 请参阅：https://eslint.org/docs/user-guide/getting-started#installation-and-usage\n\n此 ESLint 配置被设计为可组合的，且要求 ESLint 版本为：^9.0.0。\n\n以下基本配置可用。您可以使用其中之一或两者\n配置，但它们应该始终位于配置数组中的第一个：\n\n- `@celljs/style-guide/eslint/base`\n- `@celljs/style-guide/eslint/errors`\n\n请注意，您可以设置配置范围，以便配置仅针对特定文件。\n\n以下附加配置可用：\n\n- `@celljs/style-guide/eslint`（所有配置）\n- `@celljs/style-guide/eslint/base` （基础配置）\n- `@celljs/style-guide/eslint/errors`（错误级别的配置）\n- `@celljs/style-guide/eslint/build`（构建级别的配置，包括基础和错误级别的配置）\n- `@celljs/style-guide/eslint/warnings`（警告级别的配置）\n- `@celljs/style-guide/eslint/xxs`（跨站脚本攻击相关的配置）\n\n\u003e 由于围绕 ESLint 配置解析的问题（请参阅\n\u003e [eslint/eslint#9188](https://github.com/eslint/eslint/issues/9188)。\n\n例如，一个简单的项目复用 ESLint 配置，配置如下\n\n```js\nmodule.exports = [\n  ...require('@celljs/style-guide/eslint')\n];\n```\n当然，也可以更具情况选择具体级别的一个或多个配置。\n```js\nmodule.exports = [\n  ...require('@celljs/style-guide/eslint/base'),\n  ...require('@celljs/style-guide/eslint/errors')\n];\n```\n\n如果是一个纯 javascript 项目，配置如下：\n\n```js\nmodule.exports = [\n  ...require('@celljs/style-guide/eslint/javascript')\n];\n```\n\n## TypeScript\n\n要使用共享 TypeScript 配置，请在 `tsconfig.json` 中设置以下内容。\n\n```json\n{\n  \"extends\": \"@celljs/style-guide/typescript\"\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcellbang%2Fstyle-guide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcellbang%2Fstyle-guide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcellbang%2Fstyle-guide/lists"}