Skip to content

Commit d06e285

Browse files
committed
chore: add EditorConfig and VS Code workspace configs; add CODEOWNERS
Add .editorconfig and VS Code settings (settings.json, launch.json, extensions.json) to standardize editor/IDE behavior across the project. Add .github/workflows/CODEOWNERS to declare code ownership. Minor cleanups: normalize quotes in commitlint.config.js and ensure newline at end of .prettierignore.
1 parent 0e177c6 commit d06e285

File tree

7 files changed

+243
-2
lines changed

7 files changed

+243
-2
lines changed

.editorconfig

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
indent_style = space
9+
indent_size = 4
10+
11+
[*.{js,jsx}]
12+
indent_size = 4
13+
insert_final_newline = true
14+
trim_trailing_whitespace = true
15+
16+
[package.json]
17+
[package-lock.json]
18+
[yarn.lock]
19+
[pnpm-lock.yaml]
20+
[*.{yml,yaml}]
21+
[.github/**/*.yml]
22+
[.github/**/*.yaml]
23+
[.github/**/*.json]
24+
[.vscode/**/*.json]
25+
[ci.yml]
26+
[.prettierrc]
27+
indent_size = 2
28+
trim_trailing_whitespace = true
29+
insert_final_newline = true
30+
31+
[*.md]
32+
trim_trailing_whitespace = false
33+
insert_final_newline = true
34+
indent_size = 4
35+
36+
[*.{css,scss,less}]
37+
indent_style = space
38+
indent_size = 4
39+
40+
[*.sh]
41+
indent_style = space
42+
indent_size = 4
43+
end_of_line = lf
44+
insert_final_newline = true
45+
trim_trailing_whitespace = true

.github/workflows/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @Ali-Sdg90

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ test-results/
2828
# Documentation files
2929
CHANGELOG.md
3030
README.md
31-
LICENSE
31+
LICENSE

.vscode/extensions.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"recommendations": [
3+
"esbenp.prettier-vscode",
4+
"dbaeumer.vscode-eslint",
5+
"vivaxy.vscode-conventional-commits",
6+
"github.vscode-github-actions",
7+
"christian-kohler.npm-intellisense",
8+
"redhat.vscode-yaml",
9+
"timonwong.shellcheck",
10+
"EditorConfig.EditorConfig",
11+
"orta.vscode-jest"
12+
]
13+
}

.vscode/launch.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Launch Program (node)",
6+
"type": "node",
7+
"request": "launch",
8+
"program": "${workspaceFolder}/index.js",
9+
"cwd": "${workspaceFolder}",
10+
"envFile": "${workspaceFolder}/.env",
11+
"runtimeArgs": ["--enable-source-maps"],
12+
"console": "integratedTerminal",
13+
"internalConsoleOptions": "neverOpen"
14+
},
15+
{
16+
"name": "Run with nodemon (hot reload)",
17+
"type": "node",
18+
"request": "launch",
19+
"runtimeExecutable": "npx",
20+
"runtimeArgs": ["nodemon", "--inspect=9229", "index.js"],
21+
"cwd": "${workspaceFolder}",
22+
"envFile": "${workspaceFolder}/.env",
23+
"console": "integratedTerminal",
24+
"internalConsoleOptions": "neverOpen",
25+
"restart": true
26+
},
27+
{
28+
"name": "Attach to Process",
29+
"type": "node",
30+
"request": "attach",
31+
"processId": "${command:PickProcess}",
32+
"cwd": "${workspaceFolder}"
33+
},
34+
{
35+
"name": "Debug Jest Tests",
36+
"type": "node",
37+
"request": "launch",
38+
"program": "${workspaceFolder}/node_modules/jest/bin/jest.js",
39+
"args": ["--runInBand", "--watchAll=false"],
40+
"cwd": "${workspaceFolder}",
41+
"env": {
42+
"NODE_ENV": "test"
43+
},
44+
"console": "integratedTerminal",
45+
"internalConsoleOptions": "neverOpen"
46+
}
47+
]
48+
}

.vscode/settings.json

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
{
2+
// ======================================
3+
// General Editor Settings
4+
// ======================================
5+
6+
// Use 4 spaces for indentation
7+
"editor.tabSize": 4,
8+
"editor.insertSpaces": true,
9+
10+
// Automatically wrap long lines instead of horizontal scrolling
11+
"editor.wordWrap": "off",
12+
13+
// Always use LF for line endings (consistent across OS)
14+
"files.eol": "\n",
15+
16+
// Remove trailing whitespaces and ensure a final newline
17+
"files.trimTrailingWhitespace": true,
18+
"files.insertFinalNewline": true,
19+
20+
// ======================================
21+
// Code Formatting (Prettier)
22+
// ======================================
23+
24+
// Use Prettier as the default formatter
25+
"editor.defaultFormatter": "esbenp.prettier-vscode",
26+
27+
// Automatically format code on save
28+
"editor.formatOnSave": true,
29+
30+
// Prettier rules for consistent code style
31+
"prettier.semi": true, // Always use semicolons
32+
"prettier.singleQuote": false, // Prefer double quotes
33+
"prettier.trailingComma": "all", // Add trailing commas wherever possible
34+
"prettier.printWidth": 100, // Wrap lines at 100 characters
35+
"prettier.tabWidth": 4, // 4-space indentation
36+
37+
// ======================================
38+
// Linting (ESLint)
39+
// ======================================
40+
41+
"eslint.enable": true,
42+
"eslint.validate": ["javascript"], // Validate only JavaScript files
43+
"eslint.alwaysShowStatus": true, // Always show ESLint status in the bottom bar
44+
45+
// ======================================
46+
// Testing (Jest)
47+
// ======================================
48+
49+
// Automatically run Jest tests in watch mode for modified files
50+
"jest.autoRun": {
51+
"watch": false, // Disable global watch mode
52+
"onSave": "test-file" // Run tests only for the saved file
53+
},
54+
55+
// Prevent VS Code from opening the Peek View for failed tests
56+
"testing.automaticallyOpenPeekView": "never",
57+
58+
// ======================================
59+
// Integrated Terminal & Node Environment
60+
// ======================================
61+
62+
// Set NODE_ENV to development for integrated terminals
63+
"terminal.integrated.env.linux": {
64+
"NODE_ENV": "development"
65+
},
66+
"terminal.integrated.env.windows": {
67+
"NODE_ENV": "development"
68+
},
69+
70+
// Prefer Git Bash as the default terminal on Windows
71+
"terminal.integrated.defaultProfile.windows": "Git Bash",
72+
73+
// ======================================
74+
// Git & Source Control
75+
// ======================================
76+
77+
// Allow committing without staging all changes manually
78+
"git.enableSmartCommit": true,
79+
80+
// Automatically fetch from remote repositories
81+
"git.autofetch": true,
82+
83+
// Skip confirmation prompts when syncing changes
84+
"git.confirmSync": false,
85+
86+
// Automatically sync after every commit
87+
"git.postCommitCommand": "sync",
88+
89+
// ======================================
90+
// IntelliSense & JavaScript Settings
91+
// ======================================
92+
93+
// Enable auto imports and refactoring for JS
94+
"javascript.suggest.autoImports": true,
95+
96+
// Automatically update imports when moving/renaming files
97+
"javascript.updateImportsOnFileMove.enabled": "always",
98+
99+
// Disable TypeScript validation (pure JS project)
100+
"typescript.validate.enable": false,
101+
102+
// Enable Emmet abbreviations in JS files
103+
"emmet.includeLanguages": {
104+
"javascript": "javascriptreact"
105+
},
106+
107+
// ======================================
108+
// Workspace Cleanliness & Search
109+
// ======================================
110+
111+
// Exclude non-relevant directories from global search
112+
"search.exclude": {
113+
"**/node_modules": true,
114+
"**/coverage": true,
115+
"**/dist": true,
116+
"**/.git": true
117+
},
118+
119+
// ======================================
120+
// Conventional Commits / Husky Support
121+
// ======================================
122+
123+
// Optional: assist with commit scopes and structured messages
124+
"conventionalCommits.scopes": ["bot", "ci", "core", "queue", "docs"],
125+
"conventionalCommits.promptBody": true,
126+
"conventionalCommits.promptFooter": true,
127+
128+
"workbench.colorCustomizations": {
129+
"titleBar.activeBackground": "#113963",
130+
"titleBar.activeForeground": "#e7e7e7",
131+
"titleBar.inactiveBackground": "#0f3459",
132+
"titleBar.inactiveForeground": "#e7e7e799"
133+
}
134+
}

commitlint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = { extends: ['@commitlint/config-conventional'] };
1+
module.exports = { extends: ["@commitlint/config-conventional"] };

0 commit comments

Comments
 (0)