Skip to content

Commit 7858d95

Browse files
committed
remove duplicated rules, scope plugin just to test files
1 parent c7da93a commit 7858d95

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

packages/eslint-config-sdk/src/index.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
node: true,
55
},
66
extends: ['prettier', 'eslint:recommended', 'plugin:import/errors', 'plugin:import/warnings'],
7-
plugins: ['@sentry-internal/eslint-plugin-sdk', 'simple-import-sort', 'jest'],
7+
plugins: ['@sentry-internal/eslint-plugin-sdk', 'simple-import-sort'],
88
overrides: [
99
{
1010
// Configuration for JavaScript files
@@ -184,32 +184,24 @@ module.exports = {
184184
'@typescript-eslint/no-empty-function': 'off',
185185
'@sentry-internal/sdk/no-optional-chaining': 'off',
186186
'@sentry-internal/sdk/no-nullish-coalescing': 'off',
187-
188-
// Prevent permanent usage of `it.only`, `fit`, `test.only` etc
189-
// We want to avoid debugging leftovers making their way into the codebase
190-
"jest/no-focused-tests": "error",
191-
192-
// Prevent permanent usage of `it.skip`, `xit`, `test.skip` etc
193-
// We want to avoid debugging leftovers making their way into the codebase
194-
// If there's a good reason to skip a test (e.g. bad flakiness), just add an ignore comment
195-
"jest/no-disabled-tests": "error",
196187
},
197188
},
198189
{
199190
// Configuration only for test files (this won't apply to utils or other files in test directories)
191+
plugins: ['jest'],
200192
env: {
201193
jest: true,
202194
},
203195
files: ['test.ts', '*.test.ts', '*.test.tsx', '*.test.js', '*.test.jsx'],
204196
rules: {
205197
// Prevent permanent usage of `it.only`, `fit`, `test.only` etc
206198
// We want to avoid debugging leftovers making their way into the codebase
207-
"jest/no-focused-tests": "error",
199+
'jest/no-focused-tests': 'error',
208200

209201
// Prevent permanent usage of `it.skip`, `xit`, `test.skip` etc
210202
// We want to avoid debugging leftovers making their way into the codebase
211203
// If there's a good reason to skip a test (e.g. bad flakiness), just add an ignore comment
212-
"jest/no-disabled-tests": "error",
204+
'jest/no-disabled-tests': 'error',
213205
},
214206
},
215207
{

0 commit comments

Comments
 (0)