Skip to content

Commit 41db247

Browse files
committed
Add max-lines-per-function ESLint rule with test file override
- Add max-lines-per-function rule with 50 line limit - Add test file override allowing 150 lines per function - Update test file override comment to reflect additional rule
1 parent aa9c9d3 commit 41db247

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

workers/main/eslint.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,19 @@ export default [
6666
// Code complexity and size rules
6767
'max-depth': ['error', 4],
6868
'max-lines': ['error', 300],
69+
'max-lines-per-function': ['error', 50],
6970
'max-nested-callbacks': ['error', 3],
7071
'max-params': ['error', 5],
7172
'max-statements': ['error', 50],
7273
'complexity': ['error', 15],
7374
},
7475
},
75-
// Override for test files to allow more nested callbacks
76+
// Override for test files to allow more nested callbacks and longer functions
7677
{
7778
files: ['**/*.test.ts', '**/*.test.js'],
7879
rules: {
7980
'max-nested-callbacks': ['error', 4],
81+
'max-lines-per-function': ['error', 150],
8082
},
8183
},
8284
];

0 commit comments

Comments
 (0)