Skip to content

Commit

Permalink
Add alias for react-spring in webpack config (#16196)
Browse files Browse the repository at this point in the history
* Add alias for react-spring in webpack config

* Add explanatory comment.

* Move to direct imports and linting rule.
  • Loading branch information
tellthemachines committed Jun 18, 2019
1 parent 7568e9c commit 53118e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ module.exports = {
selector: 'ImportDeclaration[source.value=/^@wordpress\\u002F.+\\u002F/]',
message: 'Path access on WordPress dependencies is not allowed.',
},
{
selector: 'ImportDeclaration[source.value=/^react-spring(?!\\u002Fweb\.cjs)/]',
message: 'The react-spring dependency must specify CommonJS bundle: react-spring/web.cjs',
},
{
selector: 'CallExpression[callee.name="deprecated"] Property[key.name="version"][value.value=/' + majorMinorRegExp + '/]',
message: 'Deprecated functions must be removed before releasing this version.',
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/snackbar/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import classnames from 'classnames';
import { omit, noop } from 'lodash';
import { useTransition, animated } from 'react-spring';
import { useTransition, animated } from 'react-spring/web.cjs';

/**
* WordPress dependencies
Expand Down

0 comments on commit 53118e1

Please sign in to comment.