eslint-plugin-storybook 0.6.13 → 0.6.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # v0.6.14 (Wed Sep 20 2023)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - use-storybook-expect: allow storybook/test imports [#141](https://github.com/storybookjs/eslint-plugin-storybook/pull/141) ([@yannbf](https://github.com/yannbf))
6
+
7
+ #### Authors: 1
8
+
9
+ - Yann Braga ([@yannbf](https://github.com/yannbf))
10
+
11
+ ---
12
+
1
13
  # v0.6.13 (Thu Jul 20 2023)
2
14
 
3
15
  #### ⚠️ Pushed to `main`
@@ -30,7 +30,9 @@ module.exports = (0, create_storybook_rule_1.createStorybookRule)({
30
30
  // Helpers
31
31
  //----------------------------------------------------------------------
32
32
  const isExpectFromStorybookImported = (node) => {
33
- return (node.source.value === '@storybook/jest' &&
33
+ const { value: packageName } = node.source;
34
+ const usesExpectFromStorybook = packageName === '@storybook/jest' || packageName === '@storybook/test';
35
+ return (usesExpectFromStorybook &&
34
36
  node.specifiers.find((spec) => (0, ast_1.isImportSpecifier)(spec) && spec.imported.name === 'expect'));
35
37
  };
36
38
  //----------------------------------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-storybook",
3
- "version": "0.6.13",
3
+ "version": "0.6.14",
4
4
  "description": "Best practice rules for Storybook",
5
5
  "keywords": [
6
6
  "eslint",