Skip to content

Commit

Permalink
configure lint for jest
Browse files Browse the repository at this point in the history
  • Loading branch information
zburke committed Jan 23, 2025
1 parent 4e0bfff commit e7e0b7b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"env": {
"jest": true
},
"extends": "@folio/eslint-config-stripes",
"parser": "@babel/eslint-parser",
"rules": {
Expand Down
3 changes: 1 addition & 2 deletions lib/LinkedUser/LinkedUser.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { render, screen } from '@folio/jest-config-stripes/testing-library/react';
import { useStripes } from '@folio/stripes-core';

Check warning on line 2 in lib/LinkedUser/LinkedUser.test.js

View workflow job for this annotation

GitHub Actions / ui / Install and lint / Install and lint

'useStripes' is defined but never used. Allowed unused vars must match /React/u
import { TextLink } from '@folio/stripes-components';

import LinkedUser from './LinkedUser';

Expand All @@ -12,7 +11,7 @@ jest.mock('stripes-config', () => (
metadata: {},
}
),
{ virtual: true });
{ virtual: true });

jest.mock('@folio/stripes-core', () => ({
...jest.requireActual('@folio/stripes-core'),
Expand Down
3 changes: 3 additions & 0 deletions tests/jest/setupFiles.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import 'regenerator-runtime/runtime';

Check failure on line 1 in tests/jest/setupFiles.js

View workflow job for this annotation

GitHub Actions / ui / Install and lint / Install and lint

'/home/runner/work/stripes-smart-components/stripes-smart-components/node_modules/regenerator-runtime/runtime.js' imported multiple times


// See https://github.com/facebook/jest/issues/335#issuecomment-703691592
import './__mock__';

Expand Down

0 comments on commit e7e0b7b

Please sign in to comment.