Skip to content

Commit 7a067fb

Browse files
authored
updated values for max-lines-per-function and max-lines (#229)
1 parent 983660d commit 7a067fb

File tree

6 files changed

+802
-921
lines changed

6 files changed

+802
-921
lines changed

.github/workflows/check-pr-reviews.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
name: Check PR Reviews
1111
steps:
12-
- name: Check PR Reviews
12+
- name: Perform Check of PR Reviews
1313
uses: checkdigit/github-actions/check-pr-reviews@main
1414
env:
1515
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
node-version: ['22.x', '23.x']
17+
node-version: ['22.x', '24.x']
1818
steps:
1919
- name: Checkout Code
2020
uses: actions/checkout@v4
@@ -43,7 +43,7 @@ jobs:
4343
runs-on: ubuntu-latest
4444
strategy:
4545
matrix:
46-
node-version: ['22.x', '23.x']
46+
node-version: ['22.x', '24.x']
4747
steps:
4848
- name: Checkout Code
4949
uses: actions/checkout@v4

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ on:
66

77
jobs:
88
publish:
9-
name: Publish to NPM
109
runs-on: ubuntu-latest
1110
permissions:
1211
contents: read
1312
id-token: write
13+
name: Publish to NPM
1414
steps:
1515
- name: Checkout Code
1616
uses: actions/checkout@v4

index.mjs

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ import markdown from '@eslint/markdown';
2525
import yaml from 'eslint-plugin-yml';
2626

2727
const ignores = [
28-
...(await fs.readFile('.gitignore', 'utf-8')).split('\n').filter((path) => path.trim() !== ''),
28+
...(await fs.readFile('.gitignore', 'utf-8'))
29+
.split('\n')
30+
.filter((path) => path.trim() !== ''),
2931
'eslint.config.mjs',
3032
];
3133
const __filename = fileURLToPath(import.meta.url);
@@ -95,8 +97,15 @@ const tsConfigurations = [
9597
'@typescript-eslint/require-await': 'off',
9698

9799
// sonarjs doesn't implement the no-big-function rule probably because this rule already exists within stock eslint
98-
// set to 200 because that is sonar's default
99-
'max-lines-per-function': ['error', 200],
100+
// increasing this to 250 instead of the default value of 200 because of prettier's printWidth reduced to 80
101+
'max-lines-per-function': [
102+
'error',
103+
{
104+
max: 250,
105+
skipBlankLines: true,
106+
skipComments: true,
107+
},
108+
],
100109

101110
// enforce use of curly braces around if statements and discourage one-line ifs
102111
curly: 'error',
@@ -124,7 +133,15 @@ const tsConfigurations = [
124133

125134
'n/no-restricted-import': [
126135
'error',
127-
['moment', 'clone', 'fclone', 'lodash', 'underscore', 'fs-extra', '@checkdigit/typescript'],
136+
[
137+
'moment',
138+
'clone',
139+
'fclone',
140+
'lodash',
141+
'underscore',
142+
'fs-extra',
143+
'@checkdigit/typescript',
144+
],
128145
],
129146

130147
'n/no-process-env': 'error',
@@ -292,7 +309,7 @@ const tsConfigurations = [
292309
'max-lines': [
293310
'error',
294311
{
295-
max: 500,
312+
max: 625,
296313
skipBlankLines: true,
297314
skipComments: true,
298315
},
@@ -373,7 +390,16 @@ const tsConfigurations = [
373390
// configure this to not report side effects for certain functions
374391
'@checkdigit/no-side-effects': [
375392
'error',
376-
{ excludedIdentifiers: ['debug', 'log', 'memoize', 'Object.freeze', 'promisify', 'Symbol.for'] },
393+
{
394+
excludedIdentifiers: [
395+
'debug',
396+
'log',
397+
'memoize',
398+
'Object.freeze',
399+
'promisify',
400+
'Symbol.for',
401+
],
402+
},
377403
],
378404
},
379405
},

0 commit comments

Comments
 (0)