{"id":13670810,"url":"https://github.com/alibaba/f2e-spec","last_synced_at":"2025-05-14T03:05:20.046Z","repository":{"id":37362227,"uuid":"315851517","full_name":"alibaba/f2e-spec","owner":"alibaba","description":"Alibaba Front-end Coding Guidelines and Relevant Tools","archived":false,"fork":false,"pushed_at":"2025-04-12T13:05:50.000Z","size":2020,"stargazers_count":905,"open_issues_count":0,"forks_count":195,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-04-14T01:58:13.582Z","etag":null,"topics":["guidelines","linter","specification"],"latest_commit_sha":null,"homepage":"https://alibaba.github.io/f2e-spec/","language":"TypeScript","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/alibaba.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2020-11-25T06:41:43.000Z","updated_at":"2025-04-12T13:05:54.000Z","dependencies_parsed_at":"2024-06-12T16:02:19.590Z","dependency_job_id":"88821afd-129c-446c-b088-c021e82477ed","html_url":"https://github.com/alibaba/f2e-spec","commit_stats":{"total_commits":228,"total_committers":14,"mean_commits":"16.285714285714285","dds":"0.48245614035087714","last_synced_commit":"2ccabe1c57b4ffcf2586daff17d3feb59bc8490a"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2Ff2e-spec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2Ff2e-spec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2Ff2e-spec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2Ff2e-spec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alibaba","download_url":"https://codeload.github.com/alibaba/f2e-spec/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248809032,"owners_count":21164895,"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":["guidelines","linter","specification"],"created_at":"2024-08-02T09:00:49.849Z","updated_at":"2025-05-14T03:05:20.039Z","avatar_url":"https://github.com/alibaba.png","language":"TypeScript","readme":"# 阿里巴巴前端规约\n\n## 简介\n\n「阿里巴巴前端规约」是在阿里经济体内广泛使用的一套前端编码和工程规范，致力于通过统一编码风格、普及最佳实践和代码缺陷检查帮助团队降低协作成本、提升前端项目的可维护性和稳定性。\n\n本项目主要包括「规约文档」和「配套工具」两部分。你可以通过阅读规约文档了解各前端语言、框架及工程规范，并使用 [F2ELint](https://www.npmjs.com/package/f2elint) 等配套工具来为项目接入规约检查。\n\n## 规约文档\n\n规约文档分为编码规约和工程规约两大类，包括：\n\n- 编码规约\n  - [JavaScript 编码规约](docs/coding/javascript.md)\n  - [TypeScript 编码规约](docs/coding/typescript.md)\n  - [React 编码规约](docs/coding/react.md)\n  - [Node.js 开发规约](docs/coding/node.md)\n  - [CSS 编码规约](docs/coding/css.md)\n  - [HTML 编码规约](docs/coding/html.md)\n- 工程规约\n  - [Git 规约](docs/engineering/git.md)\n  - [文档通用规约](docs/engineering/writing.md)\n  - [更新日志规约](docs/engineering/changelog.md)\n\n## 规约工具\n\n我们引入了多个业界流行的 Linter 作为规约文档的配套工具，并根据规约内容定制了对应的规则包，它们包括：\n\n| 规约                | 工具           | 规则                      |\n| ------------------- | -------------- | ------------------------- |\n| JavaScript 编码规约 | [ESLint]       | [eslint-config-ali]       |\n| TypeScript 编码规约 | [ESLint]       | [eslint-config-ali]       |\n| React 编码规约      | [ESLint]       | [eslint-config-ali]       |\n| Node.js 开发规约    | [ESLint]       | [eslint-config-ali]       |\n| CSS 编码规约        | [stylelint]    | [stylelint-config-ali]    |\n| Git 规约            | [commitlint]   | [commitlint-config-ali]   |\n| 文档通用规约        | [markdownlint] | [markdownlint-config-ali] |\n\n可以看到这些 Linter 和规则包众多且零散，全部安装它们会给项目增加十几个依赖，接入及后续升级成本都比较高。\n\n因此我们封装了 [F2ELint](https://www.npmjs.com/package/f2elint) 这个 npm 包，它收敛屏蔽了这些依赖和配置细节，提供简单的 CLI 和 Node.js API，让项目能够一键接入、一键扫描、一键修复、一键升级，并为项目配置 git commit 卡口，降低项目接入规约的成本。\n\n你可以使用 [F2ELint](https://www.npmjs.com/package/f2elint) 方便地为项目接入全套规约 Lint，也可以根据需求单独安装 xx-config-ali 和相关 Linter。\n\n## 如何参与\n\n非常欢迎大家通过 [Issues](https://github.com/alibaba/f2e-spec/issues) 反馈问题和需求，或者通过 [PRs](https://github.com/alibaba/f2e-spec/pulls) 参与贡献，请参考 [CONTRIBUTING.md](/CONTRIBUTING.md)。\n\n## 贡献署名\n\n文档撰写人员（排名不分先后）：邦彦、尘弦、迟帆、大果、氐宿、法海、姬无、倞羽、连木、林熠、零弌、墨止、牧曈、霂之、年翼、清锐、萨波、释然、双龙、苏青、阎罗、扬炀、洋风、云谦、载天、梓骞\n\n文档审阅人员（排名不分先后）：大貘、九十、狼叔、龙归、秦粤、上坡、死月、苏千、吞吞、潕量、艺璇、游鹿、裕波、张挺、知忧\n\n工具编写人员（排名不分先后）：尘弦、鹤仙、连木、牧曈、年翼、秦粤、萨波、双龙、扬炀、洋风\n\n[其他贡献者参见此处](https://github.com/alibaba/f2e-spec/graphs/contributors)\n\n## 引用信息及鸣谢\n\n本项目的文档部分参考或引用了许多优秀的业界开源规范、标准化文档和技术官网，它们主要包括：\n\n- [Airbnb Style Guide](https://github.com/airbnb/javascript)\n- [Google Style Guide](https://google.github.io/styleguide)\n- [Code Guide by @mdo](http://codeguide.co)\n- [ecomfe/spec](https://github.com/ecomfe/spec)\n- [语义化版本 (Semantic Versioning) 2.0.0](https://semver.org/lang/zh-CN/spec/v2.0.0.html)\n- [约定式提交 (Conventional Commits) 1.0.0](https://www.conventionalcommits.org/zh-hans/v1.0.0/)\n- [Conventional Changelog](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog/CHANGELOG.md)\n- [MDN Web 开发者文档](https://developer.mozilla.org/zh-CN/docs/Web)\n- [React 官方文档](https://reactjs.org/docs/)\n- [谷歌 Web 开发者文档](https://developers.google.com/web)\n\n更详细的引用说明请参见各规约文档的「参考资料」章节。\n\n本项目的配套工具使用了多个优秀的 Linter、Formatter 及社区生态，主要包括：\n\n- [ESLint](https://eslint.org) 及[多个 plugin 和 parser](https://github.com/alibaba/f2e-spec/tree/main/packages/eslint-config-ali#eslint-config-ali)\n- [stylelint] 及 [stylelint-scss](https://github.com/kristerkari/stylelint-scss)\n- [commitlint] 及 [conventional-changelog-conventionalcommits](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-conventionalcommits)\n- [markdownlint](https://github.com/DavidAnson/markdownlint)\n\n在此表示感谢，如有侵权行为，敬请联系我们 :-)\n\n[ESLint]: https://eslint.org/\n[eslint-config-ali]: https://www.npmjs.com/package/eslint-config-ali\n[stylelint]: https://stylelint.io/\n[stylelint-config-ali]: https://www.npmjs.com/package/stylelint-config-ali\n[commitlint]: https://commitlint.js.org/\n[commitlint-config-ali]: https://www.npmjs.com/package/commitlint-config-ali\n[markdownlint]: https://github.com/DavidAnson/markdownlint\n[markdownlint-config-ali]: https://www.npmjs.com/package/markdownlint-config-ali\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falibaba%2Ff2e-spec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falibaba%2Ff2e-spec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falibaba%2Ff2e-spec/lists"}