Skip to content

Commit

Permalink
review eslint core rules: some rules about depth and number of stat…
Browse files Browse the repository at this point in the history
…ement
  • Loading branch information
zloirock committed Aug 21, 2023
1 parent 3e36d29 commit cf22aac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/eslint/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,12 @@ const base = {
eqeqeq: [ERROR, 'smart'],
// require logical assignment operator shorthand
'logical-assignment-operators': [ERROR, ALWAYS],
// enforce a maximum depth that blocks can be nested
'max-depth': [ERROR, { max: 5 }],
// enforce a maximum depth that callbacks can be nested
'max-nested-callbacks': [ERROR, 4],
'max-nested-callbacks': [ERROR, { max: 4 }],
// specify the maximum number of statement allowed in a function
'max-statements': [ERROR, 50],
'max-statements': [ERROR, { max: 50 }],
// require a capital letter for constructors
'new-cap': [ERROR, { newIsCap: true, capIsNew: false }],
// disallow window alert / confirm / prompt calls
Expand Down

0 comments on commit cf22aac

Please sign in to comment.