-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
feat: small improvements #256
Merged
rajnandan1
merged 7 commits into
rajnandan1:main
from
kaffolder7:feature/small-improvements
Feb 9, 2025
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
fd79000
add: editorconfig to enforce consistent styles
kaffolder7 f7cc28c
add: badges to README
kaffolder7 0f0b447
remove: forks badge from README
kaffolder7 304945a
Merge branch 'rajnandan1:main' into feature/small-improvements
kaffolder7 8370145
update: change fonts API
kaffolder7 798af32
fix: update docs link to online documentation
kaffolder7 089ee9b
update(formatting): made consistent
kaffolder7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# EditorConfig helps maintain consistent coding styles between editors | ||
root = true | ||
|
||
# Default settings for all files (e.g. most common, best-practice standard across all filetypes) | ||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# Svelte files | ||
[*.svelte] | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = false | ||
|
||
# JavaScript and TypeScript | ||
[*.{js,ts,tsx,cjs,mjs}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# JSON files (package.json, config files, etc.) - per JSON (RFC 8259) specification | ||
[*.json,.prettierrc] | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = false | ||
|
||
# YAML files (e.g., GitHub Actions, Lint configs) - per YAML 1.2 (2009) specification | ||
[*.{yaml,yml}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# Markdown files | ||
[*.md] | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = false | ||
|
||
# Dockerfile | ||
[Dockerfile*] | ||
indent_style = tab | ||
indent_size = 4 | ||
insert_final_newline = false | ||
|
||
# Ignore binary files | ||
[*.{png,jpg,jpeg,gif,ico,svg,woff,woff2,eot,ttf,otf}] | ||
charset = unset | ||
trim_trailing_whitespace = false | ||
insert_final_newline = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,71 @@ | ||
{ | ||
"useTabs": true, | ||
"semi": true, | ||
"tabWidth": 4, | ||
"trailingComma": "none", | ||
"printWidth": 100, | ||
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], | ||
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] | ||
"useTabs": false, | ||
"semi": true, | ||
"tabWidth": 2, | ||
"trailingComma": "none", | ||
"printWidth": 100, | ||
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], | ||
"overrides": [ | ||
{ | ||
"files": "*.svelte", | ||
"options": { | ||
"parser": "svelte", | ||
"useTabs": false, | ||
"semi": false, | ||
"tabWidth": 2, | ||
"trailingComma": "none", | ||
"printWidth": 100 | ||
} | ||
}, | ||
{ | ||
"files": ["*.js", "*.ts", "*.tsx", "*.cjs", "*.mjs"], | ||
"options": { | ||
"useTabs": false, | ||
"semi": true, | ||
"tabWidth": 2, | ||
"trailingComma": "all", | ||
"printWidth": 80 | ||
} | ||
}, | ||
{ | ||
"files": ["*.json", ".prettierrc"], | ||
"options": { | ||
"useTabs": false, | ||
"semi": false, | ||
"tabWidth": 2, | ||
"trailingComma": "none", | ||
"printWidth": 100 | ||
} | ||
}, | ||
{ | ||
"files": ["*.yaml", "*.yml"], | ||
"options": { | ||
"useTabs": false, | ||
"semi": false, | ||
"tabWidth": 2, | ||
"trailingComma": "none", | ||
"printWidth": 80 | ||
} | ||
}, | ||
{ | ||
"files": "*.md", | ||
"options": { | ||
"useTabs": false, | ||
"semi": false, | ||
"tabWidth": 4, | ||
"trailingComma": "none", | ||
"printWidth": 100 | ||
} | ||
}, | ||
{ | ||
"files": "Dockerfile", | ||
"options": { | ||
"useTabs": true, | ||
"tabWidth": 4, | ||
"semi": false, | ||
"trailingComma": "none", | ||
"printWidth": 120 | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
can we keep it similar to .prettierrc for tab size and tabs
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.
so indent_size=4 and indent with tabs instead of spaces
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.
Yes, that is fine. I only specified two spaces instead of 4 spaces/tab because two spaces are more of the standard when it comes to modern JavaScript and Svelte. I had checked with GPT. However, I know everyone has their own preference, and because you are the code owner I will get this changed. Just wanted to make a best-practice/standardized suggestion, 😉 ...but I have no desire to raise argument over this. 😂 If you don't think this standard is a good change, I think the real win here is implementing an EditorConfig file to help others more quickly align to project standards in their own IDEs.
I can get this change made to reflect your settings in Prettier if that's ultimately what you would like. Are you expecting only .js, .tx, and Svelte file types updated to tabs?
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.
@rajnandan1 Here's what I'm proposing for best-practice and standardized approach. I can easily update
.prettierrc
to match:*
*.svelte
≠
Standard/best-practice and more-widely adopted is actually: 2 spaces
*.{js,ts,tsx,cjs,mjs}
≠
Standard/best-practice and more-widely adopted is actually: 2 spaces
*.json,.prettierrc
*.{yaml,yml}
*.md
≠
Standard/best-practice and more-widely adopted is actually: 2 or 4 spaces
Dockerfile
Could you please confirm if this is ok? Or if you would like any of these adjusted further? The "Indent Size" and "Indent Style" columns are currently the values I will plan on implementing, unless you are comfortable with my suggestions in the "Notes" column. 😊
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 feel you are correct and we can keep it 2 in
.editorconfig
which should be fine.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.
Merge? if there is nothing else?
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.
@rajnandan1 Yes, you may merge. I just pushed the updates.
.prettierrc
and.editorconfig
are now better-aligned w/ best-practice/most-widely adopted indentation sizes and formats. 😊