@itcase/lint 1.1.113 → 1.1.114

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,9 @@
1
+ ## [1.1.114](https://github.com/ITCase/itcase-lint/compare/v1.1.113...v1.1.114) (2026-05-14)
2
+
3
+ ### Refactoring
4
+
5
+ * **eslint:** Update storybook meta rules ([e0e61ad](https://github.com/ITCase/itcase-lint/commit/e0e61ad51fc60dbd5a815319aa86ceed614a49e8))
6
+
1
7
  ## [1.1.113](https://github.com/ITCase/itcase-lint/compare/v1.1.112...v1.1.113) (2026-05-14)
2
8
 
3
9
  ### Refactoring
@@ -1,3 +1,3 @@
1
1
  import 'eslint-plugin-storybook';
2
- export { s as default } from '../index_xJLF6yi0.js';
2
+ export { s as default } from '../index_CLRVzI9l.js';
3
3
  import '@typescript-eslint/utils';
package/dist/eslint.js CHANGED
@@ -13,7 +13,7 @@ import globals from 'globals';
13
13
  import eslintTypeScript from 'typescript-eslint';
14
14
  import { s as sortUnionTypes, a as sortObjectTypes, b as sortObjects, c as sortExports, d as sortNamedExports, e as sortMaps, f as sortJSXProps, g as sortIntersectionTypes, h as sortInterfaces, i as sortEnums } from './sortUnionTypes_DpNdQEFU.js';
15
15
  import parser from '@typescript-eslint/parser';
16
- import { i as itcaseLintPlugin, p as pluginName, r as ruleName, a as pluginName$1, b as ruleName$1, s as storybookConfig } from './index_xJLF6yi0.js';
16
+ import { i as itcaseLintPlugin, p as pluginName, r as ruleName, a as pluginName$1, b as ruleName$1, s as storybookConfig } from './index_CLRVzI9l.js';
17
17
  import { noRestrictedSyntaxRestrictWords } from './eslint/restrictWords.js';
18
18
  export { default as eslintFigma } from './eslint/figma.js';
19
19
  import 'eslint-plugin-storybook';
@@ -307,6 +307,24 @@ function getStringLiteralValue(node) {
307
307
  }
308
308
  return undefined;
309
309
  }
310
+ function peelToObjectExpression(node) {
311
+ let current = node === null ? undefined : node;
312
+ while (current !== undefined) {
313
+ if (current.type === AST_NODE_TYPES.ObjectExpression) {
314
+ return current;
315
+ }
316
+ if (current.type === AST_NODE_TYPES.TSSatisfiesExpression) {
317
+ current = current.expression;
318
+ continue;
319
+ }
320
+ if (current.type === AST_NODE_TYPES.TSAsExpression) {
321
+ current = current.expression;
322
+ continue;
323
+ }
324
+ return null;
325
+ }
326
+ return null;
327
+ }
310
328
  function resolveMetaObject(declaration, sourceCode) {
311
329
  if (declaration.type === AST_NODE_TYPES.ObjectExpression) {
312
330
  return declaration;
@@ -319,15 +337,18 @@ function resolveMetaObject(declaration, sourceCode) {
319
337
  const init = decl.init;
320
338
  if (decl.id.type === AST_NODE_TYPES.Identifier &&
321
339
  decl.id.name === name &&
322
- init != null &&
323
- init.type === AST_NODE_TYPES.ObjectExpression) {
324
- return init;
340
+ init != null) {
341
+ const metaObject = peelToObjectExpression(init);
342
+ if (metaObject !== null) {
343
+ return metaObject;
344
+ }
325
345
  }
326
346
  }
327
347
  }
328
348
  }
349
+ return null;
329
350
  }
330
- return null;
351
+ return peelToObjectExpression(declaration);
331
352
  }
332
353
 
333
354
  const FIGMA_DOMAIN = 'figma.com';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/lint",
3
- "version": "1.1.113",
3
+ "version": "1.1.114",
4
4
  "author": "ITCase",
5
5
  "description": "Code style linter configuration presets",
6
6
  "engines": {