Skip to content

Commit

Permalink
fix(eslint-config): fix magic numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
andrepolischuk committed Jan 18, 2024
1 parent f0704d6 commit aeeae6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions packages/eslint-config/js.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-magic-numbers */
/**
* @rushstack/eslint-patch is used to include plugins as dev
* dependencies instead of imposing them as peer dependencies
Expand Down Expand Up @@ -45,7 +44,7 @@ module.exports = {
'no-magic-numbers': [
'error',
{
ignore: [0, 1],
ignore: [0, 1, 2],
enforceConst: true,
ignoreDefaultValues: true,
ignoreClassFieldInitialValues: true
Expand All @@ -55,9 +54,9 @@ module.exports = {
'max-depth': ['error', 2],
'max-nested-callbacks': ['error', 2],
'max-classes-per-file': 'error',
// eslint-disable-next-line no-magic-numbers
'max-params': ['error', 3],
'require-await': 'error',
'multiline-comment-style': ['error', 'starred-block'],
'no-prototype-builtins': 'off',
'no-global-assign': 'error',
'no-extend-native': 'error',
Expand Down
4 changes: 3 additions & 1 deletion packages/eslint-config/ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ module.exports = {
enforceForDeclarationWithTypeAnnotation: true
}
],
'no-magic-numbers': 'off',
'@typescript-eslint/no-magic-numbers': [
'error',
{
ignore: [0, 1],
ignore: [0, 1, 2],
enforceConst: true,
ignoreDefaultValues: true,
ignoreClassFieldInitialValues: true,
Expand All @@ -47,6 +48,7 @@ module.exports = {
ignoreTypeIndexes: true
}
],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-function-return-type': [
'error',
{allowExpressions: true}
Expand Down

0 comments on commit aeeae6d

Please sign in to comment.