Skip to content
Open
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
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
public/
resources/
node_modules/
.hugo_build.lock
build/
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": true,
"tabWidth": 2,
"printWidth": 100,
"singleQuote": true,
"trailingComma": "none",
"plugins": ["prettier-plugin-organize-imports"]
}
Comment on lines +1 to +8
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Bharath314 Do these changes align with our current file style?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have taken this configuration from sistent.

10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,12 @@ check-go:

## Build and run docs website within a Docker container
docker:
docker compose watch
docker compose watch

## Format code using Prettier
format:
npm run format

## Check code formatting using Prettier
format-check:
npm run format:check
72 changes: 71 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@
"serve": "npm run _serve",
"test": "npm run check:links",
"update:pkg:dep": "npm install --save-dev autoprefixer@latest postcss-cli@latest",
"update:pkg:hugo": "npm install --save-dev --save-exact hugo-extended@latest"
"update:pkg:hugo": "npm install --save-dev --save-exact hugo-extended@latest",
"format": "prettier --write .",
"format:check": "prettier --check ."
},
"devDependencies": {
"autoprefixer": "^10.4.19",
"hugo-extended": "0.158.0",
"postcss-cli": "^11.0.0"
"postcss-cli": "^11.0.0",
"prettier": "3.8.3",
"prettier-plugin-organize-imports": "^4.3.0"
Comment on lines +38 to +40
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

There are a few issues with the added dependencies:

  1. Invalid Versions: The versions specified for prettier (3.8.3) and prettier-plugin-organize-imports (^4.3.0) do not exist on the npm registry. This will cause installation failures. Please use valid, stable versions (e.g., prettier@3.5.0 and prettier-plugin-organize-imports@4.1.1).
  2. Missing Scripts: To fulfill the "DX" (Developer Experience) goal of this PR, you should add npm scripts to the scripts section of package.json. For example:
    "format": "prettier --write .",
    "format:check": "prettier --check ."
  3. Stability: It is recommended to use a stable, exact version for Prettier to ensure consistent formatting across different environments and avoid unexpected changes during updates.
Suggested change
"postcss-cli": "^11.0.0",
"prettier": "3.8.3",
"prettier-plugin-organize-imports": "^4.3.0"
"postcss-cli": "^11.0.0",
"prettier": "3.5.0",
"prettier-plugin-organize-imports": "^4.1.1"

Copy link
Copy Markdown
Contributor Author

@Bharath314 Bharath314 Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like those versions of prettier and the plugin aren't in gemini's training data yet 😆 . Should I add the npm scripts? That does look like a good idea.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add script and make command also

}
}
Loading