Skip to content

Commit

Permalink
ESLint: Forbid usage of test utils inside production code (#2573)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov authored May 21, 2020
1 parent 8be49f6 commit 437cc1b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,12 @@ rules:
import/named: error
import/default: error
import/namespace: error
import/no-restricted-paths: off
import/no-restricted-paths:
- error
- basePath: './'
zones:
- { target: './src', from: 'src/__testUtils__' }
- { target: './src', from: 'src/__fixtures__' }
import/no-absolute-path: error
import/no-dynamic-require: error
import/no-internal-modules: off
Expand Down Expand Up @@ -626,7 +631,8 @@ overrides:
rules:
node/no-unpublished-import: off
node/no-unpublished-require: off
import/no-extraneous-dependencies: off
import/no-restricted-paths: off
import/no-extraneous-dependencies: [error, { devDependencies: true }]
import/no-nodejs-modules: off
no-restricted-syntax: off
- files: 'resources/**'
Expand All @@ -639,7 +645,7 @@ overrides:
node/no-sync: off
node/global-require: off
import/no-dynamic-require: off
import/no-extraneous-dependencies: off
import/no-extraneous-dependencies: [error, { devDependencies: true }]
import/no-nodejs-modules: off
import/no-commonjs: off
no-await-in-loop: off
Expand Down

0 comments on commit 437cc1b

Please sign in to comment.