@itcase/lint 1.1.139 → 1.1.140
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 +7 -0
- package/dist/eslint/index.js +1 -1
- package/dist/eslint/mobx/index.d.ts +3 -19
- package/dist/eslint/mobx/index.js +3 -5
- package/dist/eslint/mobx/index.test.d.ts +1 -0
- package/dist/eslint/storybook/index.js +1 -1
- package/dist/eslint/storybook/metaParametersDesign/utils.d.ts +2 -2
- package/dist/{index_CmQAJvhW.js → index_7CTdt6Tj.js} +9 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.1.140](https://github.com/ITCase/itcase-lint/compare/v1.1.139...v1.1.140) (2026-12-04)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **eslint:** drop mobx rules removed from eslint-plugin-mobx 1.0.0 ([38643c6](https://github.com/ITCase/itcase-lint/commit/38643c60b3455b8f82d282ace343eb3ff3387c3f))
|
|
6
|
+
* **eslint:** typecheck findproperty against object literal elements ([5fdecae](https://github.com/ITCase/itcase-lint/commit/5fdecae6c6dfcafd80a531f4550520d631a860f1))
|
|
7
|
+
|
|
1
8
|
## [1.1.139](https://github.com/ITCase/itcase-lint/compare/v1.1.138...v1.1.139) (2026-12-03)
|
|
2
9
|
|
|
3
10
|
### Continuous Integrations
|
package/dist/eslint/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import globals from 'globals';
|
|
|
14
14
|
import eslintTypeScript from 'typescript-eslint';
|
|
15
15
|
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_C5VVNaF3.js';
|
|
16
16
|
import parser from '@typescript-eslint/parser';
|
|
17
|
-
import { i as itcaseLintPlugin, p as pluginName, r as ruleName, a as pluginName$1, b as ruleName$1, s as storybookConfig } from '../
|
|
17
|
+
import { i as itcaseLintPlugin, p as pluginName, r as ruleName, a as pluginName$1, b as ruleName$1, s as storybookConfig } from '../index_7CTdt6Tj.js';
|
|
18
18
|
import { noRestrictedSyntaxRestrictWords } from './restrictWords/index.js';
|
|
19
19
|
export { default as eslintFigma } from './figma/index.js';
|
|
20
20
|
import 'eslint-plugin-storybook';
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
configs: {
|
|
5
|
-
recommended: import("eslint").Linter.Config;
|
|
6
|
-
};
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
rules?: undefined;
|
|
10
|
-
} | {
|
|
11
|
-
rules: {
|
|
12
|
-
'mobx/exhaustive-make-observable': string;
|
|
13
|
-
'mobx/missing-observer': string;
|
|
14
|
-
'mobx/no-anonymous-observer': string;
|
|
15
|
-
'mobx/unconditional-make-observable': string;
|
|
16
|
-
};
|
|
17
|
-
plugins?: undefined;
|
|
18
|
-
})[];
|
|
19
|
-
export default _default;
|
|
1
|
+
import type { Linter } from 'eslint';
|
|
2
|
+
declare const mobxConfig: Linter.Config[];
|
|
3
|
+
export default mobxConfig;
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import eslintMobx from 'eslint-plugin-mobx';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
var index = [
|
|
3
|
+
const mobxConfig = [
|
|
5
4
|
{
|
|
6
5
|
plugins: {
|
|
7
6
|
mobx: eslintMobx,
|
|
8
7
|
},
|
|
9
8
|
},
|
|
10
9
|
{
|
|
10
|
+
// eslint-plugin-mobx@1.0.0 exports only these two rules.
|
|
11
11
|
rules: {
|
|
12
12
|
'mobx/exhaustive-make-observable': 'warn',
|
|
13
|
-
'mobx/missing-observer': 'off',
|
|
14
|
-
'mobx/no-anonymous-observer': 'warn',
|
|
15
13
|
'mobx/unconditional-make-observable': 'error',
|
|
16
14
|
},
|
|
17
15
|
},
|
|
18
16
|
];
|
|
19
17
|
|
|
20
|
-
export {
|
|
18
|
+
export { mobxConfig as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type TSESTree } from '@typescript-eslint/utils';
|
|
2
|
-
declare function getPropertyName(key: TSESTree.
|
|
3
|
-
declare function findProperty(node: TSESTree.ObjectExpression, name: string): TSESTree.
|
|
2
|
+
declare function getPropertyName(key: TSESTree.ObjectExpressionProperty['key']): string | undefined;
|
|
3
|
+
declare function findProperty(node: TSESTree.ObjectExpression, name: string): TSESTree.ObjectExpressionProperty | undefined;
|
|
4
4
|
declare function getStringLiteralValue(node: TSESTree.Node): string | undefined;
|
|
5
5
|
declare function resolveMetaObject(declaration: TSESTree.ExportDefaultDeclaration['declaration'], sourceCode: Readonly<TSESTree.Program>): TSESTree.ObjectExpression | null;
|
|
6
6
|
export { findProperty, getPropertyName, getStringLiteralValue, resolveMetaObject, };
|
|
@@ -296,11 +296,15 @@ function getPropertyName(key) {
|
|
|
296
296
|
return undefined;
|
|
297
297
|
}
|
|
298
298
|
function findProperty(node, name) {
|
|
299
|
-
|
|
300
|
-
if (prop.type !== AST_NODE_TYPES.Property)
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
299
|
+
for (const prop of node.properties) {
|
|
300
|
+
if (prop.type !== AST_NODE_TYPES.Property) {
|
|
301
|
+
continue;
|
|
302
|
+
}
|
|
303
|
+
if (getPropertyName(prop.key) === name) {
|
|
304
|
+
return prop;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
return undefined;
|
|
304
308
|
}
|
|
305
309
|
function getStringLiteralValue(node) {
|
|
306
310
|
if (node.type === AST_NODE_TYPES.Literal && typeof node.value === 'string') {
|