Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ Once changes are implemented here, they need to be updated within the `/chooser`

Final production changes are deployed within vocabulary-theme Releases, updated within [`index-dev-env`][index-dev-env], and finally deployed to `index__stage` and then `index__prod` environments; going LIVE at `https://creativecommons.org/chooser`.

### Code Formatting with Prettier

We use [Prettier](https://prettier.io/) to enforce consistent formatting across the codebase.

#### To check formatting (via Docker):
```bash
./docker/run-prettier.sh

## Setup
1. open the `src/index.html` file within a browser to view the Chooser.
Expand Down
8 changes: 8 additions & 0 deletions docker/format-prettier.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
set -e

docker run --rm \
-v "$PWD":/app \
-w /app \
node:20 \
npx prettier . --write
8 changes: 8 additions & 0 deletions docker/run-prettier.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
set -e

docker run --rm \
-v "$PWD":/app \
-w /app \
node:20 \
npx prettier . --check
11 changes: 11 additions & 0 deletions prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
node_modules
dist
*.svg
*.png
*.jpg
*.ico
*.pdf
*.woff
*.woff2
*.eot
*.ttf
7 changes: 7 additions & 0 deletions prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2,
"trailingComma": "es5"
}