-
Notifications
You must be signed in to change notification settings - Fork 169
[DX] Add Prettier for code formatting #947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| public/ | ||
| resources/ | ||
| node_modules/ | ||
| .hugo_build.lock | ||
| build/ |
| 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"] | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are a few issues with the added dependencies:
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add script and make command also |
||||||||||||||
| } | ||||||||||||||
| } | ||||||||||||||
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.