Browse Source

dev(eslint): Make `react-hooks/exhaustive-deps` not error in CI (#34488)

Billy Vong 2 years ago
parent
commit
59e78be834
1 changed files with 3 additions and 2 deletions
  1. 3 2
      .eslintrc.js

+ 3 - 2
.eslintrc.js

@@ -4,9 +4,10 @@
 const process = require('process');
 
 const isRelaxed = !!process.env.SENTRY_ESLINT_RELAXED;
+const isCi = !!process.env.CI;
 
 // Strict ruleset that runs on pre-commit and in local environments
-const strictRules = {
+const strictRulesNotCi = {
   'react-hooks/exhaustive-deps': ['error'],
 };
 
@@ -23,7 +24,7 @@ module.exports = {
   },
 
   rules: {
-    ...(!isRelaxed ? strictRules : {}),
+    ...(!isRelaxed && !isCi ? strictRulesNotCi : {}),
   },
 
   overrides: [