Skip to content

Commit

Permalink
feat!: max-nested-callbacks (max: 3)
Browse files Browse the repository at this point in the history
  • Loading branch information
mightyiam committed Dec 28, 2024
1 parent dc75cb8 commit 31fe71c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/plugin-usage/eslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ const usage: PluginUsage = {
// eslint-disable-next-line @typescript-eslint/no-magic-numbers -- default plus 150
{ max: 450, skipBlankLines: true, skipComments: true },
],
'max-nested-callbacks': [
'error',
// eslint-disable-next-line @typescript-eslint/no-magic-numbers -- arbitrary value
{ max: 3 },
],
'new-cap': ['error', { newIsCap: true, capIsNew: false, properties: true }],
'no-async-promise-executor': ['error'],
'no-caller': ['error'],
Expand Down
1 change: 0 additions & 1 deletion src/test/_rules_to_consider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ export const rulesToConsider: Record<string, string[]> = {
'eslint-comments': [],
'': [
'max-lines-per-function',
'max-nested-callbacks',
'max-statements',
'no-alert',
'no-await-in-loop',
Expand Down
5 changes: 5 additions & 0 deletions src/test/expected-exported-value/_eslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ export const expectedEslintRules: Record<
// eslint-disable-next-line @typescript-eslint/no-magic-numbers -- default plus 150
{ max: 450, skipBlankLines: true, skipComments: true },
],
'max-nested-callbacks': [
'error',
// eslint-disable-next-line @typescript-eslint/no-magic-numbers -- arbitrary value
{ max: 3 },
],
'new-cap': ['error', { newIsCap: true, capIsNew: false, properties: true }],
'no-async-promise-executor': ['error'],
'no-caller': ['error'],
Expand Down

0 comments on commit 31fe71c

Please sign in to comment.