Skip to content
Merged
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
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[*.{bat,cmd}]
end_of_line = crlf

[*.{yml,yaml}]
indent_size = 2

[*.json]
indent_size = 2
50 changes: 50 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Set default line ending behavior to auto normalize line endings
* text=auto

# Documents
*.md text eol=lf
*.txt text eol=lf

# Source code
*.js text eol=lf
*.jsx text eol=lf
*.ts text eol=lf
*.tsx text eol=lf
*.json text eol=lf
*.css text eol=lf
*.scss text eol=lf
*.html text eol=lf
*.xml text eol=lf
*.yml text eol=lf
*.yaml text eol=lf

# Configuration files
*.config.js text eol=lf
*.config.ts text eol=lf
*.config.mjs text eol=lf
.prettierrc text eol=lf
.eslintrc* text eol=lf
.gitignore text eol=lf
.gitattributes text eol=lf

# Shell scripts (Unix line endings)
*.sh text eol=lf

# Batch files (Windows line endings)
*.bat text eol=crlf
*.cmd text eol=crlf

# Binary files
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.woff binary
*.woff2 binary
*.ttf binary
*.eot binary
*.otf binary
*.pdf binary
*.zip binary
*.tar.gz binary
4 changes: 4 additions & 0 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
copilot-setup-steps:
runs-on: ubuntu-latest

# Disable Git hooks (Husky) in CI to avoid running pre-commit/commit-msg hooks
env:
HUSKY: '0'

# Set the permissions to the lowest permissions possible needed for your steps.
# Copilot will be given its own token for its operations.
permissions:
Expand Down
8 changes: 8 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#!/usr/bin/env sh

# Skip Husky commit-msg when running in CI (e.g., GitHub Actions)
if [ "$GITHUB_ACTIONS" = "true" ] || [ "$CI" = "true" ]; then
echo "ℹ️ Skipping commit-msg hook in CI environment"
exit 0
fi

echo "🔍 Checking commit message format..."

# Run commitlint to validate commit message against conventional commits
Expand Down
8 changes: 8 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#!/usr/bin/env sh

# Skip Husky hooks when running in CI (e.g., GitHub Actions)
if [ "$GITHUB_ACTIONS" = "true" ] || [ "$CI" = "true" ]; then
echo "ℹ️ Skipping pre-commit hook in CI environment"
exit 0
fi

echo "🔍 Running pre-commit checks..."

# Use the check script for consistency
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"endOfLine": "lf",
"endOfLine": "auto",
Copy link

Copilot AI Aug 12, 2025

Choose a reason for hiding this comment

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

Changing endOfLine from "lf" to "auto" may cause inconsistent line endings across platforms. Consider keeping "lf" for consistency, especially since .gitattributes and .editorconfig both enforce LF line endings.

Suggested change
"endOfLine": "auto",
"endOfLine": "lf",

Copilot uses AI. Check for mistakes.
"arrowParens": "avoid",
"bracketSpacing": true,
"jsxSingleQuote": true,
Expand Down
30 changes: 29 additions & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1 +1,29 @@
export default { extends: ['@commitlint/config-conventional'] }
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
[
'feat',
'fix',
'docs',
'style',
'refactor',
'perf',
'test',
'chore',
'ci',
'build',
'revert',
],
],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'scope-case': [2, 'always', 'lower-case'],
'subject-case': [2, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'header-max-length': [2, 'always', 100],
},
}