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
41 changes: 41 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Compiled output
/dist
/tmp
/out-tsc
/bazel-out

# Node
/node_modules
npm-debug.log
yarn-error.log

# IDEs and editors
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
bun.lock

# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# Miscellaneous
/.angular/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings

# System files
.DS_Store
Thumbs.db
23 changes: 23 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 120,
"tabWidth": 2,
"endOfLine": "auto",
"bracketSpacing": true,
"overrides": [
{
"files": "*.scss",
"options": {
"singleQuote": false
}
},
{
"files": "*.html",
"options": {
"printWidth": 120
}
}
]
}
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"editor.formatOnSave": false,
"editor.formatOnSave": true,
"eslint.format.enable": true,
"editor.codeActionsOnSave": {
"source.fixAll.stylelint": "explicit",
Expand All @@ -9,5 +9,5 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"scss.lint.unknownAtRules": "ignore",
"eslint.validate": ["json"],
"eslint.validate": ["json"]
}
26 changes: 6 additions & 20 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
"outputPath": "dist/osf",
"index": "src/index.html",
"browser": "src/main.ts",
"polyfills": [
"zone.js"
],
"polyfills": ["zone.js"],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
Expand Down Expand Up @@ -92,18 +90,11 @@
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"polyfills": [
"zone.js",
"zone.js/testing"
],
"polyfills": ["zone.js", "zone.js/testing"],
"tsConfig": "tsconfig.spec.json",
"inlineStyleLanguage": "scss",
"assets": [
"src/assets"
],
"styles": [
"src/assets/styles/styles.scss"
],
"assets": ["src/assets"],
"styles": ["src/assets/styles/styles.scss"],
"stylePreprocessorOptions": {
"includePaths": ["src"]
},
Expand All @@ -113,19 +104,14 @@
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
}
}
}
}
},
"cli": {
"schematicCollections": [
"angular-eslint"
],
"schematicCollections": ["angular-eslint"],
"packageManager": "bun",
"analytics": false
}
Expand Down
7 changes: 3 additions & 4 deletions bun.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"dependencies": {
"@angular/animations": "^19.2.0",
"@angular/cdk": "^19.2.1",
"@angular/cli": "^19.2.0",
"@angular/common": "^19.2.0",
"@angular/compiler": "^19.2.0",
"@angular/core": "^19.2.0",
Expand Down Expand Up @@ -47,9 +46,9 @@
"lint-staged": "^15.4.3",
"prettier": "3.5.2",
"typescript": "~5.7.2",
"typescript-eslint": "8.23.0",
},
},
"typescript-eslint": "8.23.0"
}
}
},
"packages": {
"@ampproject/remapping": ["@ampproject/remapping@2.3.0", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw=="],
Expand Down
46 changes: 23 additions & 23 deletions commitlint.config.cjs
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
module.exports = {
extends: ["@commitlint/config-conventional"],
extends: ['@commitlint/config-conventional'],
rules: {
"type-enum": [
'type-enum': [
2,
"always",
'always',
[
"feat", // New feature
"fix", // Bug fix
"docs", // Documentation update
"style", // Code style (formatting, missing semicolons, etc.)
"refactor", // Code refactoring (no feature changes)
"perf", // Performance improvements
"test", // Adding tests
"chore", // Build process, CI/CD, dependencies
"revert" // Reverting changes
]
'feat', // New feature
'fix', // Bug fix
'docs', // Documentation update
'style', // Code style (formatting, missing semicolons, etc.)
'refactor', // Code refactoring (no feature changes)
'perf', // Performance improvements
'test', // Adding tests
'chore', // Build process, CI/CD, dependencies
'revert', // Reverting changes
],
],
"scope-empty": [2, "never"], // Scope must always be present
"subject-case": [
'scope-empty': [2, 'never'], // Scope must always be present
'subject-case': [
2,
"always",
["sentence-case", "start-case", "lower-case"] // Enforce casing
'always',
['sentence-case', 'start-case', 'lower-case'], // Enforce casing
],
"subject-empty": [2, "never"], // Prevent empty subjects
"header-max-length": [2, "always", 100], // Max length of the commit message header
"body-leading-blank": [2, "always"], // Enforce blank line before the body
"footer-leading-blank": [2, "always"], // Enforce blank line before footer
"body-max-line-length": [2, "always", 200] // Set max length for body lines
}
'subject-empty': [2, 'never'], // Prevent empty subjects
'header-max-length': [2, 'always', 100], // Max length of the commit message header
'body-leading-blank': [2, 'always'], // Enforce blank line before the body
'footer-leading-blank': [2, 'always'], // Enforce blank line before footer
'body-max-line-length': [2, 'always', 200], // Set max length for body lines
},
};
1 change: 1 addition & 0 deletions docs/arch.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ ng generate component feature-name/components/new-component
| ✨ **Directive** | `ng g d shared/directives/highlight` |


```
15 changes: 9 additions & 6 deletions docs/git-convention.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ short-description – a brief description of the change.
# 📌 Available Types (type)

### We use the following types to categorize changes:

```bash
| Type --- Purpose
| feat --- Adding a new feature
Expand All @@ -40,6 +41,7 @@ short-description – a brief description of the change.
# 📝 Branch Naming Examples

### Here are some examples of branch names:

```bash
* feat/1234-add-user-authentication
* fix/5678-fix-login-bug
Expand All @@ -48,21 +50,23 @@ short-description – a brief description of the change.
* test/8765-add-e2e-tests-for-dashboard

```

# 🛠 Example of Creating a Branch:

### To create a new branch, use the following command:

```bash
git checkout -b feat/1234-add-user-authentication

```

# 🏆 Best Practices

* ✅ Use short and clear descriptions in branch names.
* ✅ Follow a consistent style across all branches for better project structure.
* ✅ Avoid redundant words, e.g., fix/1234-fix-bug (the word "fix" is redundant).
* ✅ Use kebab-case (- instead of _ or CamelCase).
* ✅ If there is no issue ID, omit it, e.g., docs/update-contributing-guide.
- ✅ Use short and clear descriptions in branch names.
- ✅ Follow a consistent style across all branches for better project structure.
- ✅ Avoid redundant words, e.g., fix/1234-fix-bug (the word "fix" is redundant).
- ✅ Use kebab-case (- instead of \_ or CamelCase).
- ✅ If there is no issue ID, omit it, e.g., docs/update-contributing-guide.

# 🔗 Additional Resources

Expand Down Expand Up @@ -126,4 +130,3 @@ Angular Commit Guidelines: https://github.com/angular/angular/blob/main/CONTRIBU
Git Flow: https://nvie.com/posts/a-successful-git-branching-model/

This branch naming and commit message strategy ensures better traceability and improves commit history readability. 🚀

83 changes: 41 additions & 42 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,90 +1,89 @@
// @ts-check
const eslint = require("@eslint/js");
const tseslint = require("typescript-eslint");
const angular = require("angular-eslint");
const pluginImport = require("eslint-plugin-import");
const pluginSimpleImportSort = require("eslint-plugin-simple-import-sort");
const pluginUnusedImports = require("eslint-plugin-unused-imports");
const eslint = require('@eslint/js');
const tseslint = require('typescript-eslint');
const angular = require('angular-eslint');
const pluginImport = require('eslint-plugin-import');
const pluginSimpleImportSort = require('eslint-plugin-simple-import-sort');
const pluginUnusedImports = require('eslint-plugin-unused-imports');
const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended');

module.exports = tseslint.config(
{
files: ["**/*.ts"],
files: ['**/*.ts'],
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
...angular.configs.tsRecommended,
eslintPluginPrettierRecommended,
],
processor: angular.processInlineTemplates,
plugins: {
import: pluginImport,
"simple-import-sort": pluginSimpleImportSort,
"unused-imports": pluginUnusedImports,
'simple-import-sort': pluginSimpleImportSort,
'unused-imports': pluginUnusedImports,
},
rules: {
"@typescript-eslint/no-unused-vars": "warn",
"@angular-eslint/directive-selector": [
"error",
'@typescript-eslint/no-unused-vars': 'warn',
'@angular-eslint/directive-selector': [
'error',
{
type: "attribute",
prefix: "osf",
style: "camelCase",
type: 'attribute',
prefix: 'osf',
style: 'camelCase',
},
],
"@angular-eslint/component-selector": [
"error",
'@angular-eslint/component-selector': [
'error',
{
type: "element",
prefix: "osf",
style: "kebab-case",
type: 'element',
prefix: 'osf',
style: 'kebab-case',
},
],
"import/first": "error",
"import/no-duplicates": "warn",
"import/newline-after-import": "warn",
"simple-import-sort/imports": [
"warn",
'import/first': 'error',
'import/no-duplicates': 'warn',
'import/newline-after-import': 'warn',
'simple-import-sort/imports': [
'warn',
{
groups: [
// NGXS packages
["^@ngxs"],
['^@ngxs'],

// NGX packages (ngx-... or @ngx/...)
["^ngx-", "^@ngx"],
['^ngx-', '^@ngx'],

// Third-party packages (primeng)
["^primeng"],
['^primeng'],

// RxJS packages (rxjs or @rxjs/...)
["^rxjs", "^rxjs/operators"],
['^rxjs', '^rxjs/operators'],

// Angular packages
["^@angular"],
['^@angular'],

// Internal aliases (customize as needed)
["^@core/", "^@osf/", "^@shared/"],
['^@core/', '^@osf/', '^@shared/'],

// Side effect imports
["^\\u0000"],
['^\\u0000'],

// Parent imports
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
['^\\.\\.(?!/?$)', '^\\.\\./?$'],

// Sibling and current directory imports
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
],
},
],
"simple-import-sort/exports": "warn",
"unused-imports/no-unused-imports": "warn",
'simple-import-sort/exports': 'warn',
'unused-imports/no-unused-imports': 'warn',
},
},
{
files: ["**/*.html"],
extends: [
...angular.configs.templateRecommended,
...angular.configs.templateAccessibility,
],
files: ['**/*.html'],
extends: [...angular.configs.templateRecommended, ...angular.configs.templateAccessibility],
rules: {},
},
}
);
Loading