Skip to content

Commit

Permalink
fix: resolve magic number warnings in eslint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
mohitb35 committed Jul 30, 2024
1 parent 0208e9d commit 702a801
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
const MAX_PARAMS = 4;
const JSX_INDENT_SIZE = 2;

module.exports = {
env: {
node: true,
Expand Down Expand Up @@ -40,7 +43,7 @@ module.exports = {
// Code Quality
'complexity': ['warn', { max: 10 }],
'max-lines': ['warn', { max: 300, skipBlankLines: true, skipComments: true }],
'max-params': ['warn', 4],
'max-params': ['warn', MAX_PARAMS],
'no-magic-numbers': ['warn', { ignore: [0, 1] }],

// Security
Expand Down Expand Up @@ -76,7 +79,7 @@ module.exports = {
],
'react/jsx-indent': [
'warn',
2
JSX_INDENT_SIZE
],
'import/extensions': [
'warn',
Expand Down

0 comments on commit 702a801

Please sign in to comment.