Skip to content

Commit

Permalink
Add restrictedImport rules.
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniGuardiola committed Jul 30, 2024
1 parent db1d478 commit 7a43523
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -459,13 +459,26 @@ module.exports = {
// the `@wordpress/components` package, hence why importing those
// dependencies should be allowed in the components package.
{
paths: restrictedImports.filter(
( { name } ) =>
! [
'@ariakit/react',
'framer-motion',
].includes( name )
),
paths: [
...restrictedImports.filter(
( { name } ) =>
! [
'@ariakit/react',
'framer-motion',
].includes( name )
),
{
name: '@testing-library/user-event',
message:
'Please use event triggers (`click`, `press`, etc) from `@ariakit/test` instead.',
},
{
name: '@testing-library/react',
importNames: [ 'render' ],
message:
'Please use `render` from `@ariakit/test` instead.',
},
],
},
],
},
Expand Down

0 comments on commit 7a43523

Please sign in to comment.