|
@@ -1,18 +1,11 @@
|
|
|
/* eslint-env node */
|
|
|
|
|
|
-const isRelaxed = !!process.env.SENTRY_ESLINT_RELAXED;
|
|
|
-
|
|
|
-// Strict ruleset that runs on pre-commit and in local environments
|
|
|
-const ADDITIONAL_HOOKS_TO_CHECK_DEPS_FOR =
|
|
|
- '(useEffectAfterFirstRender|useMemoWithPrevious)';
|
|
|
-
|
|
|
module.exports = {
|
|
|
root: true,
|
|
|
- extends: [isRelaxed ? 'sentry-app' : 'sentry-app/strict'],
|
|
|
+ extends: ['sentry-app/strict'],
|
|
|
globals: {
|
|
|
require: false,
|
|
|
expect: false,
|
|
|
- sinon: false,
|
|
|
MockApiClient: true,
|
|
|
tick: true,
|
|
|
jest: true,
|
|
@@ -20,7 +13,7 @@ module.exports = {
|
|
|
rules: {
|
|
|
'react-hooks/exhaustive-deps': [
|
|
|
'error',
|
|
|
- {additionalHooks: ADDITIONAL_HOOKS_TO_CHECK_DEPS_FOR},
|
|
|
+ {additionalHooks: '(useEffectAfterFirstRender|useMemoWithPrevious)'},
|
|
|
],
|
|
|
|
|
|
// TODO(@anonrig): Remove this from eslint-sentry-config
|
|
@@ -40,7 +33,7 @@ module.exports = {
|
|
|
ignorePatterns: ['*.json'],
|
|
|
overrides: [
|
|
|
{
|
|
|
- files: ['tests/js/**/*.{ts,js}'],
|
|
|
+ files: ['static/**/*.spec.{ts,js}', 'tests/js/**/*.{ts,js}'],
|
|
|
extends: ['plugin:testing-library/react', 'sentry-app/strict'],
|
|
|
rules: {
|
|
|
// TODO(@anonrig): Remove this from eslint-sentry-config
|