eslint-plugin-storybook
Advanced tools
Comparing version 0.6.9 to 0.6.10
@@ -0,1 +1,14 @@ | ||
# v0.6.10 (Tue Jan 10 2023) | ||
#### 🐛 Bug Fix | ||
- chore: fix ESLint and TypeScript issues [#113](https://github.com/storybookjs/eslint-plugin-storybook/pull/113) ([@Dschungelabenteuer](https://github.com/Dschungelabenteuer) [@yannbf](https://github.com/yannbf)) | ||
#### Authors: 2 | ||
- n028 ([@Dschungelabenteuer](https://github.com/Dschungelabenteuer)) | ||
- Yann Braga ([@yannbf](https://github.com/yannbf)) | ||
--- | ||
# v0.6.9 (Tue Jan 10 2023) | ||
@@ -2,0 +15,0 @@ |
@@ -106,3 +106,3 @@ "use strict"; | ||
let isImportedFromStorybook = true; | ||
let invocationsThatShouldBeAwaited = []; | ||
const invocationsThatShouldBeAwaited = []; | ||
return { | ||
@@ -109,0 +109,0 @@ ImportDeclaration(node) { |
@@ -67,3 +67,3 @@ "use strict"; | ||
//---------------------------------------------------------------------- | ||
let invocationsWithoutProperContext = []; | ||
const invocationsWithoutProperContext = []; | ||
return { | ||
@@ -70,0 +70,0 @@ CallExpression(node) { |
@@ -62,3 +62,3 @@ "use strict"; | ||
const ruleProperties = ['title', 'args']; | ||
let dynamicProperties = []; | ||
const dynamicProperties = []; | ||
const metaNodes = meta.properties.filter((prop) => 'key' in prop && 'name' in prop.key && ruleProperties.includes(prop.key.name)); | ||
@@ -65,0 +65,0 @@ metaNodes.forEach((metaNode) => { |
@@ -71,3 +71,3 @@ "use strict"; | ||
for (let i = 0; i < referenceCount; i++) { | ||
const ref = variable.references[i]; | ||
const ref = variable === null || variable === void 0 ? void 0 : variable.references[i]; | ||
if (ref && !ref.init) { | ||
@@ -89,3 +89,3 @@ yield fixer.replaceTextRange(ref.identifier.range, pascal); | ||
let nonStoryExportsConfig; | ||
let namedExports = []; | ||
const namedExports = []; | ||
let hasStoriesOfImport = false; | ||
@@ -107,3 +107,5 @@ return { | ||
} | ||
catch (err) { } | ||
catch (err) { | ||
// | ||
} | ||
} | ||
@@ -110,0 +112,0 @@ }, |
@@ -39,3 +39,3 @@ "use strict"; | ||
let meta; | ||
let namedExports = []; | ||
const namedExports = []; | ||
return { | ||
@@ -56,3 +56,5 @@ ImportSpecifier(node) { | ||
} | ||
catch (err) { } | ||
catch (err) { | ||
// | ||
} | ||
} | ||
@@ -59,0 +61,0 @@ }, |
@@ -40,3 +40,3 @@ "use strict"; | ||
let isImportingFromStorybookExpect = false; | ||
let expectInvocations = []; | ||
const expectInvocations = []; | ||
return { | ||
@@ -43,0 +43,0 @@ ImportDeclaration(node) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// const docs: StorybookRuleMetaDocs<any> = { | ||
// recommended: true, | ||
// Comment out for testing purposes: | ||
// const docs: StorybookRuleMetaDocs = { | ||
// description: 'bla', | ||
// recommended: 'error', | ||
// } | ||
// const meta: StorybookRuleMeta<'someId', any> = { | ||
// const meta: StorybookRuleMeta<'someId'> = { | ||
// messages: { | ||
@@ -10,0 +10,0 @@ // someId: 'yea', |
@@ -37,8 +37,7 @@ "use strict"; | ||
} | ||
// @ts-ignore | ||
// @ts-expect-error TODO: t should be only StringLiteral or Literal, and the type is not resolving correctly | ||
return t.value; | ||
}); | ||
case 'Literal': | ||
// TODO: Investigation needed. Type systems says, that "RegExpLiteral" does not exist | ||
// @ts-ignore | ||
// @ts-expect-error TODO: Investigation needed. Type systems says, that "RegExpLiteral" does not exist | ||
case 'RegExpLiteral': | ||
@@ -45,0 +44,0 @@ // @ts-ignore |
{ | ||
"name": "eslint-plugin-storybook", | ||
"version": "0.6.9", | ||
"version": "0.6.10", | ||
"description": "Best practice rules for Storybook", | ||
@@ -59,2 +59,3 @@ "keywords": [ | ||
"@types/requireindex": "^1.2.0", | ||
"@typescript-eslint/eslint-plugin": "^5.47.1", | ||
"@typescript-eslint/parser": "^5.3.0", | ||
@@ -61,0 +62,0 @@ "auto": "^10.32.2", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
103841
1598
23