gitmyhub

spec

★ 4.6k updated 3y ago

This repository contains the specifications.

This repository is a collection of coding style specifications published by ecomfe, a front-end team at Baidu. The documents are written in Chinese and cover the rules and conventions that developers on the team follow when writing code.

The specifications cover JavaScript, including a separate section for modern JavaScript features known as ESNext. There are also guides for HTML, CSS, and Less (a language that extends CSS with additional features). Beyond styling code itself, the collection includes standards for how data should be structured when transferred between systems (E-JSON), how modules and loaders should be organized, how packages should be structured, and how project directories should be laid out. A standard for chart libraries is also included, along with a guide for React, a popular JavaScript framework.

Each document is versioned, with some marked as drafts still in progress. The repository also references FECS, a lint and auto-fix tool used to check code against these specifications automatically.

This is primarily useful for developers working within or alongside the ecomfe team, or for anyone reading Chinese who wants to see how a large Chinese technology company structures its front-end coding standards. The README is in Chinese, and the linked specification documents are also in Chinese.