Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e7143e3
Enhance financial reporting with contract type integration
anatolyshipitz Aug 27, 2025
dbe678c
fix: Improve date comparison in getContractTypeByDate function
anatolyshipitz Aug 27, 2025
f27b1e6
Add unit tests for getContractTypeByDate function
anatolyshipitz Aug 27, 2025
b0d69d6
Update Dockerfile.n8n to use n8n version 1.109.2 and install addition…
anatolyshipitz Sep 3, 2025
8096856
Add weekly financial report workflow and enhance marginality calculat…
anatolyshipitz Sep 3, 2025
3748744
Refactor date handling in financial queries and clean up code
anatolyshipitz Sep 4, 2025
a0b30f0
Add docker-compose.override.yml and update package dependencies
anatolyshipitz Sep 5, 2025
9931950
Resolve merge conflict in Dockerfile.n8n - use versioned git package
anatolyshipitz Sep 5, 2025
bd8a9d6
Refactor MarginalityResult and EffectiveMarginalityResult interfaces …
anatolyshipitz Sep 5, 2025
b0f6e76
Refactor date handling and contract type resolution in financial repo…
anatolyshipitz Sep 5, 2025
4201e4e
Remove docker-compose.override.yml file to streamline configuration a…
anatolyshipitz Sep 5, 2025
658fbc1
Refactor weekly report workflow initiation in launchWeeklyReport.ts
anatolyshipitz Sep 5, 2025
ad33549
Implement WeeklyFinancialReportCalculations class for improved financ…
anatolyshipitz Sep 5, 2025
4eea60f
Remove unused EffectiveMarginalityCalculator import from WeeklyFinanc…
anatolyshipitz Sep 5, 2025
b966818
Enhance tests for handleRunError function by adding process.exit mocking
anatolyshipitz Sep 5, 2025
595485c
Update WeeklyFinancialReportFormatter to improve notes formatting and…
anatolyshipitz Sep 5, 2025
623c9c9
Add project_hours to TargetUnit and update related calculations
anatolyshipitz Sep 21, 2025
84fda2d
Merge branch 'main' into feature/add-contract-type
anatolyshipitz Sep 21, 2025
e42cb38
Add project_hours to test data in WeeklyFinancialReport and TargetUni…
anatolyshipitz Sep 21, 2025
5fee636
Merge branch 'feature/add-contract-type' of github.com:speedandfuncti…
anatolyshipitz Sep 21, 2025
24bf804
Refactor test data in WeeklyFinancialReportSorting tests
anatolyshipitz Sep 21, 2025
ac509e6
Refactor sorting tests in WeeklyFinancialReportSorting
anatolyshipitz Sep 21, 2025
1b1fb88
Update TargetUnit interfaces and repository for optional project_hour…
anatolyshipitz Sep 21, 2025
24833df
Fix revenue calculation in WeeklyFinancialReportCalculations to handl…
anatolyshipitz Sep 24, 2025
9b8c5b1
Refactor EffectiveMarginalityCalculator and MarginalityCalculator for…
anatolyshipitz Oct 15, 2025
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
87 changes: 58 additions & 29 deletions workers/main/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default [
settings: {
'import/resolver': {
typescript: {
extensions: [".ts"]
extensions: ['.ts'],
},
},
},
Expand All @@ -34,15 +34,18 @@ export default [
'eslint.config.mjs',
'coverage',
'coverage/*',
'coverage/**/*'
'coverage/**/*',
],
rules: {
...tseslint.configs.recommended.rules,
...tseslint.configs['recommended-requiring-type-checking'].rules,
...prettier.configs.recommended.rules,

'prettier/prettier': 'error',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-unused-vars': [
'warn',
{ argsIgnorePattern: '^_' },
],
'@typescript-eslint/require-await': 'off',
'no-console': ['warn', { allow: ['error'] }],
'no-debugger': 'warn',
Expand Down Expand Up @@ -75,97 +78,122 @@ export default [
trailingUnderscore: 'allow',
filter: {
regex: '^[\'"].*[\'"]$|^[A-Z_]+$',
match: false
}
match: false,
},
},
// Object literal properties: allow camelCase, snake_case, MongoDB operators, dot notation, and quoted strings
{
selector: 'objectLiteralProperty',
format: null,
custom: {
regex: '^[a-zA-Z_][a-zA-Z0-9_]*$|^[\'"].*[\'"]$|^[0-9-]+$|^[A-Za-z][A-Za-z0-9-]*$|^\\$[a-zA-Z]+$|^[a-zA-Z_][a-zA-Z0-9_.]*$',
match: true
}
regex:
'^[a-zA-Z_][a-zA-Z0-9_]*$|^[\'"].*[\'"]$|^[0-9-]+$|^[A-Za-z][A-Za-z0-9-]*$|^\\$[a-zA-Z]+$|^[a-zA-Z_][a-zA-Z0-9_.]*$',
match: true,
},
},
// Allow PascalCase and snake_case for API/DB compatibility
{
selector: 'typeProperty',
format: null,
custom: {
regex: '^[A-Z][a-zA-Z0-9]*$|^[a-z][a-zA-Z0-9_]*$',
match: true
}
match: true,
},
},
// Prevent interfaces starting with 'I'
{
selector: 'interface',
format: ['PascalCase'],
custom: {
regex: '^I[A-Z]',
match: false
}
match: false,
},
},
// Enforce PascalCase for classes and types
{
selector: ['class', 'typeLike'],
format: ['PascalCase']
format: ['PascalCase'],
},
// Enforce PascalCase or UPPER_CASE for enum members
{
selector: 'enumMember',
format: ['PascalCase', 'UPPER_CASE']
format: ['PascalCase', 'UPPER_CASE'],
},
// Boolean variables with prefixes (is, has, should, can, will, did)
{
selector: 'variable',
types: ['boolean'],
format: ['PascalCase'],
prefix: ['is', 'has', 'should', 'can', 'will', 'did']
prefix: ['is', 'has', 'should', 'can', 'will', 'did'],
},
// Variables that represent classes/models (PascalCase) - only for specific patterns
{
selector: 'variable',
format: ['PascalCase'],
filter: {
regex: '^(FinAppRepository|TargetUnitRepository|TestModel|EmployeeModel|ProjectModel|SlackServiceNoToken|SlackServiceNoChannel)$',
match: true
}
regex:
'^(FinAppRepository|TargetUnitRepository|TestModel|EmployeeModel|ProjectModel|SlackServiceNoToken|SlackServiceNoChannel)$',
match: true,
},
},
// Parameters that can be snake_case (for API/DB compatibility)
{
selector: 'parameter',
format: null,
custom: {
regex: '^[a-z][a-zA-Z0-9_]*$',
match: true
}
match: true,
},
},
// Function naming with A/HC/LC pattern prefixes
{
selector: 'function',
format: ['PascalCase'],
prefix: [
// Action verbs
'get', 'setup', 'set', 'reset', 'remove', 'delete', 'compose', 'handle', 'create', 'init', 'build',
'get',
'setup',
'set',
'reset',
'remove',
'delete',
'compose',
'handle',
'create',
'init',
'build',
// Validation/Testing
'validate', 'test', 'expect', 'mock', 'try',
'validate',
'test',
'expect',
'mock',
'try',
// Formatting/Transformation
'format', 'transform', 'convert',
'format',
'transform',
'convert',
// Generation/Processing
'generate', 'process', 'parse',
'generate',
'process',
'parse',
// File operations
'read', 'write', 'save', 'load',
'read',
'write',
'save',
'load',
// Main operations
'run', 'start', 'stop', 'main'
]
'run',
'start',
'stop',
'main',
],
},
// Creation/Initialization functions should use PascalCase after prefix
{
selector: 'function',
format: ['PascalCase'],
prefix: ['create', 'init', 'build']
prefix: ['create', 'init', 'build'],
},

],

// Code complexity and size rules
Expand All @@ -176,6 +204,7 @@ export default [
'max-params': ['error', 5],
'max-statements': ['error', 50],
'complexity': ['error', 15],
'max-classes-per-file': ['error', 1],
},
},
// Override for test files to allow more nested callbacks and longer functions
Expand Down
Loading
Loading