@itcase/lint 1.1.112 → 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 +12 -0
- package/dist/eslint/perfectionist.js +1 -1
- package/dist/eslint/storybook.js +1 -1
- package/dist/eslint.js +2 -2
- package/dist/{index_xJLF6yi0.js → index_CLRVzI9l.js} +25 -4
- package/dist/{sortUnionTypes_B60tZBM_.js → sortUnionTypes_DpNdQEFU.js} +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
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
|
+
|
|
7
|
+
## [1.1.113](https://github.com/ITCase/itcase-lint/compare/v1.1.112...v1.1.113) (2026-05-14)
|
|
8
|
+
|
|
9
|
+
### Refactoring
|
|
10
|
+
|
|
11
|
+
* **other:** Add sotr in props ([d300544](https://github.com/ITCase/itcase-lint/commit/d300544e1cc46d3cc6c8bec67c0d6b3923d62fd6))
|
|
12
|
+
|
|
1
13
|
## [1.1.112](https://github.com/ITCase/itcase-lint/compare/v1.1.111...v1.1.112) (2026-05-13)
|
|
2
14
|
|
|
3
15
|
### Refactoring
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { i as sortEnums, c as sortExports, h as sortInterfaces, g as sortIntersectionTypes, f as sortJSXProps, e as sortMaps, d as sortNamedExports, a as sortObjectTypes, b as sortObjects, s as sortUnionTypes } from '../
|
|
1
|
+
export { i as sortEnums, c as sortExports, h as sortInterfaces, g as sortIntersectionTypes, f as sortJSXProps, e as sortMaps, d as sortNamedExports, a as sortObjectTypes, b as sortObjects, s as sortUnionTypes } from '../sortUnionTypes_DpNdQEFU.js';
|
|
2
2
|
|
|
3
3
|
const sortClasses = [
|
|
4
4
|
'error',
|
package/dist/eslint/storybook.js
CHANGED
package/dist/eslint.js
CHANGED
|
@@ -11,9 +11,9 @@ import eslintReact from 'eslint-plugin-react';
|
|
|
11
11
|
import eslintReactHooks from 'eslint-plugin-react-hooks';
|
|
12
12
|
import globals from 'globals';
|
|
13
13
|
import eslintTypeScript from 'typescript-eslint';
|
|
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 './
|
|
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 './
|
|
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
|
-
|
|
324
|
-
|
|
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
|
|
351
|
+
return peelToObjectExpression(declaration);
|
|
331
352
|
}
|
|
332
353
|
|
|
333
354
|
const FIGMA_DOMAIN = 'figma.com';
|