Skip to content

Commit

Permalink
htmlcss: Mention Prettier for HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Oct 31, 2024
1 parent c5071eb commit a3202ed
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions docs/htmlcss/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ HTML
Code style
~~~~~~~~~~

Style HTML code using `Biome <https://biomejs.dev>`__.
Style CSS and JavaScript in HTML files using `Biome <https://biomejs.dev>`__.

You can use `Prettier <https://prettier.io/docs/en/>`__ to style HTML while waiting for `Biome support <https://biomejs.dev/internals/language-support/>`__.

.. code-block:: json
:caption: biome.json
Expand All @@ -20,6 +22,9 @@ Style HTML code using `Biome <https://biomejs.dev>`__.
"useIgnoreFile": true,
"defaultBranch": "main"
},
"organizeImports": {
"enabled": true
},
"formatter": {
"indentStyle": "space",
"indentWidth": 4,
Expand All @@ -29,11 +34,15 @@ Style HTML code using `Biome <https://biomejs.dev>`__.
"formatter": {
"indentWidth": 2
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
}
https://biomejs.dev/guides/integrate-in-editor/

Search engine optimization (SEO)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -106,7 +115,7 @@ Reminders
Code style
~~~~~~~~~~

Style CSS code using `Prettier <https://prettier.io>`__ with 2-space indentation.
Style CSS using `Biome <https://biomejs.dev/reference/configuration/#css>`__, with 2-space indentation.

In terms of naming conventions, consider `Block Element Modifier (BEM) <https://getbem.com>`__.

Expand Down

0 comments on commit a3202ed

Please sign in to comment.