AI Skill Report Card

Applying Alibaba Front End Style

C+62·Sep 20, 2026·Source: Extension-page
13 / 15

Create .editorconfig in project root:

INI
root = true [*] indent_style = space indent_size = 2 max_line_length = 100 charset = utf-8 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true

Add VS Code rulers in .vscode/settings.json:

JSON
{ "editor.rulers": [100], "editor.tabSize": 2, "editor.insertSpaces": true, "files.encoding": "utf8" }
Recommendation
Expand coverage beyond indentation/line-width/encoding to actually reflect Alibaba's broader spec (naming conventions, comments, CSS property ordering, JS best practices like var vs let/const, semicolons, quotes) — currently it's narrowly focused on whitespace/EditorConfig, which undersells the 'Alibaba front-end specification' claim.
11 / 15

When applying or auditing Alibaba front-end spec to a project:

Progress:
- [ ] Verify/create .editorconfig with 2-space indent
- [ ] Set max_line_length to 100 (soft guideline, not hard-enforced by linters)
- [ ] Ensure charset = utf-8 everywhere
- [ ] Cross-check Prettier config doesn't conflict with EditorConfig
- [ ] Verify VS Code settings.json aligns (rulers, tabSize)
- [ ] Spot-check HTML/JS/CSS files for 2-space indentation compliance
- [ ] Confirm files end with newline, no trailing whitespace
  1. Indentation: enforce 2 spaces everywhere (HTML, CSS, JS, JSX, JSON, YAML). Never tabs.
  2. Line width: target 100 characters as a soft wrap guideline — flag lines that exceed it but use judgment (e.g., long URLs or strings are exempt).
  3. Encoding: all source/text files must be UTF-8, no BOM.
  4. Tooling alignment: .editorconfig governs whitespace/charset; Prettier governs deeper formatting (quotes, semicolons, trailing commas) — don't let the two contradict (e.g., Prettier's tabWidth must also be 2).
Recommendation
Add more diverse examples covering CSS and JS specifically (not just HTML indentation) since the skill claims to cover HTML, CSS, JS conventions but only shows one HTML example and one .editorconfig example.
11 / 20

Example 1: Input: Project has no .editorconfig, indentation is inconsistent (mix of 4-space and tabs). Output:

INI
root = true [*] indent_style = space indent_size = 2 max_line_length = 100 charset = utf-8

Plus instruction to run Prettier with --tab-width 2 to auto-reformat existing files.

Example 2: Input: <html> block indented with 4 spaces:

HTML
<html> <head> <title></title> </head> </html>

Output:

HTML
<html> <head> <title></title> </head> </html>
Recommendation
Include a 'bad output' example to contrast compliant vs non-compliant code more explicitly, and reference the actual official Alibaba style guide rules (e.g., BEM naming, comment blocks) for more credibility and completeness.
  • Always pair .editorconfig (whitespace-level rules) with Prettier (semantic formatting) — don't rely on one alone.
  • Set indent_size = 2 uniformly across HTML, CSS, JS/JSX, and JSON to keep deeply nested markup (like JSX) readable.
  • Treat the 100-char line width as a readability guideline for side-by-side diffs on large monitors, not an absolute hard limit — apply reasonable exceptions.
  • Always specify charset = utf-8 explicitly; never assume default OS encoding.
  • Keep insert_final_newline = true and trim_trailing_whitespace = true to avoid noisy diffs.
  • Don't use tabs for indentation — rendering width is inconsistent across editors/environments.
  • Don't mix 2-space config in .editorconfig with a differing tabWidth in .prettierrc — this causes formatter/editor conflicts.
  • Don't silently truncate or hard-wrap URLs/long strings just to satisfy the 100-char rule.
  • Don't forget charset = utf-8 on non-JS files (Markdown, YAML, JSON) — encoding mismatches cause hard-to-debug issues in CI.
0
Grade C+AI Skill Framework
Scorecard
Criteria Breakdown
Quick Start
13/15
Workflow
11/15
Examples
11/20
Completeness
12/20
Format
14/15
Conciseness
13/15