Skip to content

Commit 81e27b3

Browse files
authored
feat: Configure Biome for Consistent Code Style (#2364)
This PR adds `biome.json` to enforce consistent 2-space indentation and single quotes for JavaScript and CSS files. This aligns with project style guides, automates formatting via pre-commit hooks, and prevents manual style changes from being overwritten. Currently, our Biome setup relies on default settings, which violates Google coding style guidelines. Specifically: * **Quotation Marks:** Biome's defaults do not enforce single quotes for JavaScript (as per `js_style.txt`: `screen/8NaEr3SswN6qx6D`) and CSS property values (as per `css_style.txt`: `screen/9KCh8ZVQ4ByPeDR`). * **Indentation:** Biome's defaults do not consistently enforce 2 spaces for indentation across HTML (`screen/97ZZstQc4iH4Dsb`) and JavaScript (`screen/3crxm5peLvRE2kj`) files. This configuration explicitly sets these rules to ensure full compliance. **Benefits:** * Consistent and readable JS/CSS code. * Automated style enforcement. * Reduced developer friction. **To Test:** Make a style-violating change in a `.js` or `.css` file and attempt to commit. Biome should automatically reformat it. Fixes #<issue_number_goes_here> 🦕
1 parent 6ab2c64 commit 81e27b3

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

biome.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"formatter": {
3+
"indentStyle": "space",
4+
"indentWidth": 2
5+
},
6+
"javascript": {
7+
"formatter": {
8+
"quoteStyle": "single"
9+
}
10+
},
11+
"css": {
12+
"formatter": {
13+
"quoteStyle": "single"
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)