Socket
Socket
Sign inDemoInstall

eslint-plugin-storybook

Package Overview
Dependencies
Maintainers
0
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-storybook - npm Package Compare versions

Comparing version 0.9.0--canary.156.da7873a.0 to 0.9.0--canary.156.ed236ca.0

2

dist/rules/await-interactions.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc