• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2    "copyright": [
3        "Copyright (c) 2025 Huawei Device Co., Ltd.",
4        "Licensed under the Apache License, Version 2.0 (the 'License');",
5        "you may not use this file except in compliance with the License.",
6        "You may obtain a copy of the License at",
7        "",
8        "http://www.apache.org/licenses/LICENSE-2.0",
9        "",
10        "Unless required by applicable law or agreed to in writing, software",
11        "distributed under the License is distributed on an 'AS IS' BASIS,",
12        "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
13        "See the License for the specific language governing permissions and",
14        "limitations under the License."
15    ],
16    "result": [
17        {
18            "line": 16,
19            "column": 1,
20            "endLine": 16,
21            "endColumn": 88,
22            "problem": "InterOpImportJs",
23            "autofix": [
24                {
25                    "start": 605,
26                    "end": 692,
27                    "replacementText": "",
28                    "line": 16,
29                    "column": 1,
30                    "endLine": 16,
31                    "endColumn": 88
32                },
33                {
34                    "start": 692,
35                    "end": 692,
36                    "replacementText": "let GeneratedImportVar_1 = ESValue.load('./no_js_instanceof_file.js');\nlet Foo = GeneratedImportVar_1.getProperty('Foo');\nlet foo = GeneratedImportVar_1.getProperty('foo');\nlet CreatePerson = GeneratedImportVar_1.getProperty('CreatePerson');\nlet a = GeneratedImportVar_1.getProperty('a');\nlet b = GeneratedImportVar_1.getProperty('b');\nlet MyNamespace = GeneratedImportVar_1.getProperty('MyNamespace');\n",
37                    "line": 16,
38                    "column": 1,
39                    "endLine": 16,
40                    "endColumn": 88
41                }
42            ],
43            "suggest": "",
44            "rule": "Importing directly from \"JS\" module is not supported (arkts-interop-js2s-import-js)",
45            "severity": "ERROR"
46        },
47        {
48            "line": 26,
49            "column": 4,
50            "endLine": 26,
51            "endColumn": 22,
52            "problem": "InteropJsInstanceof",
53            "autofix": [
54                {
55                    "replacementText": "foo.isInstanceOf(Foo)",
56                    "start": 766,
57                    "end": 784,
58                    "line": 26,
59                    "column": 4,
60                    "endLine": 26,
61                    "endColumn": 22
62                }
63            ],
64            "suggest": "",
65            "rule": "Usage of \"instanceof\" operator is not allowed with interop objects (arkts-interop-js2s-instanceof-js-type)",
66            "severity": "ERROR"
67        },
68        {
69            "line": 30,
70            "column": 4,
71            "endLine": 30,
72            "endColumn": 23,
73            "problem": "InteropJsInstanceof",
74            "autofix": [
75                {
76                    "replacementText": "foo1.isInstanceOf(Foo)",
77                    "start": 799,
78                    "end": 818,
79                    "line": 30,
80                    "column": 4,
81                    "endLine": 30,
82                    "endColumn": 23
83                }
84            ],
85            "suggest": "",
86            "rule": "Usage of \"instanceof\" operator is not allowed with interop objects (arkts-interop-js2s-instanceof-js-type)",
87            "severity": "ERROR"
88        },
89        {
90            "line": 34,
91            "column": 4,
92            "endLine": 34,
93            "endColumn": 23,
94            "problem": "InteropJsInstanceof",
95            "autofix": [
96                {
97                    "replacementText": "foo.isInstanceOf(Foo1)",
98                    "start": 829,
99                    "end": 848,
100                    "line": 34,
101                    "column": 4,
102                    "endLine": 34,
103                    "endColumn": 23
104                }
105            ],
106            "suggest": "",
107            "rule": "Usage of \"instanceof\" operator is not allowed with interop objects (arkts-interop-js2s-instanceof-js-type)",
108            "severity": "ERROR"
109        },
110        {
111            "line": 38,
112            "column": 28,
113            "endLine": 38,
114            "endColumn": 50,
115            "problem": "CallJSFunction",
116            "autofix": [
117                {
118                    "start": 883,
119                    "end": 905,
120                    "replacementText": "CreatePerson.invoke(ESValue.wrap('xc'), ESValue.wrap(18))",
121                    "line": 38,
122                    "column": 28,
123                    "endLine": 38,
124                    "endColumn": 50
125                }
126            ],
127            "suggest": "",
128            "rule": "ArkTS directly call JS functions or parameters is not supported (arkts-interop-js2s-call-js-func)",
129            "severity": "ERROR"
130        },
131        {
132            "line": 38,
133            "column": 47,
134            "endLine": 38,
135            "endColumn": 49,
136            "problem": "NumericSemantics",
137            "autofix": [
138                {
139                    "start": 902,
140                    "end": 904,
141                    "replacementText": "18.0",
142                    "line": 38,
143                    "column": 47,
144                    "endLine": 38,
145                    "endColumn": 49
146                }
147            ],
148            "suggest": "",
149            "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)",
150            "severity": "ERROR"
151        },
152        {
153            "line": 40,
154            "column": 4,
155            "endLine": 40,
156            "endColumn": 34,
157            "problem": "InteropJsInstanceof",
158            "autofix": [
159                {
160                    "replacementText": "person.isInstanceOf(CreatePerson)",
161                    "start": 910,
162                    "end": 940,
163                    "line": 40,
164                    "column": 4,
165                    "endLine": 40,
166                    "endColumn": 34
167                }
168            ],
169            "suggest": "",
170            "rule": "Usage of \"instanceof\" operator is not allowed with interop objects (arkts-interop-js2s-instanceof-js-type)",
171            "severity": "ERROR"
172        },
173        {
174            "line": 45,
175            "column": 8,
176            "endLine": 45,
177            "endColumn": 38,
178            "problem": "InteropJsInstanceof",
179            "autofix": [
180                {
181                    "replacementText": "person.isInstanceOf(CreatePerson)",
182                    "start": 980,
183                    "end": 1010,
184                    "line": 45,
185                    "column": 8,
186                    "endLine": 45,
187                    "endColumn": 38
188                }
189            ],
190            "suggest": "",
191            "rule": "Usage of \"instanceof\" operator is not allowed with interop objects (arkts-interop-js2s-instanceof-js-type)",
192            "severity": "ERROR"
193        },
194        {
195            "line": 51,
196            "column": 8,
197            "endLine": 51,
198            "endColumn": 38,
199            "problem": "InteropJsInstanceof",
200            "autofix": [
201                {
202                    "replacementText": "person.isInstanceOf(CreatePerson)",
203                    "start": 1059,
204                    "end": 1089,
205                    "line": 51,
206                    "column": 8,
207                    "endLine": 51,
208                    "endColumn": 38
209                }
210            ],
211            "suggest": "",
212            "rule": "Usage of \"instanceof\" operator is not allowed with interop objects (arkts-interop-js2s-instanceof-js-type)",
213            "severity": "ERROR"
214        },
215        {
216            "line": 58,
217            "column": 12,
218            "endLine": 58,
219            "endColumn": 42,
220            "problem": "InteropJsInstanceof",
221            "autofix": [
222                {
223                    "replacementText": "person.isInstanceOf(CreatePerson)",
224                    "start": 1147,
225                    "end": 1177,
226                    "line": 58,
227                    "column": 12,
228                    "endLine": 58,
229                    "endColumn": 42
230                }
231            ],
232            "suggest": "",
233            "rule": "Usage of \"instanceof\" operator is not allowed with interop objects (arkts-interop-js2s-instanceof-js-type)",
234            "severity": "ERROR"
235        },
236        {
237            "line": 64,
238            "column": 4,
239            "endLine": 64,
240            "endColumn": 22,
241            "problem": "InteropJsInstanceof",
242            "autofix": [
243                {
244                    "replacementText": "a.isInstanceOf(Array)",
245                    "start": 1204,
246                    "end": 1222,
247                    "line": 64,
248                    "column": 4,
249                    "endLine": 64,
250                    "endColumn": 22
251                }
252            ],
253            "suggest": "",
254            "rule": "Usage of \"instanceof\" operator is not allowed with interop objects (arkts-interop-js2s-instanceof-js-type)",
255            "severity": "ERROR"
256        },
257        {
258            "line": 68,
259            "column": 4,
260            "endLine": 68,
261            "endColumn": 24,
262            "problem": "InteropJsInstanceof",
263            "autofix": [
264                {
265                    "replacementText": "b().isInstanceOf(Array)",
266                    "start": 1233,
267                    "end": 1253,
268                    "line": 68,
269                    "column": 4,
270                    "endLine": 68,
271                    "endColumn": 24
272                }
273            ],
274            "suggest": "",
275            "rule": "Usage of \"instanceof\" operator is not allowed with interop objects (arkts-interop-js2s-instanceof-js-type)",
276            "severity": "ERROR"
277        },
278        {
279            "line": 68,
280            "column": 4,
281            "endLine": 68,
282            "endColumn": 7,
283            "problem": "CallJSFunction",
284            "autofix": [
285                {
286                    "start": 1233,
287                    "end": 1236,
288                    "replacementText": "b.invoke()",
289                    "line": 68,
290                    "column": 4,
291                    "endLine": 68,
292                    "endColumn": 7
293                }
294            ],
295            "suggest": "",
296            "rule": "ArkTS directly call JS functions or parameters is not supported (arkts-interop-js2s-call-js-func)",
297            "severity": "ERROR"
298        },
299        {
300            "line": 72,
301            "column": 36,
302            "endLine": 72,
303            "endColumn": 51,
304            "problem": "DynamicCtorCall",
305            "suggest": "",
306            "rule": "\"new\" expression with dynamic constructor type is not supported (arkts-no-dynamic-ctor-call)",
307            "severity": "ERROR"
308        },
309        {
310            "line": 72,
311            "column": 36,
312            "endLine": 72,
313            "endColumn": 51,
314            "problem": "InteropObjectProperty",
315            "autofix": [
316                {
317                    "start": 1296,
318                    "end": 1311,
319                    "replacementText": "MyNamespace.getProperty(\"Dog\")",
320                    "line": 72,
321                    "column": 36,
322                    "endLine": 72,
323                    "endColumn": 51
324                }
325            ],
326            "suggest": "",
327            "rule": "Properties of interop objects can't be accessed directly (arkts-interop-js2s-access-js-prop)",
328            "severity": "ERROR"
329        },
330        {
331            "line": 74,
332            "column": 5,
333            "endLine": 74,
334            "endColumn": 37,
335            "problem": "InteropJsInstanceof",
336            "autofix": [
337                {
338                    "replacementText": "myDog.isInstanceOf(MyNamespace.Dog)",
339                    "start": 1327,
340                    "end": 1359,
341                    "line": 74,
342                    "column": 5,
343                    "endLine": 74,
344                    "endColumn": 37
345                }
346            ],
347            "suggest": "",
348            "rule": "Usage of \"instanceof\" operator is not allowed with interop objects (arkts-interop-js2s-instanceof-js-type)",
349            "severity": "ERROR"
350        },
351        {
352            "line": 74,
353            "column": 22,
354            "endLine": 74,
355            "endColumn": 37,
356            "problem": "InteropObjectProperty",
357            "autofix": [
358                {
359                    "start": 1344,
360                    "end": 1359,
361                    "replacementText": "MyNamespace.getProperty(\"Dog\")",
362                    "line": 74,
363                    "column": 22,
364                    "endLine": 74,
365                    "endColumn": 37
366                }
367            ],
368            "suggest": "",
369            "rule": "Properties of interop objects can't be accessed directly (arkts-interop-js2s-access-js-prop)",
370            "severity": "ERROR"
371        },
372        {
373            "line": 74,
374            "column": 22,
375            "endLine": 74,
376            "endColumn": 37,
377            "problem": "InteropJsObjectConditionJudgment",
378            "autofix": [
379                {
380                    "replacementText": "MyNamespace.getProperty('Dog')",
381                    "start": 1344,
382                    "end": 1359,
383                    "line": 74,
384                    "column": 22,
385                    "endLine": 74,
386                    "endColumn": 37
387                }
388            ],
389            "suggest": "",
390            "rule": "Direct usage of interop JS objects is not supported (arkts-interop-js2s-condition-judgment)",
391            "severity": "ERROR"
392        }
393    ]
394}
395