Skip to content

Commit

Permalink
Reduce the max code complexity
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisMBarr committed Jun 2, 2024
1 parent dcd5ff6 commit cc7ef7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default tseslint.config(
'@typescript-eslint/strict-boolean-expressions': 'warn',

'array-callback-return': 'warn',
complexity: ['warn', { max: 15 }],
complexity: ['warn', { max: 7 }],
eqeqeq: ['warn', 'always', { null: 'ignore' }],
'no-unused-vars': 'warn',
'object-shorthand': ['warn', 'always'],
Expand Down
1 change: 1 addition & 0 deletions src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export class Parser {
};
}

// eslint-disable-next-line complexity -- This does a lot of null coalescing, which is seen as a code branch that increases complexity. What this actually does is not that complex, so we ar OK to disable this rule here to allow our overall lint complexity to be enforced lower
public getSongProperties(props: xmlModel.IXmlProperties): parserModel.IParserProperties {
// console.log('props', props);

Expand Down

0 comments on commit cc7ef7d

Please sign in to comment.