eslint-plugin-storybook
Advanced tools
Comparing version 0.9.0--canary.156.da7873a.0 to 0.9.0--canary.156.ed236ca.0
@@ -16,3 +16,3 @@ "use strict"; | ||
categories: [constants_1.CategoryId.ADDON_INTERACTIONS, constants_1.CategoryId.RECOMMENDED], | ||
recommended: 'error', // or 'warn' | ||
recommended: 'strict', | ||
}, | ||
@@ -19,0 +19,0 @@ messages: { |
@@ -17,3 +17,3 @@ "use strict"; | ||
categories: [constants_1.CategoryId.RECOMMENDED, constants_1.CategoryId.ADDON_INTERACTIONS], | ||
recommended: 'error', | ||
recommended: 'strict', | ||
}, | ||
@@ -20,0 +20,0 @@ messages: { |
@@ -18,3 +18,3 @@ "use strict"; | ||
categories: [constants_1.CategoryId.CSF], | ||
recommended: 'warn', | ||
recommended: 'recommended', | ||
}, | ||
@@ -21,0 +21,0 @@ messages: { |
@@ -21,3 +21,3 @@ "use strict"; | ||
categories: [constants_1.CategoryId.CSF, constants_1.CategoryId.RECOMMENDED], | ||
recommended: 'error', | ||
recommended: 'strict', | ||
}, | ||
@@ -24,0 +24,0 @@ messages: { |
@@ -20,3 +20,3 @@ "use strict"; | ||
categories: [constants_1.CategoryId.CSF, constants_1.CategoryId.RECOMMENDED], | ||
recommended: 'warn', | ||
recommended: 'recommended', | ||
}, | ||
@@ -23,0 +23,0 @@ messages: { |
@@ -18,3 +18,3 @@ "use strict"; | ||
excludeFromConfig: true, | ||
recommended: 'error', | ||
recommended: 'strict', | ||
}, | ||
@@ -21,0 +21,0 @@ messages: { |
@@ -20,3 +20,3 @@ "use strict"; | ||
categories: [constants_1.CategoryId.CSF, constants_1.CategoryId.RECOMMENDED], | ||
recommended: 'warn', | ||
recommended: 'recommended', | ||
}, | ||
@@ -23,0 +23,0 @@ messages: { |
@@ -16,3 +16,3 @@ "use strict"; | ||
categories: [constants_1.CategoryId.CSF_STRICT], | ||
recommended: 'error', | ||
recommended: 'strict', | ||
}, | ||
@@ -19,0 +19,0 @@ messages: { |
@@ -20,3 +20,3 @@ "use strict"; | ||
categories: [constants_1.CategoryId.CSF_STRICT], | ||
recommended: 'error', | ||
recommended: 'strict', | ||
}, | ||
@@ -23,0 +23,0 @@ messages: { |
@@ -29,3 +29,3 @@ "use strict"; | ||
categories: [constants_1.CategoryId.RECOMMENDED], | ||
recommended: 'error', // or 'error' | ||
recommended: 'strict', | ||
}, | ||
@@ -32,0 +32,0 @@ messages: { |
@@ -22,3 +22,3 @@ "use strict"; | ||
categories: [constants_1.CategoryId.RECOMMENDED], | ||
recommended: 'warn', | ||
recommended: 'stylistic', | ||
}, | ||
@@ -46,10 +46,10 @@ messages: { | ||
const getModuleScope = () => { | ||
// @ts-expect-error TODO: when we will upgrade `@typescript-eslint/utils` v7.x from v5.x on this package, we should resolve type definion with latest version. | ||
// In `@typescript-eslint/utils` v5.x, cannot resolve of `sourceCode`, because type definition is not still provide from that version. | ||
var _a, _b; | ||
const { sourceCode } = context; | ||
// Compatibility implementation for eslint v8.x and v9.x or later | ||
// see https://eslint.org/blog/2023/09/preparing-custom-rules-eslint-v9/#context.getscope() | ||
// @ts-expect-error keep it for compatibility with eslint v8.x | ||
if (sourceCode.getScope) { | ||
// for eslint v9.x or later | ||
return sourceCode.scopeManager.scopes.find((scope) => scope.type === 'module'); | ||
return (_b = (_a = sourceCode.scopeManager) === null || _a === void 0 ? void 0 : _a.scopes) === null || _b === void 0 ? void 0 : _b.find((scope) => scope.type === 'module'); | ||
} | ||
@@ -56,0 +56,0 @@ else { |
@@ -18,3 +18,3 @@ "use strict"; | ||
categories: [constants_1.CategoryId.RECOMMENDED, constants_1.CategoryId.CSF], | ||
recommended: 'error', | ||
recommended: 'strict', | ||
}, | ||
@@ -21,0 +21,0 @@ messages: { |
@@ -20,3 +20,3 @@ "use strict"; | ||
categories: [constants_1.CategoryId.ADDON_INTERACTIONS, constants_1.CategoryId.RECOMMENDED], | ||
recommended: 'error', | ||
recommended: 'strict', | ||
}, | ||
@@ -23,0 +23,0 @@ messages: { |
@@ -19,3 +19,3 @@ "use strict"; | ||
categories: [constants_1.CategoryId.ADDON_INTERACTIONS, constants_1.CategoryId.RECOMMENDED], | ||
recommended: 'error', | ||
recommended: 'strict', | ||
}, | ||
@@ -22,0 +22,0 @@ schema: [], |
@@ -6,3 +6,3 @@ "use strict"; | ||
// description: 'bla', | ||
// recommended: 'error', | ||
// recommended: 'strict', | ||
// } | ||
@@ -9,0 +9,0 @@ // const meta: StorybookRuleMeta<'someId'> = { |
@@ -12,4 +12,2 @@ "use strict"; | ||
let meta = node.declaration; | ||
// @ts-expect-error TODO: when we will upgrade `@typescript-eslint/utils` v7.x from v5.x on this package, we should resolve type definion with latest version. | ||
// In `@typescript-eslint/utils` v5.x, cannot resolve of `sourceCode`, because type definition is not still provide from that version. | ||
const { sourceCode } = context; | ||
@@ -16,0 +14,0 @@ if ((0, ast_1.isIdentifier)(meta)) { |
{ | ||
"name": "eslint-plugin-storybook", | ||
"version": "0.9.0--canary.156.da7873a.0", | ||
"version": "0.9.0--canary.156.ed236ca.0", | ||
"description": "Best practice rules for Storybook", | ||
@@ -56,3 +56,3 @@ "keywords": [ | ||
"@storybook/csf": "^0.0.1", | ||
"@typescript-eslint/utils": "^5.62.0", | ||
"@typescript-eslint/utils": "^7.15.0", | ||
"ts-dedent": "^2.2.0" | ||
@@ -67,4 +67,4 @@ }, | ||
"@types/requireindex": "^1.2.4", | ||
"@typescript-eslint/eslint-plugin": "^5.62.0", | ||
"@typescript-eslint/parser": "^5.62.0", | ||
"@typescript-eslint/eslint-plugin": "^7.15.0", | ||
"@typescript-eslint/parser": "^7.15.0", | ||
"auto": "^11.1.6", | ||
@@ -102,3 +102,4 @@ "eslint": "^8.56.0", | ||
] | ||
} | ||
}, | ||
"packageManager": "pnpm@9.1.1" | ||
} |
@@ -100,3 +100,3 @@ <p align="center"> | ||
// or whatever matches stories specified in .storybook/main.js | ||
"files": ['*.stories.@(ts|tsx|js|jsx|mjs|cjs)'], | ||
"files": ['**/*.stories.@(ts|tsx|js|jsx|mjs|cjs)'], | ||
"rules": { | ||
@@ -141,3 +141,3 @@ // example of overriding a rule | ||
{ | ||
files: ['*.stories.@(ts|tsx|js|jsx|mjs|cjs)'], | ||
files: ['**/*.stories.@(ts|tsx|js|jsx|mjs|cjs)'], | ||
rules: { | ||
@@ -144,0 +144,0 @@ // example of overriding a rule |
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
96315
1838
+ Added@typescript-eslint/scope-manager@7.18.0(transitive)
+ Added@typescript-eslint/types@7.18.0(transitive)
+ Added@typescript-eslint/typescript-estree@7.18.0(transitive)
+ Added@typescript-eslint/utils@7.18.0(transitive)
+ Added@typescript-eslint/visitor-keys@7.18.0(transitive)
+ Addedbrace-expansion@2.0.1(transitive)
+ Addedminimatch@9.0.5(transitive)
+ Addedts-api-utils@1.3.0(transitive)
- Removed@types/semver@7.5.8(transitive)
- Removed@typescript-eslint/scope-manager@5.62.0(transitive)
- Removed@typescript-eslint/types@5.62.0(transitive)
- Removed@typescript-eslint/typescript-estree@5.62.0(transitive)
- Removed@typescript-eslint/utils@5.62.0(transitive)
- Removed@typescript-eslint/visitor-keys@5.62.0(transitive)
- Removedtslib@1.14.1(transitive)
- Removedtsutils@3.21.0(transitive)