Skip to content

Commit

Permalink
use eslint overrides for test files (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
onemen committed May 22, 2023
1 parent 008a359 commit 6dd510b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
29 changes: 18 additions & 11 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,26 @@ module.exports = {
extends: [
'@remix-run/eslint-config',
'@remix-run/eslint-config/node',
'@remix-run/eslint-config/jest-testing-library',
'prettier',
],
overrides: [
{
extends: ['@remix-run/eslint-config/jest-testing-library'],
files: ['app/**/__tests__/**/*', 'app/**/*.{spec,test}.*'],
rules: {
'testing-library/no-await-sync-events': 'off',
'jest-dom/prefer-in-document': 'off',
},
// we're using vitest which has a very similar API to jest
// (so the linting plugins work nicely), but it means we have to explicitly
// set the jest version.
settings: {
jest: {
version: 28,
},
},
},
],
rules: {
'@typescript-eslint/consistent-type-imports': [
'warn',
Expand All @@ -15,16 +32,6 @@ module.exports = {
fixStyle: 'inline-type-imports',
},
],
'testing-library/no-await-sync-events': 'off',
'jest-dom/prefer-in-document': 'off',
'@typescript-eslint/no-duplicate-imports': 'warn',
},
// we're using vitest which has a very similar API to jest
// (so the linting plugins work nicely), but it means we have to explicitly
// set the jest version.
settings: {
jest: {
version: 28,
},
},
}
6 changes: 0 additions & 6 deletions tests/.eslintrc

This file was deleted.

0 comments on commit 6dd510b

Please sign in to comment.