From a03f86c32f3647d97a43c18bc3621b49c774c9bf Mon Sep 17 00:00:00 2001 From: Evgeniy Okolnov Date: Tue, 13 Feb 2024 11:35:37 +0300 Subject: [PATCH] [ArkTS Linter] Implement autofixes for parameter properties and private identifiers (#12201, #12204). Remove obsolete `relax` and `strict` linter modes (#15727). Fix copyright in tests. Issue:https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/I91MSG Test scenarios: new tests added to the linter Signed-off-by: Evgeniy Okolnov --- ets2panda/linter/README.md | 4 - .../src/cookbook_convertor.ts | 2 +- ets2panda/linter/lib/Autofixer.ts | 121 +++- ets2panda/linter/lib/CommandLineOptions.ts | 1 - ets2panda/linter/lib/FaultAttrs.ts | 45 +- ets2panda/linter/lib/LinterRunner.ts | 11 - ets2panda/linter/lib/TypeScriptLinter.ts | 165 ++++- .../linter/lib/TypeScriptLinterConfig.ts | 1 - .../linter/lib/autofixes/AutofixTitles.ts | 3 +- ets2panda/linter/lib/utils/TsUtils.ts | 57 +- .../linter/scripts/update-test-results.mjs | 13 +- ets2panda/linter/src/CommandLineParser.ts | 10 +- ets2panda/linter/src/TestRunner.ts | 20 +- ...odule.ts.relax.json => UMD_module.ts.json} | 2 +- .../linter/test/UMD_module.ts.strict.json | 23 - ...e.ts.relax.json => ambient_module.ts.json} | 0 .../linter/test/ambient_module.ts.strict.json | 95 --- ...ts.relax.json => arkui_decorators.ts.json} | 0 .../test/arkui_decorators.ts.strict.json | 193 ----- ...elax.json => array_literal_spread.ts.json} | 0 ....ts.strict.json => array_literals.ts.json} | 2 +- .../linter/test/array_literals.ts.relax.json | 98 --- ...ts.relax.json => assign_to_method.ts.json} | 2 +- .../test/assign_to_method.ts.strict.json | 39 - ....relax.json => binary_wrong_types.ts.json} | 4 +- .../test/binary_wrong_types.ts.strict.json | 53 -- .../linter/test/catch_clause.ts.autofix.json | 2 +- ...se.ts.strict.json => catch_clause.ts.json} | 2 +- .../linter/test/catch_clause.ts.relax.json | 28 - ...literals.ts.strict.json => classA.ts.json} | 2 +- ets2panda/linter/test/classA.ts.relax.json | 19 - ets2panda/linter/test/classA.ts.strict.json | 19 - .../classB.ts.json} | 6 +- ets2panda/linter/test/classB.ts.relax.json | 25 - ets2panda/linter/test/classB.ts.strict.json | 25 - ....ts.relax.json => class_as_object.ts.json} | 2 +- .../test/class_as_object.ts.strict.json | 135 ---- ...strict.json => class_static_block.ts.json} | 2 +- .../test/class_static_block.ts.relax.json | 21 - .../conditional_types.ts.autofix.skip} | 4 +- ....strict.json => conditional_types.ts.json} | 2 +- .../test/conditional_types.ts.relax.json | 78 -- ....ts.relax.json => const_assertion.ts.json} | 2 +- .../test/const_assertion.ts.strict.json | 46 -- ....strict.json => constructor_types.ts.json} | 4 +- .../test/constructor_types.ts.relax.json | 83 --- ets2panda/linter/test/d_ts.ts.autofix.json | 58 -- ...e.ts.autofix.skip => d_ts.ts.autofix.skip} | 4 +- .../{d_ts.ts.strict.json => d_ts.ts.json} | 2 +- ets2panda/linter/test/d_ts.ts.relax.json | 39 - .../test/default_imports.ts.autofix.json | 2 +- ...ts.strict.json => default_imports.ts.json} | 2 +- ...trict.json => definite_assignment.ts.json} | 2 +- .../test/definite_assignment.ts.relax.json | 28 - ...ts.strict.json => delete_operator.ts.json} | 2 +- .../linter/test/delete_operator.ts.relax.json | 83 --- ...g.ts.strict.json => destructuring.ts.json} | 2 +- .../linter/test/destructuring.ts.relax.json | 168 ----- ....ts.strict.json => dynamic_import.ts.json} | 2 +- .../linter/test/dynamic_object_literals.ts | 2 +- ...x.json => dynamic_object_literals.ts.json} | 2 +- ...ng.ts.relax.json => enum_indexing.ts.json} | 2 +- .../linter/test/enum_indexing.ts.strict.json | 23 - .../linter/test/enum_member_non_constant.ts | 2 +- ....json => enum_member_non_constant.ts.json} | 4 +- .../enum_member_non_constant.ts.strict.json | 32 - ...object.ts.relax.json => es_object.ts.json} | 2 +- .../linter/test/es_object.ts.strict.json | 683 ------------------ ..._stmts.ts.relax.json => for_stmts.ts.json} | 2 +- .../linter/test/for_stmts.ts.strict.json | 74 -- ...t.json => func_inferred_type_args.ts.json} | 2 +- .../func_inferred_type_args.ts.relax.json | 137 ---- .../test/func_return_type.ts.autofix.json | 2 +- ...s.strict.json => func_return_type.ts.json} | 2 +- .../test/func_return_type.ts.relax.json | 23 - .../test/function_expression.ts.autofix.json | 2 +- ...trict.json => function_expression.ts.json} | 2 +- .../test/function_expression.ts.relax.json | 67 -- ...t.json => function_object_methods.ts.json} | 2 +- .../function_object_methods.ts.relax.json | 250 ------- ....strict.json => function_overload.ts.json} | 2 +- .../test/function_overload.ts.relax.json | 28 - ...trict.json => function_spread_arg.ts.json} | 2 +- .../test/function_spread_arg.ts.relax.json | 68 -- .../linter/test/functions.ts.autofix.json | 194 ----- ...autofix.skip => functions.ts.autofix.skip} | 4 +- ...tions.ts.strict.json => functions.ts.json} | 2 +- ets2panda/linter/test/functions.ts.relax.json | 158 ---- ...tors.ts.strict.json => generators.ts.json} | 2 +- .../linter/test/generators.ts.relax.json | 128 ---- ...his.ts.strict.json => global_this.ts.json} | 2 +- .../linter/test/global_this.ts.relax.json | 39 - ...l_spread.ts.strict.json => iface2.ts.json} | 0 ets2panda/linter/test/iface2.ts.strict.json | 17 - ets2panda/linter/test/iife.ts | 21 - ets2panda/linter/test/iife.ts.relax.json | 17 - ets2panda/linter/test/iife.ts.strict.json | 17 - ...s.strict.json => implements_class.ts.json} | 2 +- .../test/implements_class.ts.relax.json | 21 - ...ct.json => import_after_statement.ts.json} | 2 +- .../test/import_after_statement.ts.relax.json | 33 - ...ts.relax.json => import_assertion.ts.json} | 2 +- .../test/import_assertion.ts.strict.json | 74 -- ...ax.json => imported_use_as_object.ts.json} | 2 +- .../imported_use_as_object.ts.strict.json | 108 --- ... => imported_use_as_object_module.ts.json} | 2 +- ...mported_use_as_object_module.ts.relax.json | 18 - ...ported_use_as_object_module.ts.strict.json | 18 - ...son => indexed_derived_from_array.ts.json} | 2 +- .../indexed_derived_from_array.ts.relax.json | 17 - .../indexed_derived_from_array.ts.strict.json | 17 - ...e.ts.strict.json => inferred_type.ts.json} | 2 +- .../linter/test/inferred_type.ts.relax.json | 116 --- ...ceof.ts.strict.json => instanceof.ts.json} | 2 +- .../linter/test/instanceof.ts.relax.json | 88 --- ...s.strict.json => interfaces_props.ts.json} | 2 +- .../test/interfaces_props.ts.relax.json | 43 -- ...t.ts.relax.json => interop_import.ts.json} | 4 +- .../linter/test/interop_import.ts.strict.json | 39 - ets2panda/linter/test/interop_imports.ts.json | 17 + .../linter/test/interop_imports.ts.relax.json | 18 - .../test/interop_imports.ts.strict.json | 18 - .../{jsx.tsx.strict.json => jsx.tsx.json} | 2 +- ets2panda/linter/test/jsx.tsx.relax.json | 43 -- .../test/limited_stdlib_api.ts.autofix.json | 530 -------------- .../limited_stdlib_api.ts.autofix.skip} | 4 +- ...strict.json => limited_stdlib_api.ts.json} | 4 +- .../test/limited_stdlib_api.ts.relax.json | 466 ------------ .../literals_as_prop_names.ts.autofix.json | 2 +- ...ct.json => literals_as_prop_names.ts.json} | 2 +- .../test/literals_as_prop_names.ts.relax.json | 60 -- ...et.ts.relax.json => loop_over_set.ts.json} | 2 +- .../linter/test/loop_over_set.ts.strict.json | 39 - ...es.ts.strict.json => mapped_types.ts.json} | 2 +- .../linter/test/mapped_types.ts.relax.json | 151 ---- ets2panda/linter/test/modules.ts.autofix.json | 2 +- ...modules.ts.strict.json => modules.ts.json} | 2 +- ets2panda/linter/test/modules.ts.relax.json | 165 ----- ...amespace_export_assignment.ts.autofix.json | 18 - ...amespace_export_assignment.ts.autofix.skip | 14 + .../test/namespace_export_assignment.ts.json | 17 + .../namespace_export_assignment.ts.relax.json | 18 - ...namespace_export_assignment.ts.strict.json | 18 - ...rget.ts.strict.json => new_target.ts.json} | 2 +- .../linter/test/new_target.ts.relax.json | 38 - ...non_initializable_prop_decorators.ts.json} | 2 +- ...itializable_prop_decorators.ts.strict.json | 95 --- ...s.strict.json => null_check_calls.ts.json} | 2 +- .../test/null_check_calls.ts.relax.json | 60 -- ...ts.strict.json => object_literals.ts.json} | 2 +- .../linter/test/object_literals.ts.relax.json | 223 ------ .../test/object_literals2.ts.autofix.json | 194 ----- .../test/object_literals2.ts.autofix.skip | 14 + ...s.strict.json => object_literals2.ts.json} | 2 +- .../test/object_literals2.ts.relax.json | 172 ----- .../test/object_literals3.ts.autofix.json | 17 - .../test/object_literals3.ts.autofix.skip | 14 + .../linter/test/object_literals3.ts.json | 17 + .../test/object_literals3.ts.relax.json | 17 - .../test/object_literals3.ts.strict.json | 17 - ....strict.json => object_literals_2.ts.json} | 2 +- .../test/object_literals_2.ts.relax.json | 103 --- .../object_literals_iface.ts.autofix.json | 24 - .../object_literals_iface.ts.autofix.skip | 14 + ...lax.json => object_literals_iface.ts.json} | 2 +- .../test/object_literals_iface.ts.strict.json | 23 - ...object_literals_iface_interop.ts.args.json | 2 +- ...ect_literals_iface_interop.ts.autofix.json | 17 - ...ect_literals_iface_interop.ts.autofix.skip | 14 + .../object_literals_iface_interop.ts.json | 17 + ...bject_literals_iface_interop.ts.relax.json | 17 - ...ject_literals_iface_interop.ts.strict.json | 17 - ...ct_literals_prop_func_type.ts.autofix.json | 48 -- ...ct_literals_prop_func_type.ts.autofix.skip | 14 + ...=> object_literals_prop_func_type.ts.json} | 2 +- ...ect_literals_prop_func_type.ts.strict.json | 43 -- ...ad.ts.relax.json => object_spread.ts.json} | 2 +- .../linter/test/object_spread.ts.strict.json | 33 - ...ct.json => optional_library_types.ts.json} | 2 +- .../test/optional_library_types.ts.relax.json | 153 ---- ets2panda/linter/test/parameter_properties.ts | 25 +- ...n => parameter_properties.ts.autofix.json} | 155 ++-- .../parameter_properties.ts.json} | 30 +- .../test/parameter_properties.ts.relax.json | 17 - .../test/parameter_properties.ts.strict.json | 33 - .../linter/test/partial_type.ts.autofix.json | 54 -- .../linter/test/partial_type.ts.autofix.skip | 14 + ...ype.ts.relax.json => partial_type.ts.json} | 2 +- .../linter/test/partial_type.ts.strict.json | 48 -- ...readonly_arr.ts => private_identifiers.ts} | 65 +- .../test/private_identifiers.ts.autofix.json | 507 +++++++++++++ .../linter/test/private_identifiers.ts.json | 431 +++++++++++ .../property_access_by_index.ts.autofix.json | 2 +- ....json => property_access_by_index.ts.json} | 2 +- .../property_access_by_index.ts.relax.json | 39 - ...json => property_decl_on_function.ts.json} | 2 +- .../property_decl_on_function.ts.strict.json | 32 - .../test/prototype_assignment.ts.autofix.json | 218 ------ .../test/prototype_assignment.ts.autofix.skip | 14 + ...rict.json => prototype_assignment.ts.json} | 2 +- .../test/prototype_assignment.ts.relax.json | 165 ----- .../linter/test/readonly_arr.ts.autofix.json | 30 - .../linter/test/readonly_arr.ts.relax.json | 28 - .../linter/test/readonly_arr.ts.strict.json | 28 - .../linter/test/record_type.ts.autofix.json | 24 - .../linter/test/record_type.ts.autofix.skip | 14 + ...ype.ts.strict.json => record_type.ts.json} | 2 +- .../linter/test/record_type.ts.relax.json | 23 - ets2panda/linter/test/recursive_types.ts.json | 17 + .../linter/test/recursive_types.ts.relax.json | 17 - .../test/recursive_types.ts.strict.json | 17 - ...s.relax.json => strict_mode_error.ts.json} | 2 +- .../test/strict_mode_error.ts.strict.json | 25 - ...relax.json => structural_identity.ts.json} | 2 +- .../test/structural_identity.ts.strict.json | 312 -------- ...l_api.ts.relax.json => symbol_api.ts.json} | 2 +- .../linter/test/symbol_api.ts.strict.json | 158 ---- ...s.relax.json => template_literals.ts.json} | 2 +- .../test/template_literals.ts.strict.json | 33 - ..._type.ts.strict.json => this_type.ts.json} | 2 +- ets2panda/linter/test/this_type.ts.relax.json | 78 -- .../linter/test/throw_error.ts.autofix.json | 42 -- .../linter/test/throw_error.ts.autofix.skip | 14 + ...ror.ts.strict.json => throw_error.ts.json} | 4 +- .../linter/test/throw_error.ts.relax.json | 17 - ...ignore.ts.relax.json => ts_ignore.ts.json} | 2 +- .../linter/test/ts_ignore.ts.strict.json | 102 --- .../linter/test/ts_ignore_2.ts.autofix.json | 26 - .../linter/test/ts_ignore_2.ts.autofix.skip | 14 + ...e_2.ts.strict.json => ts_ignore_2.ts.json} | 2 +- .../linter/test/ts_ignore_2.ts.relax.json | 25 - ...check.ts.relax.json => ts_nocheck.ts.json} | 4 +- .../linter/test/ts_nocheck.ts.strict.json | 28 - .../linter/test/ts_nocheck_2.ts.autofix.json | 34 - .../linter/test/ts_nocheck_2.ts.autofix.skip | 14 + ...k_2.ts.relax.json => ts_nocheck_2.ts.json} | 2 +- .../linter/test/ts_nocheck_2.ts.strict.json | 32 - ....strict.json => type_declarations.ts.json} | 2 +- .../test/type_declarations.ts.relax.json | 144 ---- ets2panda/linter/test/types.ts.autofix.json | 2 +- .../{types.ts.strict.json => types.ts.json} | 2 +- ets2panda/linter/test/types.ts.relax.json | 263 ------- ...s.relax.json => unary_wrong_types.ts.json} | 2 +- .../test/unary_wrong_types.ts.strict.json | 48 -- ...ict.json => undefined_check_calls.ts.json} | 2 +- .../test/undefined_check_calls.ts.relax.json | 46 -- ...es.ts.strict.json => unique_names.ts.json} | 2 +- .../linter/test/unique_names.ts.relax.json | 103 --- ....ts.strict.json => unknown_params.ts.json} | 2 +- .../linter/test/unknown_params.ts.relax.json | 25 - ...s.ts.strict.json => utility_types.ts.json} | 2 +- .../linter/test/utility_types.ts.relax.json | 556 -------------- ...s.strict.json => var_declarations.ts.json} | 2 +- .../test/var_declarations.ts.relax.json | 32 - .../linter/test_regression/14412.ts.json | 17 + .../test_regression/14412.ts.relax.json | 17 - .../test_regression/14412.ts.strict.json | 17 - .../linter/test_regression/14832.ts.json | 17 + .../test_regression/14832.ts.relax.json | 17 - .../test_regression/14832.ts.strict.json | 17 - .../linter/test_regression/14860.ts.json | 17 + .../test_regression/14860.ts.relax.json | 18 - .../test_regression/14860.ts.strict.json | 18 - .../{14953.ts.strict.json => 14953.ts.json} | 2 +- .../test_regression/14953.ts.relax.json | 67 -- .../linter/test_regression/15086.ts.json | 17 + .../test_regression/15086.ts.relax.json | 17 - .../test_regression/15086.ts.strict.json | 17 - .../{15431.ts.relax.json => 15431.ts.json} | 0 .../{15497.ts.relax.json => 15497.ts.json} | 0 .../linter/test_rules/rule1.ts.autofix.json | 2 +- .../{rule1.ts.strict.json => rule1.ts.json} | 2 +- .../linter/test_rules/rule1.ts.relax.json | 46 -- ...rule102.ts.strict.json => rule102.ts.json} | 2 +- .../linter/test_rules/rule102.ts.relax.json | 81 --- ...rule103.ts.strict.json => rule103.ts.json} | 2 +- .../linter/test_rules/rule103.ts.relax.json | 46 -- ...rule104.ts.strict.json => rule104.ts.json} | 2 +- .../linter/test_rules/rule104.ts.relax.json | 25 - ...{rule106.ts.relax.json => rule106.ts.json} | 2 +- .../linter/test_rules/rule106.ts.strict.json | 32 - ...rule111.ts.strict.json => rule111.ts.json} | 2 +- .../linter/test_rules/rule111.ts.relax.json | 39 - ...{rule113.ts.relax.json => rule113.ts.json} | 2 +- .../linter/test_rules/rule113.ts.strict.json | 39 - ...{rule114.ts.relax.json => rule114.ts.json} | 2 +- ...{rule116.ts.relax.json => rule116.ts.json} | 2 +- .../linter/test_rules/rule116.ts.strict.json | 25 - .../linter/test_rules/rule120.ts.autofix.json | 2 +- ...rule120.ts.strict.json => rule120.ts.json} | 2 +- .../linter/test_rules/rule120.ts.relax.json | 3 - ...{rule121.ts.relax.json => rule121.ts.json} | 2 +- .../linter/test_rules/rule121.ts.strict.json | 25 - ...{rule126.ts.relax.json => rule126.ts.json} | 2 +- .../linter/test_rules/rule126.ts.strict.json | 39 - ...rule128.ts.strict.json => rule128.ts.json} | 2 +- .../linter/test_rules/rule128.ts.relax.json | 25 - ...{rule129.ts.relax.json => rule129.ts.json} | 2 +- .../linter/test_rules/rule129.ts.strict.json | 46 -- ...{rule130.ts.relax.json => rule130.ts.json} | 2 +- .../linter/test_rules/rule130.ts.strict.json | 32 - ...{rule132.ts.relax.json => rule132.ts.json} | 2 +- .../linter/test_rules/rule132.ts.strict.json | 39 - ...{rule134.ts.relax.json => rule134.ts.json} | 2 +- ...rule136.ts.strict.json => rule136.ts.json} | 2 +- .../linter/test_rules/rule136.ts.relax.json | 46 -- ...rule137.ts.strict.json => rule137.ts.json} | 2 +- .../linter/test_rules/rule137.ts.relax.json | 25 - ...{rule138.ts.relax.json => rule138.ts.json} | 2 +- .../linter/test_rules/rule138.ts.strict.json | 46 -- ...rule140.ts.strict.json => rule139.ts.json} | 2 +- .../linter/test_rules/rule139.ts.relax.json | 39 - .../{rule14.ts.relax.json => rule14.ts.json} | 2 +- .../linter/test_rules/rule14.ts.strict.json | 32 - ...rule139.ts.strict.json => rule140.ts.json} | 2 +- .../linter/test_rules/rule140.ts.relax.json | 39 - ...{rule142.ts.relax.json => rule142.ts.json} | 2 +- .../linter/test_rules/rule142.ts.strict.json | 46 -- ...rule143.ts.strict.json => rule143.ts.json} | 2 +- .../linter/test_rules/rule143.ts.relax.json | 25 - ...rule144.ts.strict.json => rule144.ts.json} | 4 +- .../linter/test_rules/rule144.ts.relax.json | 466 ------------ ...rule145.ts.strict.json => rule145.ts.json} | 2 +- .../linter/test_rules/rule145.ts.relax.json | 74 -- ...{rule146.ts.relax.json => rule146.ts.json} | 2 +- .../linter/test_rules/rule146.ts.strict.json | 32 - ...rule147.ts.strict.json => rule147.ts.json} | 2 +- .../linter/test_rules/rule147.ts.relax.json | 25 - ...{rule149.ts.relax.json => rule149.ts.json} | 2 +- .../linter/test_rules/rule149.ts.strict.json | 205 ------ .../rule14_1.ts.json} | 0 .../linter/test_rules/rule14_1.ts.relax.json | 3 - .../linter/test_rules/rule14_1.ts.strict.json | 3 - .../{rule15.ts.relax.json => rule15.ts.json} | 2 +- .../linter/test_rules/rule15.ts.strict.json | 32 - ...{rule150.ts.relax.json => rule150.ts.json} | 2 +- .../linter/test_rules/rule150.ts.strict.json | 33 - ...{rule151.ts.relax.json => rule151.ts.json} | 2 +- .../linter/test_rules/rule151.ts.strict.json | 683 ------------------ ...rule152.ts.strict.json => rule152.ts.json} | 14 + .../linter/test_rules/rule152.ts.relax.json | 23 - .../{rule16.ts.relax.json => rule16.ts.json} | 2 +- .../linter/test_rules/rule16.ts.strict.json | 25 - .../{rule17.ts.strict.json => rule17.ts.json} | 2 +- .../linter/test_rules/rule17.ts.relax.json | 25 - .../{rule19.ts.relax.json => rule19.ts.json} | 2 +- .../linter/test_rules/rule19.ts.strict.json | 25 - .../{rule2.ts.relax.json => rule2.ts.json} | 2 +- .../linter/test_rules/rule2.ts.strict.json | 39 - .../{rule21.ts.strict.json => rule21.ts.json} | 2 +- .../linter/test_rules/rule21.ts.relax.json | 32 - ...ule21_1.ts.relax.json => rule21_1.ts.json} | 2 +- .../linter/test_rules/rule21_1.ts.strict.json | 25 - ...ule21_2.ts.relax.json => rule21_2.ts.json} | 2 +- .../linter/test_rules/rule21_2.ts.strict.json | 25 - ...ule21_3.ts.relax.json => rule21_3.ts.json} | 2 +- .../linter/test_rules/rule21_3.ts.strict.json | 32 - .../{rule22.ts.relax.json => rule22.ts.json} | 2 +- .../linter/test_rules/rule22.ts.strict.json | 32 - .../rule25.ts.autofix.json} | 41 +- ...{rule114.ts.strict.json => rule25.ts.json} | 8 +- .../linter/test_rules/rule25.ts.relax.json | 3 - .../{rule27.ts.relax.json => rule27.ts.json} | 2 +- .../linter/test_rules/rule27.ts.strict.json | 25 - .../{rule28.ts.relax.json => rule28.ts.json} | 2 +- .../linter/test_rules/rule28.ts.strict.json | 32 - .../linter/test_rules/rule29.ts.autofix.json | 2 +- .../{rule29.ts.strict.json => rule29.ts.json} | 2 +- .../linter/test_rules/rule29.ts.relax.json | 3 - ...4.ts.strict.json => rule3.ts.autofix.json} | 9 +- .../{rule3.ts.strict.json => rule3.ts.json} | 2 +- .../linter/test_rules/rule3.ts.relax.json | 3 - ets2panda/linter/test_rules/rule30.ts.json | 17 + .../linter/test_rules/rule30.ts.relax.json | 3 - .../linter/test_rules/rule30.ts.strict.json | 3 - ...ule30_1.ts.relax.json => rule30_1.ts.json} | 2 +- .../linter/test_rules/rule30_1.ts.strict.json | 32 - ...ule30_2.ts.relax.json => rule30_2.ts.json} | 2 +- .../linter/test_rules/rule30_2.ts.strict.json | 32 - ets2panda/linter/test_rules/rule30_3.ts.json | 17 + .../linter/test_rules/rule30_3.ts.relax.json | 17 - .../linter/test_rules/rule30_3.ts.strict.json | 17 - ...ule30_4.ts.relax.json => rule30_4.ts.json} | 2 +- .../linter/test_rules/rule30_4.ts.strict.json | 32 - ...ule30_5.ts.relax.json => rule30_5.ts.json} | 2 +- .../linter/test_rules/rule30_5.ts.strict.json | 25 - ...ule30_6.ts.relax.json => rule30_6.ts.json} | 2 +- .../linter/test_rules/rule30_6.ts.strict.json | 32 - .../{rule34.ts.relax.json => rule34.ts.json} | 2 +- .../linter/test_rules/rule34.ts.strict.json | 32 - ets2panda/linter/test_rules/rule38.ts.json | 17 + .../linter/test_rules/rule38.ts.relax.json | 3 - .../linter/test_rules/rule38.ts.strict.json | 3 - .../{rule4.ts.strict.json => rule4.ts.json} | 2 +- .../linter/test_rules/rule4.ts.relax.json | 3 - .../{rule40.ts.relax.json => rule40.ts.json} | 2 +- .../linter/test_rules/rule40.ts.strict.json | 39 - .../{rule43.ts.strict.json => rule43.ts.json} | 2 +- .../linter/test_rules/rule43.ts.relax.json | 39 - .../linter/test_rules/rule46.ts.autofix.json | 2 +- .../{rule46.ts.strict.json => rule46.ts.json} | 2 +- .../linter/test_rules/rule46.ts.relax.json | 3 - .../{rule49.ts.strict.json => rule49.ts.json} | 2 +- .../linter/test_rules/rule49.ts.relax.json | 3 - .../{rule5.ts.strict.json => rule5.ts.json} | 2 +- .../linter/test_rules/rule5.ts.relax.json | 25 - .../{rule50.ts.strict.json => rule50.ts.json} | 2 +- .../linter/test_rules/rule50.ts.relax.json | 32 - .../{rule51.ts.relax.json => rule51.ts.json} | 2 +- .../linter/test_rules/rule51.ts.strict.json | 25 - .../{rule52.ts.relax.json => rule52.ts.json} | 2 +- .../linter/test_rules/rule52.ts.strict.json | 25 - .../rule53.ts.autofix.json} | 32 +- .../linter/test_rules/rule53.ts.autofix.skip | 14 - .../{rule53.ts.strict.json => rule53.ts.json} | 2 +- .../linter/test_rules/rule53.ts.relax.json | 3 - ...rule54.tsx.strict.json => rule54.tsx.json} | 2 +- .../linter/test_rules/rule54.tsx.relax.json | 43 -- .../{rule55.ts.relax.json => rule55.ts.json} | 2 +- .../linter/test_rules/rule55.ts.strict.json | 60 -- .../{rule59.ts.relax.json => rule59.ts.json} | 2 +- .../linter/test_rules/rule59.ts.strict.json | 32 - .../{rule60.ts.strict.json => rule60.ts.json} | 2 +- .../linter/test_rules/rule60.ts.relax.json | 32 - .../{rule65.ts.relax.json => rule65.ts.json} | 2 +- .../linter/test_rules/rule65.ts.strict.json | 32 - .../{rule66.ts.relax.json => rule66.ts.json} | 2 +- .../linter/test_rules/rule66.ts.strict.json | 25 - .../{rule69.ts.strict.json => rule69.ts.json} | 2 +- .../linter/test_rules/rule69.ts.relax.json | 39 - .../{rule71.ts.strict.json => rule71.ts.json} | 2 +- .../linter/test_rules/rule71.ts.relax.json | 95 --- .../{rule74.ts.strict.json => rule74.ts.json} | 2 +- .../linter/test_rules/rule74.ts.relax.json | 3 - .../linter/test_rules/rule79.ts.autofix.json | 2 +- .../{rule79.ts.strict.json => rule79.ts.json} | 2 +- .../linter/test_rules/rule79.ts.relax.json | 25 - .../{rule8.ts.strict.json => rule8.ts.json} | 2 +- .../linter/test_rules/rule8.ts.relax.json | 32 - .../{rule80.ts.relax.json => rule80.ts.json} | 2 +- .../linter/test_rules/rule80.ts.strict.json | 25 - .../{rule83.ts.strict.json => rule83.ts.json} | 2 +- .../linter/test_rules/rule83.ts.relax.json | 25 - .../{rule84.ts.relax.json => rule84.ts.json} | 2 +- .../linter/test_rules/rule84.ts.strict.json | 25 - .../{rule87.ts.strict.json => rule87.ts.json} | 2 +- .../linter/test_rules/rule87.ts.relax.json | 3 - ...{rule8_1.ts.relax.json => rule8_1.ts.json} | 2 +- .../linter/test_rules/rule8_1.ts.strict.json | 39 - ...rule8_2.ts.strict.json => rule8_2.ts.json} | 2 +- .../linter/test_rules/rule8_2.ts.relax.json | 32 - ...rule8_3.ts.strict.json => rule8_3.ts.json} | 2 +- .../linter/test_rules/rule8_3.ts.relax.json | 81 --- ...rule8_4.ts.strict.json => rule8_4.ts.json} | 2 +- .../linter/test_rules/rule8_4.ts.relax.json | 39 - ...{rule8_5.ts.relax.json => rule8_5.ts.json} | 2 +- .../linter/test_rules/rule8_5.ts.strict.json | 32 - ...{rule8_6.ts.relax.json => rule8_6.ts.json} | 2 +- .../linter/test_rules/rule8_6.ts.strict.json | 81 --- .../linter/test_rules/rule90.ts.autofix.json | 2 +- .../{rule90.ts.strict.json => rule90.ts.json} | 2 +- .../linter/test_rules/rule90.ts.relax.json | 3 - .../test_rules/rule90_1.ts.autofix.json | 14 + ets2panda/linter/test_rules/rule90_1.ts.json | 17 + .../linter/test_rules/rule90_1.ts.relax.json | 3 - .../linter/test_rules/rule90_1.ts.strict.json | 3 - .../test_rules/rule90_2.ts.autofix.json | 14 + ets2panda/linter/test_rules/rule90_2.ts.json | 17 + .../linter/test_rules/rule90_2.ts.relax.json | 3 - .../linter/test_rules/rule90_2.ts.strict.json | 3 - .../test_rules/rule90_3.ts.autofix.json | 2 +- ...le90_3.ts.strict.json => rule90_3.ts.json} | 2 +- .../linter/test_rules/rule90_3.ts.relax.json | 3 - .../test_rules/rule90_4.ts.autofix.json | 14 + ets2panda/linter/test_rules/rule90_4.ts.json | 17 + .../linter/test_rules/rule90_4.ts.relax.json | 3 - .../linter/test_rules/rule90_4.ts.strict.json | 3 - .../test_rules/rule90_5.ts.autofix.json | 14 + ets2panda/linter/test_rules/rule90_5.ts.json | 17 + .../linter/test_rules/rule90_5.ts.relax.json | 3 - .../linter/test_rules/rule90_5.ts.strict.json | 3 - .../{rule91.ts.relax.json => rule91.ts.json} | 2 +- .../linter/test_rules/rule91.ts.strict.json | 32 - .../{rule92.ts.strict.json => rule92.ts.json} | 2 +- .../linter/test_rules/rule92.ts.relax.json | 3 - .../{rule93.ts.relax.json => rule93.ts.json} | 2 +- .../{rule94.ts.relax.json => rule94.ts.json} | 2 +- .../linter/test_rules/rule94.ts.strict.json | 32 - .../{rule96.ts.relax.json => rule96.ts.json} | 2 +- .../linter/test_rules/rule96.ts.strict.json | 32 - .../{rule99.ts.strict.json => rule99.ts.json} | 2 +- .../linter/test_rules/rule99.ts.relax.json | 46 -- 492 files changed, 2221 insertions(+), 14511 deletions(-) rename ets2panda/linter/test/{UMD_module.ts.relax.json => UMD_module.ts.json} (93%) mode change 100755 => 100644 delete mode 100755 ets2panda/linter/test/UMD_module.ts.strict.json rename ets2panda/linter/test/{ambient_module.ts.relax.json => ambient_module.ts.json} (100%) mode change 100755 => 100644 delete mode 100755 ets2panda/linter/test/ambient_module.ts.strict.json rename ets2panda/linter/test/{arkui_decorators.ts.relax.json => arkui_decorators.ts.json} (100%) delete mode 100644 ets2panda/linter/test/arkui_decorators.ts.strict.json rename ets2panda/linter/test/{array_literal_spread.ts.relax.json => array_literal_spread.ts.json} (100%) rename ets2panda/linter/test/{array_literals.ts.strict.json => array_literals.ts.json} (98%) delete mode 100644 ets2panda/linter/test/array_literals.ts.relax.json rename ets2panda/linter/test/{assign_to_method.ts.relax.json => assign_to_method.ts.json} (95%) delete mode 100644 ets2panda/linter/test/assign_to_method.ts.strict.json rename ets2panda/linter/test/{binary_wrong_types.ts.relax.json => binary_wrong_types.ts.json} (96%) delete mode 100644 ets2panda/linter/test/binary_wrong_types.ts.strict.json rename ets2panda/linter/test/{catch_clause.ts.strict.json => catch_clause.ts.json} (97%) delete mode 100644 ets2panda/linter/test/catch_clause.ts.relax.json rename ets2panda/linter/test/{dynamic_object_literals.ts.strict.json => classA.ts.json} (92%) delete mode 100644 ets2panda/linter/test/classA.ts.relax.json delete mode 100644 ets2panda/linter/test/classA.ts.strict.json rename ets2panda/linter/{test_rules/rule93.ts.strict.json => test/classB.ts.json} (89%) delete mode 100644 ets2panda/linter/test/classB.ts.relax.json delete mode 100644 ets2panda/linter/test/classB.ts.strict.json rename ets2panda/linter/test/{class_as_object.ts.relax.json => class_as_object.ts.json} (98%) delete mode 100644 ets2panda/linter/test/class_as_object.ts.strict.json rename ets2panda/linter/test/{class_static_block.ts.strict.json => class_static_block.ts.json} (92%) delete mode 100644 ets2panda/linter/test/class_static_block.ts.relax.json rename ets2panda/linter/{test_rules/rule3.ts.autofix.skip => test/conditional_types.ts.autofix.skip} (90%) rename ets2panda/linter/test/{conditional_types.ts.strict.json => conditional_types.ts.json} (97%) delete mode 100644 ets2panda/linter/test/conditional_types.ts.relax.json rename ets2panda/linter/test/{const_assertion.ts.relax.json => const_assertion.ts.json} (96%) mode change 100755 => 100644 delete mode 100755 ets2panda/linter/test/const_assertion.ts.strict.json rename ets2panda/linter/test/{constructor_types.ts.strict.json => constructor_types.ts.json} (97%) delete mode 100644 ets2panda/linter/test/constructor_types.ts.relax.json delete mode 100644 ets2panda/linter/test/d_ts.ts.autofix.json rename ets2panda/linter/test/{iife.ts.autofix.skip => d_ts.ts.autofix.skip} (90%) rename ets2panda/linter/test/{d_ts.ts.strict.json => d_ts.ts.json} (97%) delete mode 100644 ets2panda/linter/test/d_ts.ts.relax.json rename ets2panda/linter/test/{default_imports.ts.strict.json => default_imports.ts.json} (95%) mode change 100755 => 100644 rename ets2panda/linter/test/{definite_assignment.ts.strict.json => definite_assignment.ts.json} (93%) delete mode 100644 ets2panda/linter/test/definite_assignment.ts.relax.json rename ets2panda/linter/test/{delete_operator.ts.strict.json => delete_operator.ts.json} (97%) delete mode 100644 ets2panda/linter/test/delete_operator.ts.relax.json rename ets2panda/linter/test/{destructuring.ts.strict.json => destructuring.ts.json} (99%) delete mode 100644 ets2panda/linter/test/destructuring.ts.relax.json rename ets2panda/linter/test/{dynamic_import.ts.strict.json => dynamic_import.ts.json} (95%) mode change 100755 => 100644 rename ets2panda/linter/test/{iface2.ts.relax.json => dynamic_object_literals.ts.json} (92%) rename ets2panda/linter/test/{enum_indexing.ts.relax.json => enum_indexing.ts.json} (93%) delete mode 100644 ets2panda/linter/test/enum_indexing.ts.strict.json rename ets2panda/linter/test/{enum_member_non_constant.ts.relax.json => enum_member_non_constant.ts.json} (95%) delete mode 100644 ets2panda/linter/test/enum_member_non_constant.ts.strict.json rename ets2panda/linter/test/{es_object.ts.relax.json => es_object.ts.json} (99%) delete mode 100644 ets2panda/linter/test/es_object.ts.strict.json rename ets2panda/linter/test/{for_stmts.ts.relax.json => for_stmts.ts.json} (97%) delete mode 100644 ets2panda/linter/test/for_stmts.ts.strict.json rename ets2panda/linter/test/{func_inferred_type_args.ts.strict.json => func_inferred_type_args.ts.json} (98%) delete mode 100644 ets2panda/linter/test/func_inferred_type_args.ts.relax.json rename ets2panda/linter/test/{func_return_type.ts.strict.json => func_return_type.ts.json} (99%) delete mode 100644 ets2panda/linter/test/func_return_type.ts.relax.json rename ets2panda/linter/test/{function_expression.ts.strict.json => function_expression.ts.json} (99%) delete mode 100644 ets2panda/linter/test/function_expression.ts.relax.json rename ets2panda/linter/test/{function_object_methods.ts.strict.json => function_object_methods.ts.json} (99%) delete mode 100644 ets2panda/linter/test/function_object_methods.ts.relax.json rename ets2panda/linter/test/{function_overload.ts.strict.json => function_overload.ts.json} (96%) delete mode 100644 ets2panda/linter/test/function_overload.ts.relax.json rename ets2panda/linter/test/{function_spread_arg.ts.strict.json => function_spread_arg.ts.json} (96%) delete mode 100644 ets2panda/linter/test/function_spread_arg.ts.relax.json delete mode 100755 ets2panda/linter/test/functions.ts.autofix.json rename ets2panda/linter/test/{parameter_properties.ts.autofix.skip => functions.ts.autofix.skip} (90%) rename ets2panda/linter/test/{functions.ts.strict.json => functions.ts.json} (99%) delete mode 100644 ets2panda/linter/test/functions.ts.relax.json rename ets2panda/linter/test/{generators.ts.strict.json => generators.ts.json} (98%) delete mode 100644 ets2panda/linter/test/generators.ts.relax.json rename ets2panda/linter/test/{global_this.ts.strict.json => global_this.ts.json} (95%) mode change 100755 => 100644 delete mode 100755 ets2panda/linter/test/global_this.ts.relax.json rename ets2panda/linter/test/{array_literal_spread.ts.strict.json => iface2.ts.json} (100%) delete mode 100644 ets2panda/linter/test/iface2.ts.strict.json delete mode 100644 ets2panda/linter/test/iife.ts delete mode 100644 ets2panda/linter/test/iife.ts.relax.json delete mode 100644 ets2panda/linter/test/iife.ts.strict.json rename ets2panda/linter/test/{implements_class.ts.strict.json => implements_class.ts.json} (92%) delete mode 100644 ets2panda/linter/test/implements_class.ts.relax.json rename ets2panda/linter/test/{import_after_statement.ts.strict.json => import_after_statement.ts.json} (94%) delete mode 100644 ets2panda/linter/test/import_after_statement.ts.relax.json rename ets2panda/linter/test/{import_assertion.ts.relax.json => import_assertion.ts.json} (97%) mode change 100755 => 100644 delete mode 100755 ets2panda/linter/test/import_assertion.ts.strict.json rename ets2panda/linter/test/{imported_use_as_object.ts.relax.json => imported_use_as_object.ts.json} (97%) delete mode 100644 ets2panda/linter/test/imported_use_as_object.ts.strict.json rename ets2panda/linter/test/{default_imports.ts.relax.json => imported_use_as_object_module.ts.json} (92%) mode change 100755 => 100644 delete mode 100644 ets2panda/linter/test/imported_use_as_object_module.ts.relax.json delete mode 100644 ets2panda/linter/test/imported_use_as_object_module.ts.strict.json rename ets2panda/linter/test/{dynamic_object_literals.ts.relax.json => indexed_derived_from_array.ts.json} (92%) delete mode 100644 ets2panda/linter/test/indexed_derived_from_array.ts.relax.json delete mode 100644 ets2panda/linter/test/indexed_derived_from_array.ts.strict.json rename ets2panda/linter/test/{inferred_type.ts.strict.json => inferred_type.ts.json} (98%) delete mode 100644 ets2panda/linter/test/inferred_type.ts.relax.json rename ets2panda/linter/test/{instanceof.ts.strict.json => instanceof.ts.json} (98%) delete mode 100644 ets2panda/linter/test/instanceof.ts.relax.json rename ets2panda/linter/test/{interfaces_props.ts.strict.json => interfaces_props.ts.json} (95%) delete mode 100644 ets2panda/linter/test/interfaces_props.ts.relax.json rename ets2panda/linter/test/{interop_import.ts.relax.json => interop_import.ts.json} (95%) delete mode 100644 ets2panda/linter/test/interop_import.ts.strict.json create mode 100644 ets2panda/linter/test/interop_imports.ts.json delete mode 100644 ets2panda/linter/test/interop_imports.ts.relax.json delete mode 100644 ets2panda/linter/test/interop_imports.ts.strict.json rename ets2panda/linter/test/{jsx.tsx.strict.json => jsx.tsx.json} (96%) delete mode 100644 ets2panda/linter/test/jsx.tsx.relax.json delete mode 100644 ets2panda/linter/test/limited_stdlib_api.ts.autofix.json rename ets2panda/linter/{test_rules/rule25.ts.autofix.skip => test/limited_stdlib_api.ts.autofix.skip} (90%) rename ets2panda/linter/test/{limited_stdlib_api.ts.strict.json => limited_stdlib_api.ts.json} (99%) delete mode 100644 ets2panda/linter/test/limited_stdlib_api.ts.relax.json rename ets2panda/linter/test/{literals_as_prop_names.ts.strict.json => literals_as_prop_names.ts.json} (98%) delete mode 100644 ets2panda/linter/test/literals_as_prop_names.ts.relax.json rename ets2panda/linter/test/{loop_over_set.ts.relax.json => loop_over_set.ts.json} (95%) delete mode 100644 ets2panda/linter/test/loop_over_set.ts.strict.json rename ets2panda/linter/test/{mapped_types.ts.strict.json => mapped_types.ts.json} (98%) delete mode 100644 ets2panda/linter/test/mapped_types.ts.relax.json rename ets2panda/linter/test/{modules.ts.strict.json => modules.ts.json} (99%) delete mode 100644 ets2panda/linter/test/modules.ts.relax.json delete mode 100644 ets2panda/linter/test/namespace_export_assignment.ts.autofix.json create mode 100644 ets2panda/linter/test/namespace_export_assignment.ts.autofix.skip create mode 100644 ets2panda/linter/test/namespace_export_assignment.ts.json delete mode 100644 ets2panda/linter/test/namespace_export_assignment.ts.relax.json delete mode 100644 ets2panda/linter/test/namespace_export_assignment.ts.strict.json rename ets2panda/linter/test/{new_target.ts.strict.json => new_target.ts.json} (94%) delete mode 100644 ets2panda/linter/test/new_target.ts.relax.json rename ets2panda/linter/test/{non_initializable_prop_decorators.ts.relax.json => non_initializable_prop_decorators.ts.json} (98%) delete mode 100644 ets2panda/linter/test/non_initializable_prop_decorators.ts.strict.json rename ets2panda/linter/test/{null_check_calls.ts.strict.json => null_check_calls.ts.json} (98%) delete mode 100644 ets2panda/linter/test/null_check_calls.ts.relax.json rename ets2panda/linter/test/{object_literals.ts.strict.json => object_literals.ts.json} (99%) delete mode 100644 ets2panda/linter/test/object_literals.ts.relax.json delete mode 100644 ets2panda/linter/test/object_literals2.ts.autofix.json create mode 100644 ets2panda/linter/test/object_literals2.ts.autofix.skip rename ets2panda/linter/test/{object_literals2.ts.strict.json => object_literals2.ts.json} (99%) delete mode 100644 ets2panda/linter/test/object_literals2.ts.relax.json delete mode 100644 ets2panda/linter/test/object_literals3.ts.autofix.json create mode 100644 ets2panda/linter/test/object_literals3.ts.autofix.skip create mode 100644 ets2panda/linter/test/object_literals3.ts.json delete mode 100644 ets2panda/linter/test/object_literals3.ts.relax.json delete mode 100644 ets2panda/linter/test/object_literals3.ts.strict.json rename ets2panda/linter/test/{object_literals_2.ts.strict.json => object_literals_2.ts.json} (97%) delete mode 100644 ets2panda/linter/test/object_literals_2.ts.relax.json delete mode 100644 ets2panda/linter/test/object_literals_iface.ts.autofix.json create mode 100644 ets2panda/linter/test/object_literals_iface.ts.autofix.skip rename ets2panda/linter/test/{object_literals_iface.ts.relax.json => object_literals_iface.ts.json} (93%) delete mode 100644 ets2panda/linter/test/object_literals_iface.ts.strict.json delete mode 100644 ets2panda/linter/test/object_literals_iface_interop.ts.autofix.json create mode 100644 ets2panda/linter/test/object_literals_iface_interop.ts.autofix.skip create mode 100644 ets2panda/linter/test/object_literals_iface_interop.ts.json delete mode 100644 ets2panda/linter/test/object_literals_iface_interop.ts.relax.json delete mode 100644 ets2panda/linter/test/object_literals_iface_interop.ts.strict.json delete mode 100644 ets2panda/linter/test/object_literals_prop_func_type.ts.autofix.json create mode 100644 ets2panda/linter/test/object_literals_prop_func_type.ts.autofix.skip rename ets2panda/linter/test/{object_literals_prop_func_type.ts.relax.json => object_literals_prop_func_type.ts.json} (95%) delete mode 100644 ets2panda/linter/test/object_literals_prop_func_type.ts.strict.json rename ets2panda/linter/test/{object_spread.ts.relax.json => object_spread.ts.json} (94%) delete mode 100644 ets2panda/linter/test/object_spread.ts.strict.json rename ets2panda/linter/test/{optional_library_types.ts.strict.json => optional_library_types.ts.json} (98%) delete mode 100644 ets2panda/linter/test/optional_library_types.ts.relax.json rename ets2panda/linter/test/{conditional_types.ts.autofix.json => parameter_properties.ts.autofix.json} (33%) mode change 100755 => 100644 rename ets2panda/linter/{test_rules/rule25.ts.strict.json => test/parameter_properties.ts.json} (67%) delete mode 100644 ets2panda/linter/test/parameter_properties.ts.relax.json delete mode 100644 ets2panda/linter/test/parameter_properties.ts.strict.json delete mode 100644 ets2panda/linter/test/partial_type.ts.autofix.json create mode 100644 ets2panda/linter/test/partial_type.ts.autofix.skip rename ets2panda/linter/test/{partial_type.ts.relax.json => partial_type.ts.json} (95%) delete mode 100644 ets2panda/linter/test/partial_type.ts.strict.json rename ets2panda/linter/test/{readonly_arr.ts => private_identifiers.ts} (32%) create mode 100644 ets2panda/linter/test/private_identifiers.ts.autofix.json create mode 100644 ets2panda/linter/test/private_identifiers.ts.json rename ets2panda/linter/test/{property_access_by_index.ts.strict.json => property_access_by_index.ts.json} (98%) delete mode 100644 ets2panda/linter/test/property_access_by_index.ts.relax.json rename ets2panda/linter/test/{property_decl_on_function.ts.relax.json => property_decl_on_function.ts.json} (95%) mode change 100755 => 100644 delete mode 100755 ets2panda/linter/test/property_decl_on_function.ts.strict.json delete mode 100755 ets2panda/linter/test/prototype_assignment.ts.autofix.json create mode 100644 ets2panda/linter/test/prototype_assignment.ts.autofix.skip rename ets2panda/linter/test/{prototype_assignment.ts.strict.json => prototype_assignment.ts.json} (99%) delete mode 100644 ets2panda/linter/test/prototype_assignment.ts.relax.json delete mode 100644 ets2panda/linter/test/readonly_arr.ts.autofix.json delete mode 100644 ets2panda/linter/test/readonly_arr.ts.relax.json delete mode 100644 ets2panda/linter/test/readonly_arr.ts.strict.json delete mode 100644 ets2panda/linter/test/record_type.ts.autofix.json create mode 100644 ets2panda/linter/test/record_type.ts.autofix.skip rename ets2panda/linter/test/{record_type.ts.strict.json => record_type.ts.json} (93%) delete mode 100644 ets2panda/linter/test/record_type.ts.relax.json create mode 100644 ets2panda/linter/test/recursive_types.ts.json delete mode 100644 ets2panda/linter/test/recursive_types.ts.relax.json delete mode 100644 ets2panda/linter/test/recursive_types.ts.strict.json rename ets2panda/linter/test/{strict_mode_error.ts.relax.json => strict_mode_error.ts.json} (94%) delete mode 100644 ets2panda/linter/test/strict_mode_error.ts.strict.json rename ets2panda/linter/test/{structural_identity.ts.relax.json => structural_identity.ts.json} (99%) mode change 100755 => 100644 delete mode 100755 ets2panda/linter/test/structural_identity.ts.strict.json rename ets2panda/linter/test/{symbol_api.ts.relax.json => symbol_api.ts.json} (98%) delete mode 100644 ets2panda/linter/test/symbol_api.ts.strict.json rename ets2panda/linter/test/{template_literals.ts.relax.json => template_literals.ts.json} (94%) delete mode 100644 ets2panda/linter/test/template_literals.ts.strict.json rename ets2panda/linter/test/{this_type.ts.strict.json => this_type.ts.json} (97%) delete mode 100644 ets2panda/linter/test/this_type.ts.relax.json delete mode 100644 ets2panda/linter/test/throw_error.ts.autofix.json create mode 100644 ets2panda/linter/test/throw_error.ts.autofix.skip rename ets2panda/linter/test/{throw_error.ts.strict.json => throw_error.ts.json} (94%) delete mode 100644 ets2panda/linter/test/throw_error.ts.relax.json rename ets2panda/linter/test/{ts_ignore.ts.relax.json => ts_ignore.ts.json} (98%) delete mode 100644 ets2panda/linter/test/ts_ignore.ts.strict.json delete mode 100644 ets2panda/linter/test/ts_ignore_2.ts.autofix.json create mode 100644 ets2panda/linter/test/ts_ignore_2.ts.autofix.skip rename ets2panda/linter/test/{ts_ignore_2.ts.strict.json => ts_ignore_2.ts.json} (94%) delete mode 100644 ets2panda/linter/test/ts_ignore_2.ts.relax.json rename ets2panda/linter/test/{ts_nocheck.ts.relax.json => ts_nocheck.ts.json} (93%) delete mode 100644 ets2panda/linter/test/ts_nocheck.ts.strict.json delete mode 100644 ets2panda/linter/test/ts_nocheck_2.ts.autofix.json create mode 100644 ets2panda/linter/test/ts_nocheck_2.ts.autofix.skip rename ets2panda/linter/test/{ts_nocheck_2.ts.relax.json => ts_nocheck_2.ts.json} (95%) delete mode 100644 ets2panda/linter/test/ts_nocheck_2.ts.strict.json rename ets2panda/linter/test/{type_declarations.ts.strict.json => type_declarations.ts.json} (98%) delete mode 100644 ets2panda/linter/test/type_declarations.ts.relax.json rename ets2panda/linter/test/{types.ts.strict.json => types.ts.json} (99%) delete mode 100644 ets2panda/linter/test/types.ts.relax.json rename ets2panda/linter/test/{unary_wrong_types.ts.relax.json => unary_wrong_types.ts.json} (95%) delete mode 100644 ets2panda/linter/test/unary_wrong_types.ts.strict.json rename ets2panda/linter/test/{undefined_check_calls.ts.strict.json => undefined_check_calls.ts.json} (96%) delete mode 100644 ets2panda/linter/test/undefined_check_calls.ts.relax.json rename ets2panda/linter/test/{unique_names.ts.strict.json => unique_names.ts.json} (99%) delete mode 100644 ets2panda/linter/test/unique_names.ts.relax.json rename ets2panda/linter/test/{unknown_params.ts.strict.json => unknown_params.ts.json} (95%) delete mode 100644 ets2panda/linter/test/unknown_params.ts.relax.json rename ets2panda/linter/test/{utility_types.ts.strict.json => utility_types.ts.json} (99%) delete mode 100644 ets2panda/linter/test/utility_types.ts.relax.json rename ets2panda/linter/test/{var_declarations.ts.strict.json => var_declarations.ts.json} (97%) delete mode 100644 ets2panda/linter/test/var_declarations.ts.relax.json create mode 100644 ets2panda/linter/test_regression/14412.ts.json delete mode 100755 ets2panda/linter/test_regression/14412.ts.relax.json delete mode 100755 ets2panda/linter/test_regression/14412.ts.strict.json create mode 100644 ets2panda/linter/test_regression/14832.ts.json delete mode 100644 ets2panda/linter/test_regression/14832.ts.relax.json delete mode 100644 ets2panda/linter/test_regression/14832.ts.strict.json create mode 100644 ets2panda/linter/test_regression/14860.ts.json delete mode 100644 ets2panda/linter/test_regression/14860.ts.relax.json delete mode 100644 ets2panda/linter/test_regression/14860.ts.strict.json rename ets2panda/linter/test_regression/{14953.ts.strict.json => 14953.ts.json} (97%) delete mode 100644 ets2panda/linter/test_regression/14953.ts.relax.json create mode 100644 ets2panda/linter/test_regression/15086.ts.json delete mode 100644 ets2panda/linter/test_regression/15086.ts.relax.json delete mode 100644 ets2panda/linter/test_regression/15086.ts.strict.json rename ets2panda/linter/test_regression/{15431.ts.relax.json => 15431.ts.json} (100%) rename ets2panda/linter/test_regression/{15497.ts.relax.json => 15497.ts.json} (100%) rename ets2panda/linter/test_rules/{rule1.ts.strict.json => rule1.ts.json} (98%) delete mode 100644 ets2panda/linter/test_rules/rule1.ts.relax.json rename ets2panda/linter/test_rules/{rule102.ts.strict.json => rule102.ts.json} (97%) delete mode 100644 ets2panda/linter/test_rules/rule102.ts.relax.json rename ets2panda/linter/test_rules/{rule103.ts.strict.json => rule103.ts.json} (97%) delete mode 100644 ets2panda/linter/test_rules/rule103.ts.relax.json rename ets2panda/linter/test_rules/{rule104.ts.strict.json => rule104.ts.json} (93%) delete mode 100644 ets2panda/linter/test_rules/rule104.ts.relax.json rename ets2panda/linter/test_rules/{rule106.ts.relax.json => rule106.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule106.ts.strict.json rename ets2panda/linter/test_rules/{rule111.ts.strict.json => rule111.ts.json} (96%) delete mode 100644 ets2panda/linter/test_rules/rule111.ts.relax.json rename ets2panda/linter/test_rules/{rule113.ts.relax.json => rule113.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule113.ts.strict.json rename ets2panda/linter/test_rules/{rule114.ts.relax.json => rule114.ts.json} (93%) rename ets2panda/linter/test_rules/{rule116.ts.relax.json => rule116.ts.json} (94%) delete mode 100644 ets2panda/linter/test_rules/rule116.ts.strict.json rename ets2panda/linter/test_rules/{rule120.ts.strict.json => rule120.ts.json} (93%) delete mode 100644 ets2panda/linter/test_rules/rule120.ts.relax.json rename ets2panda/linter/test_rules/{rule121.ts.relax.json => rule121.ts.json} (94%) delete mode 100644 ets2panda/linter/test_rules/rule121.ts.strict.json rename ets2panda/linter/test_rules/{rule126.ts.relax.json => rule126.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule126.ts.strict.json rename ets2panda/linter/test_rules/{rule128.ts.strict.json => rule128.ts.json} (94%) delete mode 100644 ets2panda/linter/test_rules/rule128.ts.relax.json rename ets2panda/linter/test_rules/{rule129.ts.relax.json => rule129.ts.json} (96%) delete mode 100644 ets2panda/linter/test_rules/rule129.ts.strict.json rename ets2panda/linter/test_rules/{rule130.ts.relax.json => rule130.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule130.ts.strict.json rename ets2panda/linter/test_rules/{rule132.ts.relax.json => rule132.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule132.ts.strict.json rename ets2panda/linter/test_rules/{rule134.ts.relax.json => rule134.ts.json} (94%) rename ets2panda/linter/test_rules/{rule136.ts.strict.json => rule136.ts.json} (97%) delete mode 100644 ets2panda/linter/test_rules/rule136.ts.relax.json rename ets2panda/linter/test_rules/{rule137.ts.strict.json => rule137.ts.json} (94%) delete mode 100644 ets2panda/linter/test_rules/rule137.ts.relax.json rename ets2panda/linter/test_rules/{rule138.ts.relax.json => rule138.ts.json} (96%) delete mode 100644 ets2panda/linter/test_rules/rule138.ts.strict.json rename ets2panda/linter/test_rules/{rule140.ts.strict.json => rule139.ts.json} (96%) delete mode 100644 ets2panda/linter/test_rules/rule139.ts.relax.json rename ets2panda/linter/test_rules/{rule14.ts.relax.json => rule14.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule14.ts.strict.json rename ets2panda/linter/test_rules/{rule139.ts.strict.json => rule140.ts.json} (96%) delete mode 100644 ets2panda/linter/test_rules/rule140.ts.relax.json rename ets2panda/linter/test_rules/{rule142.ts.relax.json => rule142.ts.json} (96%) delete mode 100644 ets2panda/linter/test_rules/rule142.ts.strict.json rename ets2panda/linter/test_rules/{rule143.ts.strict.json => rule143.ts.json} (93%) delete mode 100644 ets2panda/linter/test_rules/rule143.ts.relax.json rename ets2panda/linter/test_rules/{rule144.ts.strict.json => rule144.ts.json} (99%) delete mode 100644 ets2panda/linter/test_rules/rule144.ts.relax.json rename ets2panda/linter/test_rules/{rule145.ts.strict.json => rule145.ts.json} (98%) delete mode 100644 ets2panda/linter/test_rules/rule145.ts.relax.json rename ets2panda/linter/test_rules/{rule146.ts.relax.json => rule146.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule146.ts.strict.json rename ets2panda/linter/test_rules/{rule147.ts.strict.json => rule147.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule147.ts.relax.json rename ets2panda/linter/test_rules/{rule149.ts.relax.json => rule149.ts.json} (99%) delete mode 100644 ets2panda/linter/test_rules/rule149.ts.strict.json rename ets2panda/linter/{test_regression/15497.ts.strict.json => test_rules/rule14_1.ts.json} (100%) delete mode 100644 ets2panda/linter/test_rules/rule14_1.ts.relax.json delete mode 100644 ets2panda/linter/test_rules/rule14_1.ts.strict.json rename ets2panda/linter/test_rules/{rule15.ts.relax.json => rule15.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule15.ts.strict.json rename ets2panda/linter/test_rules/{rule150.ts.relax.json => rule150.ts.json} (94%) delete mode 100644 ets2panda/linter/test_rules/rule150.ts.strict.json rename ets2panda/linter/test_rules/{rule151.ts.relax.json => rule151.ts.json} (99%) delete mode 100644 ets2panda/linter/test_rules/rule151.ts.strict.json rename ets2panda/linter/test_rules/{rule152.ts.strict.json => rule152.ts.json} (64%) delete mode 100644 ets2panda/linter/test_rules/rule152.ts.relax.json rename ets2panda/linter/test_rules/{rule16.ts.relax.json => rule16.ts.json} (93%) delete mode 100644 ets2panda/linter/test_rules/rule16.ts.strict.json rename ets2panda/linter/test_rules/{rule17.ts.strict.json => rule17.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule17.ts.relax.json rename ets2panda/linter/test_rules/{rule19.ts.relax.json => rule19.ts.json} (94%) delete mode 100644 ets2panda/linter/test_rules/rule19.ts.strict.json rename ets2panda/linter/test_rules/{rule2.ts.relax.json => rule2.ts.json} (96%) delete mode 100644 ets2panda/linter/test_rules/rule2.ts.strict.json rename ets2panda/linter/test_rules/{rule21.ts.strict.json => rule21.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule21.ts.relax.json rename ets2panda/linter/test_rules/{rule21_1.ts.relax.json => rule21_1.ts.json} (93%) delete mode 100644 ets2panda/linter/test_rules/rule21_1.ts.strict.json rename ets2panda/linter/test_rules/{rule21_2.ts.relax.json => rule21_2.ts.json} (93%) delete mode 100644 ets2panda/linter/test_rules/rule21_2.ts.strict.json rename ets2panda/linter/test_rules/{rule21_3.ts.relax.json => rule21_3.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule21_3.ts.strict.json rename ets2panda/linter/test_rules/{rule22.ts.relax.json => rule22.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule22.ts.strict.json rename ets2panda/linter/{test/dynamic_import.ts.relax.json => test_rules/rule25.ts.autofix.json} (37%) mode change 100755 => 100644 rename ets2panda/linter/test_rules/{rule114.ts.strict.json => rule25.ts.json} (76%) delete mode 100644 ets2panda/linter/test_rules/rule25.ts.relax.json rename ets2panda/linter/test_rules/{rule27.ts.relax.json => rule27.ts.json} (94%) delete mode 100644 ets2panda/linter/test_rules/rule27.ts.strict.json rename ets2panda/linter/test_rules/{rule28.ts.relax.json => rule28.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule28.ts.strict.json rename ets2panda/linter/test_rules/{rule29.ts.strict.json => rule29.ts.json} (94%) delete mode 100644 ets2panda/linter/test_rules/rule29.ts.relax.json rename ets2panda/linter/test_rules/{rule134.ts.strict.json => rule3.ts.autofix.json} (75%) rename ets2panda/linter/test_rules/{rule3.ts.strict.json => rule3.ts.json} (94%) delete mode 100644 ets2panda/linter/test_rules/rule3.ts.relax.json create mode 100644 ets2panda/linter/test_rules/rule30.ts.json delete mode 100644 ets2panda/linter/test_rules/rule30.ts.relax.json delete mode 100644 ets2panda/linter/test_rules/rule30.ts.strict.json rename ets2panda/linter/test_rules/{rule30_1.ts.relax.json => rule30_1.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule30_1.ts.strict.json rename ets2panda/linter/test_rules/{rule30_2.ts.relax.json => rule30_2.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule30_2.ts.strict.json create mode 100644 ets2panda/linter/test_rules/rule30_3.ts.json delete mode 100644 ets2panda/linter/test_rules/rule30_3.ts.relax.json delete mode 100644 ets2panda/linter/test_rules/rule30_3.ts.strict.json rename ets2panda/linter/test_rules/{rule30_4.ts.relax.json => rule30_4.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule30_4.ts.strict.json rename ets2panda/linter/test_rules/{rule30_5.ts.relax.json => rule30_5.ts.json} (93%) delete mode 100644 ets2panda/linter/test_rules/rule30_5.ts.strict.json rename ets2panda/linter/test_rules/{rule30_6.ts.relax.json => rule30_6.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule30_6.ts.strict.json rename ets2panda/linter/test_rules/{rule34.ts.relax.json => rule34.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule34.ts.strict.json create mode 100644 ets2panda/linter/test_rules/rule38.ts.json delete mode 100644 ets2panda/linter/test_rules/rule38.ts.relax.json delete mode 100644 ets2panda/linter/test_rules/rule38.ts.strict.json rename ets2panda/linter/test_rules/{rule4.ts.strict.json => rule4.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule4.ts.relax.json rename ets2panda/linter/test_rules/{rule40.ts.relax.json => rule40.ts.json} (96%) delete mode 100644 ets2panda/linter/test_rules/rule40.ts.strict.json rename ets2panda/linter/test_rules/{rule43.ts.strict.json => rule43.ts.json} (96%) delete mode 100644 ets2panda/linter/test_rules/rule43.ts.relax.json rename ets2panda/linter/test_rules/{rule46.ts.strict.json => rule46.ts.json} (94%) delete mode 100644 ets2panda/linter/test_rules/rule46.ts.relax.json rename ets2panda/linter/test_rules/{rule49.ts.strict.json => rule49.ts.json} (94%) delete mode 100644 ets2panda/linter/test_rules/rule49.ts.relax.json rename ets2panda/linter/test_rules/{rule5.ts.strict.json => rule5.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule5.ts.relax.json rename ets2panda/linter/test_rules/{rule50.ts.strict.json => rule50.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule50.ts.relax.json rename ets2panda/linter/test_rules/{rule51.ts.relax.json => rule51.ts.json} (94%) delete mode 100644 ets2panda/linter/test_rules/rule51.ts.strict.json rename ets2panda/linter/test_rules/{rule52.ts.relax.json => rule52.ts.json} (94%) delete mode 100644 ets2panda/linter/test_rules/rule52.ts.strict.json rename ets2panda/linter/{test_regression/15431.ts.strict.json => test_rules/rule53.ts.autofix.json} (57%) delete mode 100644 ets2panda/linter/test_rules/rule53.ts.autofix.skip rename ets2panda/linter/test_rules/{rule53.ts.strict.json => rule53.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule53.ts.relax.json rename ets2panda/linter/test_rules/{rule54.tsx.strict.json => rule54.tsx.json} (96%) delete mode 100644 ets2panda/linter/test_rules/rule54.tsx.relax.json rename ets2panda/linter/test_rules/{rule55.ts.relax.json => rule55.ts.json} (97%) delete mode 100644 ets2panda/linter/test_rules/rule55.ts.strict.json rename ets2panda/linter/test_rules/{rule59.ts.relax.json => rule59.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule59.ts.strict.json rename ets2panda/linter/test_rules/{rule60.ts.strict.json => rule60.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule60.ts.relax.json rename ets2panda/linter/test_rules/{rule65.ts.relax.json => rule65.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule65.ts.strict.json rename ets2panda/linter/test_rules/{rule66.ts.relax.json => rule66.ts.json} (93%) delete mode 100644 ets2panda/linter/test_rules/rule66.ts.strict.json rename ets2panda/linter/test_rules/{rule69.ts.strict.json => rule69.ts.json} (97%) delete mode 100644 ets2panda/linter/test_rules/rule69.ts.relax.json rename ets2panda/linter/test_rules/{rule71.ts.strict.json => rule71.ts.json} (98%) delete mode 100644 ets2panda/linter/test_rules/rule71.ts.relax.json rename ets2panda/linter/test_rules/{rule74.ts.strict.json => rule74.ts.json} (94%) delete mode 100644 ets2panda/linter/test_rules/rule74.ts.relax.json rename ets2panda/linter/test_rules/{rule79.ts.strict.json => rule79.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule79.ts.relax.json rename ets2panda/linter/test_rules/{rule8.ts.strict.json => rule8.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule8.ts.relax.json rename ets2panda/linter/test_rules/{rule80.ts.relax.json => rule80.ts.json} (93%) delete mode 100644 ets2panda/linter/test_rules/rule80.ts.strict.json rename ets2panda/linter/test_rules/{rule83.ts.strict.json => rule83.ts.json} (93%) delete mode 100644 ets2panda/linter/test_rules/rule83.ts.relax.json rename ets2panda/linter/test_rules/{rule84.ts.relax.json => rule84.ts.json} (93%) delete mode 100644 ets2panda/linter/test_rules/rule84.ts.strict.json rename ets2panda/linter/test_rules/{rule87.ts.strict.json => rule87.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule87.ts.relax.json rename ets2panda/linter/test_rules/{rule8_1.ts.relax.json => rule8_1.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule8_1.ts.strict.json rename ets2panda/linter/test_rules/{rule8_2.ts.strict.json => rule8_2.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule8_2.ts.relax.json rename ets2panda/linter/test_rules/{rule8_3.ts.strict.json => rule8_3.ts.json} (97%) delete mode 100644 ets2panda/linter/test_rules/rule8_3.ts.relax.json rename ets2panda/linter/test_rules/{rule8_4.ts.strict.json => rule8_4.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule8_4.ts.relax.json rename ets2panda/linter/test_rules/{rule8_5.ts.relax.json => rule8_5.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule8_5.ts.strict.json rename ets2panda/linter/test_rules/{rule8_6.ts.relax.json => rule8_6.ts.json} (97%) delete mode 100644 ets2panda/linter/test_rules/rule8_6.ts.strict.json rename ets2panda/linter/test_rules/{rule90.ts.strict.json => rule90.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule90.ts.relax.json create mode 100644 ets2panda/linter/test_rules/rule90_1.ts.json delete mode 100644 ets2panda/linter/test_rules/rule90_1.ts.relax.json delete mode 100644 ets2panda/linter/test_rules/rule90_1.ts.strict.json create mode 100644 ets2panda/linter/test_rules/rule90_2.ts.json delete mode 100644 ets2panda/linter/test_rules/rule90_2.ts.relax.json delete mode 100644 ets2panda/linter/test_rules/rule90_2.ts.strict.json rename ets2panda/linter/test_rules/{rule90_3.ts.strict.json => rule90_3.ts.json} (94%) delete mode 100644 ets2panda/linter/test_rules/rule90_3.ts.relax.json create mode 100644 ets2panda/linter/test_rules/rule90_4.ts.json delete mode 100644 ets2panda/linter/test_rules/rule90_4.ts.relax.json delete mode 100644 ets2panda/linter/test_rules/rule90_4.ts.strict.json create mode 100644 ets2panda/linter/test_rules/rule90_5.ts.json delete mode 100644 ets2panda/linter/test_rules/rule90_5.ts.relax.json delete mode 100644 ets2panda/linter/test_rules/rule90_5.ts.strict.json rename ets2panda/linter/test_rules/{rule91.ts.relax.json => rule91.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule91.ts.strict.json rename ets2panda/linter/test_rules/{rule92.ts.strict.json => rule92.ts.json} (93%) delete mode 100644 ets2panda/linter/test_rules/rule92.ts.relax.json rename ets2panda/linter/test_rules/{rule93.ts.relax.json => rule93.ts.json} (94%) rename ets2panda/linter/test_rules/{rule94.ts.relax.json => rule94.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule94.ts.strict.json rename ets2panda/linter/test_rules/{rule96.ts.relax.json => rule96.ts.json} (95%) delete mode 100644 ets2panda/linter/test_rules/rule96.ts.strict.json rename ets2panda/linter/test_rules/{rule99.ts.strict.json => rule99.ts.json} (96%) delete mode 100644 ets2panda/linter/test_rules/rule99.ts.relax.json diff --git a/ets2panda/linter/README.md b/ets2panda/linter/README.md index b056d3b475..906d5798df 100644 --- a/ets2panda/linter/README.md +++ b/ets2panda/linter/README.md @@ -44,16 +44,12 @@ Possible command options: `--deveco-plugin-mode` - this options defines special mode to launch from IDE and should NOT be used when running from command line. -`--relax` - defines 'relax' mode in which only problematic TypeScript language elements that cannot be transpiled by TypeScript migrator are counted. - `--project-folder ` - defines path to folder with TypeScript sources and subfolders which linter walks recurscevely. This option may be repeated in command line with different paths. `-p, --project ` - defines path to TS project configuration file (commonly known as tsconfig.json). If no input file is defined directly as command-line argument, then all source files from tsconfig.json will be processed by linter. Otherwise, linter will only process input files from command-line, that are included into project (i.e. files that belong to intersection of input files from command-line and tsconfig.json file). `-E, --TSC_Errors` - enables logging messages about compilation errors and unresolved symbols. -`--warnings-as-errors` - linter detects two kinds of problems: warnings and errors. This parameter make treatment of warnings as errors. - All other command line arguments are considered as paths to TypeScript files. To prevent command line buffer overflow, response file may be used. It is specified by adding `@` prefix to file name (e.g.: `tslinter.sh @response-file.txt` ). Response file should contain TypeScript source paths (one at each line). The response file argument should be the last command argument (any following argument will be ignored). diff --git a/ets2panda/linter/cookbook_convertor/src/cookbook_convertor.ts b/ets2panda/linter/cookbook_convertor/src/cookbook_convertor.ts index 20a72854ab..12f1f51a6b 100644 --- a/ets2panda/linter/cookbook_convertor/src/cookbook_convertor.ts +++ b/ets2panda/linter/cookbook_convertor/src/cookbook_convertor.ts @@ -18,7 +18,7 @@ import { join } from 'path'; const COPYRIGHT_HEADER = '/* \n\ - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. \n\ + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. \n\ * Licensed under the Apache License, Version 2.0 (the "License"); \n\ * you may not use this file except in compliance with the License. \n\ * You may obtain a copy of the License at \n\ diff --git a/ets2panda/linter/lib/Autofixer.ts b/ets2panda/linter/lib/Autofixer.ts index 7192c11d7a..7ceef597a8 100644 --- a/ets2panda/linter/lib/Autofixer.ts +++ b/ets2panda/linter/lib/Autofixer.ts @@ -17,6 +17,7 @@ import * as ts from 'typescript'; import type { AutofixInfo } from './autofixes/AutofixInfo'; import { FaultID } from './Problems'; import { isAssignmentOperator } from './utils/functions/isAssignmentOperator'; +import { TsUtils } from './utils/TsUtils'; export const AUTOFIX_ALL: AutofixInfo = { problemID: '', @@ -31,7 +32,11 @@ export const AUTOFIX_ALL: AutofixInfo = { * algorithm is improved to guarantee that fixes can be applied * safely and won't break program code. */ -const UNSAFE_FIXES: FaultID[] = [FaultID.LiteralAsPropertyName, FaultID.PropertyAccessByIndex]; +const UNSAFE_FIXES: FaultID[] = [ + FaultID.LiteralAsPropertyName, + FaultID.PropertyAccessByIndex, + FaultID.PrivateIdentifier +]; export interface Autofix { replacementText: string; @@ -113,7 +118,7 @@ export function fixFunctionExpression( return { start: funcExpr.getStart(), end: funcExpr.getEnd(), replacementText: text }; } -export function fixReturnType(funcLikeDecl: ts.FunctionLikeDeclaration, typeNode: ts.TypeNode): Autofix { +export function fixMissingReturnType(funcLikeDecl: ts.FunctionLikeDeclaration, typeNode: ts.TypeNode): Autofix { const text = ': ' + printer.printNode(ts.EmitHint.Unspecified, typeNode, funcLikeDecl.getSourceFile()); const pos = getReturnTypePosition(funcLikeDecl); return { start: pos, end: pos, replacementText: text }; @@ -221,3 +226,115 @@ function needsParentheses(node: ts.FunctionExpression): boolean { ts.isBinaryExpression(parent) && !isAssignmentOperator(parent.operatorToken) ); } + +export function fixCtorParameterProperties( + ctorDecl: ts.ConstructorDeclaration, paramTypes: ts.TypeNode[] +): Autofix[] | undefined { + const fieldInitStmts: ts.Statement[] = []; + const newFieldPos = ctorDecl.getStart(); + const autofixes: Autofix[] = [{ start: newFieldPos, end: newFieldPos, replacementText: '' }]; + + for (let i = 0; i < ctorDecl.parameters.length; i++) { + const param = ctorDecl.parameters[i]; + + // Parameter property can not be a destructuring parameter. + if (!ts.isIdentifier(param.name)) { + continue; + } + + if (TsUtils.hasAccessModifier(param)) { + const propIdent = ts.factory.createIdentifier(param.name.text); + + const newFieldNode = ts.factory.createPropertyDeclaration( + ts.getModifiers(param), propIdent, undefined, paramTypes[i], undefined + ); + const newFieldText = printer.printNode(ts.EmitHint.Unspecified, newFieldNode, ctorDecl.getSourceFile()) + '\n'; + autofixes[0].replacementText += newFieldText; + + const newParamDecl = ts.factory.createParameterDeclaration( + undefined, undefined, param.name, param.questionToken, param.type, param.initializer + ); + const newParamText = printer.printNode(ts.EmitHint.Unspecified, newParamDecl, ctorDecl.getSourceFile()); + autofixes.push({ start: param.getStart(), end: param.getEnd(), replacementText: newParamText }); + + fieldInitStmts.push(ts.factory.createExpressionStatement(ts.factory.createAssignment( + ts.factory.createPropertyAccessExpression( + ts.factory.createThis(), + propIdent + ), + propIdent + ))); + } + } + + // Note: Bodyless ctors can't have parameter properties. + if (ctorDecl.body) { + const newBody = ts.factory.createBlock(fieldInitStmts.concat(ctorDecl.body.statements), true); + const newBodyText = printer.printNode(ts.EmitHint.Unspecified, newBody, ctorDecl.getSourceFile()); + autofixes.push({ start: ctorDecl.body.getStart(), end: ctorDecl.body.getEnd(), replacementText: newBodyText }); + } + + return autofixes; +} + +export function fixPrivateIdentifier(ident: ts.PrivateIdentifier): Autofix { + if ( + ts.isPropertyDeclaration(ident.parent) || ts.isMethodDeclaration(ident.parent) || + ts.isGetAccessorDeclaration(ident.parent) || ts.isSetAccessorDeclaration(ident.parent) + ) { + // Note: 'private' modifier should always be first. + const mods = ts.getModifiers(ident.parent); + let newMods: ts.Modifier[] = [ts.factory.createModifier(ts.SyntaxKind.PrivateKeyword)]; + if (mods) { + newMods = newMods.concat(mods); + } + + const newName = ident.text.slice(1, ident.text.length); + const newDecl = replacePrivateIdentInDeclarationName(newMods, newName, ident.parent); + const text = printer.printNode(ts.EmitHint.Unspecified, newDecl, ident.getSourceFile()); + return { start: ident.parent.getStart(), end: ident.parent.getEnd(), replacementText: text }; + } + + return { start: ident.getStart(), end: ident.getEnd(), replacementText: ident.text.slice(1, ident.text.length) }; +} + +function replacePrivateIdentInDeclarationName( + mods: ts.Modifier[], + name: string, + oldDecl: ts.PropertyDeclaration | ts.MethodDeclaration | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration +): ts.Declaration { + if (ts.isPropertyDeclaration(oldDecl)) { + return ts.factory.createPropertyDeclaration( + mods, + ts.factory.createIdentifier(name), + oldDecl.questionToken ?? oldDecl.exclamationToken, + oldDecl.type, + oldDecl.initializer + ); + } else if (ts.isMethodDeclaration(oldDecl)) { + return ts.factory.createMethodDeclaration( + mods, + oldDecl.asteriskToken, + ts.factory.createIdentifier(name), + oldDecl.questionToken, + oldDecl.typeParameters, + oldDecl.parameters, + oldDecl.type, + oldDecl.body + ); + } else if (ts.isGetAccessorDeclaration(oldDecl)) { + return ts.factory.createGetAccessorDeclaration( + mods, + ts.factory.createIdentifier(name), + oldDecl.parameters, + oldDecl.type, + oldDecl.body + ); + } + return ts.factory.createSetAccessorDeclaration( + mods, + ts.factory.createIdentifier(name), + oldDecl.parameters, + oldDecl.body + ); +} diff --git a/ets2panda/linter/lib/CommandLineOptions.ts b/ets2panda/linter/lib/CommandLineOptions.ts index 60916b0fff..70d3fce607 100644 --- a/ets2panda/linter/lib/CommandLineOptions.ts +++ b/ets2panda/linter/lib/CommandLineOptions.ts @@ -18,7 +18,6 @@ import type { AutofixInfo } from './autofixes/AutofixInfo'; export interface CommandLineOptions { testMode?: boolean; - strictMode?: boolean; ideMode?: boolean; logTscErrors?: boolean; warningsAsErrors: boolean; diff --git a/ets2panda/linter/lib/FaultAttrs.ts b/ets2panda/linter/lib/FaultAttrs.ts index 6fc7709eaa..3d336d1a92 100644 --- a/ets2panda/linter/lib/FaultAttrs.ts +++ b/ets2panda/linter/lib/FaultAttrs.ts @@ -19,19 +19,18 @@ import { ProblemSeverity } from './ProblemSeverity'; export class FaultAttributes { constructor( public cookBookRef: number, - public migratable: boolean = false, public severity: ProblemSeverity = ProblemSeverity.ERROR ) {} } export const faultsAttrs: FaultAttributes[] = []; -faultsAttrs[FaultID.LiteralAsPropertyName] = new FaultAttributes(1, true); +faultsAttrs[FaultID.LiteralAsPropertyName] = new FaultAttributes(1); faultsAttrs[FaultID.ComputedPropertyName] = new FaultAttributes(1); faultsAttrs[FaultID.SymbolType] = new FaultAttributes(2); -faultsAttrs[FaultID.PrivateIdentifier] = new FaultAttributes(3, true); -faultsAttrs[FaultID.DeclWithDuplicateName] = new FaultAttributes(4, true); -faultsAttrs[FaultID.VarDeclaration] = new FaultAttributes(5, true); +faultsAttrs[FaultID.PrivateIdentifier] = new FaultAttributes(3); +faultsAttrs[FaultID.DeclWithDuplicateName] = new FaultAttributes(4); +faultsAttrs[FaultID.VarDeclaration] = new FaultAttributes(5); faultsAttrs[FaultID.AnyType] = new FaultAttributes(8); faultsAttrs[FaultID.UnknownType] = new FaultAttributes(8); faultsAttrs[FaultID.CallSignature] = new FaultAttributes(14); @@ -41,38 +40,38 @@ faultsAttrs[FaultID.IndexMember] = new FaultAttributes(17); faultsAttrs[FaultID.IntersectionType] = new FaultAttributes(19); faultsAttrs[FaultID.ThisType] = new FaultAttributes(21); faultsAttrs[FaultID.ConditionalType] = new FaultAttributes(22); -faultsAttrs[FaultID.ParameterProperties] = new FaultAttributes(25, true); +faultsAttrs[FaultID.ParameterProperties] = new FaultAttributes(25); faultsAttrs[FaultID.ConstructorIface] = new FaultAttributes(27); faultsAttrs[FaultID.IndexedAccessType] = new FaultAttributes(28); -faultsAttrs[FaultID.PropertyAccessByIndex] = new FaultAttributes(29, true); +faultsAttrs[FaultID.PropertyAccessByIndex] = new FaultAttributes(29); faultsAttrs[FaultID.StructuralIdentity] = new FaultAttributes(30); faultsAttrs[FaultID.GenericCallNoTypeArgs] = new FaultAttributes(34); faultsAttrs[FaultID.ObjectLiteralNoContextType] = new FaultAttributes(38); faultsAttrs[FaultID.ObjectTypeLiteral] = new FaultAttributes(40); faultsAttrs[FaultID.ArrayLiteralNoContextType] = new FaultAttributes(43); -faultsAttrs[FaultID.FunctionExpression] = new FaultAttributes(46, true); -faultsAttrs[FaultID.LambdaWithTypeParameters] = new FaultAttributes(49, true); -faultsAttrs[FaultID.ClassExpression] = new FaultAttributes(50, true); +faultsAttrs[FaultID.FunctionExpression] = new FaultAttributes(46); +faultsAttrs[FaultID.LambdaWithTypeParameters] = new FaultAttributes(49); +faultsAttrs[FaultID.ClassExpression] = new FaultAttributes(50); faultsAttrs[FaultID.ImplementsClass] = new FaultAttributes(51); faultsAttrs[FaultID.MethodReassignment] = new FaultAttributes(52); -faultsAttrs[FaultID.TypeAssertion] = new FaultAttributes(53, true); +faultsAttrs[FaultID.TypeAssertion] = new FaultAttributes(53); faultsAttrs[FaultID.JsxElement] = new FaultAttributes(54); faultsAttrs[FaultID.UnaryArithmNotNumber] = new FaultAttributes(55); faultsAttrs[FaultID.DeleteOperator] = new FaultAttributes(59); faultsAttrs[FaultID.TypeQuery] = new FaultAttributes(60); faultsAttrs[FaultID.InstanceofUnsupported] = new FaultAttributes(65); faultsAttrs[FaultID.InOperator] = new FaultAttributes(66); -faultsAttrs[FaultID.DestructuringAssignment] = new FaultAttributes(69, true); +faultsAttrs[FaultID.DestructuringAssignment] = new FaultAttributes(69); faultsAttrs[FaultID.CommaOperator] = new FaultAttributes(71); -faultsAttrs[FaultID.DestructuringDeclaration] = new FaultAttributes(74, true); -faultsAttrs[FaultID.CatchWithUnsupportedType] = new FaultAttributes(79, true); +faultsAttrs[FaultID.DestructuringDeclaration] = new FaultAttributes(74); +faultsAttrs[FaultID.CatchWithUnsupportedType] = new FaultAttributes(79); faultsAttrs[FaultID.ForInStatement] = new FaultAttributes(80); faultsAttrs[FaultID.MappedType] = new FaultAttributes(83); faultsAttrs[FaultID.WithStatement] = new FaultAttributes(84); -faultsAttrs[FaultID.ThrowStatement] = new FaultAttributes(87, true); -faultsAttrs[FaultID.LimitedReturnTypeInference] = new FaultAttributes(90, true); +faultsAttrs[FaultID.ThrowStatement] = new FaultAttributes(87); +faultsAttrs[FaultID.LimitedReturnTypeInference] = new FaultAttributes(90); faultsAttrs[FaultID.DestructuringParameter] = new FaultAttributes(91); -faultsAttrs[FaultID.LocalFunction] = new FaultAttributes(92, true); +faultsAttrs[FaultID.LocalFunction] = new FaultAttributes(92); faultsAttrs[FaultID.FunctionContainsThis] = new FaultAttributes(93); faultsAttrs[FaultID.GeneratorFunction] = new FaultAttributes(94); faultsAttrs[FaultID.YieldExpression] = new FaultAttributes(94); @@ -86,25 +85,25 @@ faultsAttrs[FaultID.EnumMemberNonConstInit] = new FaultAttributes(111); faultsAttrs[FaultID.EnumMerging] = new FaultAttributes(113); faultsAttrs[FaultID.NamespaceAsObject] = new FaultAttributes(114); faultsAttrs[FaultID.NonDeclarationInNamespace] = new FaultAttributes(116); -faultsAttrs[FaultID.DefaultImport] = new FaultAttributes(120, true); +faultsAttrs[FaultID.DefaultImport] = new FaultAttributes(120); faultsAttrs[FaultID.ImportAssignment] = new FaultAttributes(121); faultsAttrs[FaultID.ExportAssignment] = new FaultAttributes(126); faultsAttrs[FaultID.ShorthandAmbientModuleDecl] = new FaultAttributes(128); faultsAttrs[FaultID.WildcardsInModuleName] = new FaultAttributes(129); faultsAttrs[FaultID.UMDModuleDefinition] = new FaultAttributes(130); faultsAttrs[FaultID.NewTarget] = new FaultAttributes(132); -faultsAttrs[FaultID.DefiniteAssignment] = new FaultAttributes(134, false, ProblemSeverity.WARNING); +faultsAttrs[FaultID.DefiniteAssignment] = new FaultAttributes(134, ProblemSeverity.WARNING); faultsAttrs[FaultID.Prototype] = new FaultAttributes(136); -faultsAttrs[FaultID.GlobalThis] = new FaultAttributes(137, false, ProblemSeverity.WARNING); +faultsAttrs[FaultID.GlobalThis] = new FaultAttributes(137, ProblemSeverity.WARNING); faultsAttrs[FaultID.UtilityType] = new FaultAttributes(138); faultsAttrs[FaultID.PropertyDeclOnFunction] = new FaultAttributes(139); -faultsAttrs[FaultID.FunctionBind] = new FaultAttributes(140, false, ProblemSeverity.WARNING); +faultsAttrs[FaultID.FunctionBind] = new FaultAttributes(140, ProblemSeverity.WARNING); faultsAttrs[FaultID.ConstAssertion] = new FaultAttributes(142); faultsAttrs[FaultID.ImportAssertion] = new FaultAttributes(143); faultsAttrs[FaultID.LimitedStdLibApi] = new FaultAttributes(144); faultsAttrs[FaultID.StrictDiagnostic] = new FaultAttributes(145); faultsAttrs[FaultID.ErrorSuppression] = new FaultAttributes(146); -faultsAttrs[FaultID.ClassAsObject] = new FaultAttributes(149, false, ProblemSeverity.WARNING); +faultsAttrs[FaultID.ClassAsObject] = new FaultAttributes(149, ProblemSeverity.WARNING); faultsAttrs[FaultID.ImportAfterStatement] = new FaultAttributes(150); -faultsAttrs[FaultID.EsObjectType] = new FaultAttributes(151, false, ProblemSeverity.WARNING); +faultsAttrs[FaultID.EsObjectType] = new FaultAttributes(151, ProblemSeverity.WARNING); faultsAttrs[FaultID.FunctionApplyCall] = new FaultAttributes(152); diff --git a/ets2panda/linter/lib/LinterRunner.ts b/ets2panda/linter/lib/LinterRunner.ts index 5573d39bcc..8580211f4f 100644 --- a/ets2panda/linter/lib/LinterRunner.ts +++ b/ets2panda/linter/lib/LinterRunner.ts @@ -66,11 +66,6 @@ function countProblems(linter: TypeScriptLinter): [number, number] { let errorNodesTotal = 0; let warningNodes = 0; for (let i = 0; i < FaultID.LAST_ID; i++) { - // if Strict mode - count all cases - if (!linter.strictMode && faultsAttrs[i].migratable) { - // In relax mode skip migratable - continue; - } switch (faultsAttrs[i].severity) { case ProblemSeverity.ERROR: errorNodesTotal += linter.nodeCounters[i]; @@ -107,7 +102,6 @@ export function lint(options: LintOptions): LintRunResult { const linter = new TypeScriptLinter( tsProgram.getTypeChecker(), new AutofixInfoSet(cmdOptions.autofixInfo), - !!cmdOptions.strictMode, cancellationToken, options.incrementalLintInfo, tscStrictDiagnostics, @@ -236,11 +230,6 @@ function logTotalProblemsInfo(errorNodes: number, warningNodes: number, linter: function logProblemsPercentageByFeatures(linter: TypeScriptLinter): void { consoleLog('\nPercent by features: '); for (let i = 0; i < FaultID.LAST_ID; i++) { - // if Strict mode - count all cases - if (!linter.strictMode && faultsAttrs[i].migratable) { - continue; - } - const nodes = linter.nodeCounters[i]; const lines = linter.lineCounters[i]; const pecentage = (nodes / linter.totalVisitedNodes * 100).toFixed(2).padEnd(7, ' '); diff --git a/ets2panda/linter/lib/TypeScriptLinter.ts b/ets2panda/linter/lib/TypeScriptLinter.ts index f12a5f4d6f..29b57204b2 100644 --- a/ets2panda/linter/lib/TypeScriptLinter.ts +++ b/ets2panda/linter/lib/TypeScriptLinter.ts @@ -117,7 +117,6 @@ export class TypeScriptLinter { constructor( private readonly tsTypeChecker: ts.TypeChecker, private readonly autofixesInfo: AutofixInfoSet, - readonly strictMode: boolean, private readonly cancellationToken?: ts.CancellationToken, private readonly incrementalLintInfo?: IncrementalLintInfo, private readonly tscStrictDiagnostics?: Map, @@ -184,7 +183,9 @@ export class TypeScriptLinter { [ts.SyntaxKind.SetAccessor, this.handleSetAccessor], [ts.SyntaxKind.ConstructSignature, this.handleConstructSignature], [ts.SyntaxKind.ExpressionWithTypeArguments, this.handleExpressionWithTypeArguments], - [ts.SyntaxKind.ComputedPropertyName, this.handleComputedPropertyName] + [ts.SyntaxKind.ComputedPropertyName, this.handleComputedPropertyName], + [ts.SyntaxKind.Constructor, this.handleConstructorDeclaration], + [ts.SyntaxKind.PrivateIdentifier, this.handlePrivateIdentifier] ]); private getLineAndCharacterOfNode(node: ts.Node | ts.CommentRange): ts.LineAndCharacter { @@ -200,11 +201,6 @@ export class TypeScriptLinter { autofixable: boolean = false, autofix?: Autofix[] ): void { - if (!this.strictMode && faultsAttrs[faultId].migratable) { - // In relax mode skip migratable - return; - } - this.nodeCounters[faultId]++; const { line, character } = this.getLineAndCharacterOfNode(node); if (TypeScriptLinter.ideMode) { @@ -360,6 +356,9 @@ export class TypeScriptLinter { if (ts.isIdentifier(ident2) && ts.isPrivateIdentifier(ident1)) { return ident2.text === ident1.text.substring(1); } + if (ts.isPrivateIdentifier(ident1) && ts.isPrivateIdentifier(ident2)) { + return ident1.text.substring(1) === ident2.text.substring(1); + } return false; } @@ -371,29 +370,59 @@ export class TypeScriptLinter { } private countClassMembersWithDuplicateName(tsClassDecl: ts.ClassDeclaration): void { - const nClassMembers = tsClassDecl.members.length; - const isNodeReported = new Array(nClassMembers); - for (let curIdx = 0; curIdx < nClassMembers; ++curIdx) { - const tsCurrentMember = tsClassDecl.members[curIdx]; - if (!TypeScriptLinter.isIdentifierOrPrivateIdentifier(tsCurrentMember.name)) { + for (const currentMember of tsClassDecl.members) { + if (this.classMemberHasDuplicateName(currentMember, tsClassDecl)) { + this.incrementCounters(currentMember, FaultID.DeclWithDuplicateName); + } + } + } + + private classMemberHasDuplicateName( + targetMember: ts.ClassElement, tsClassLikeDecl: ts.ClassLikeDeclaration, classType?: ts.Type + ): boolean { + + /* + * If two class members have the same name where one is a private identifer, + * then such members are considered to have duplicate names. + */ + if (!TypeScriptLinter.isIdentifierOrPrivateIdentifier(targetMember.name)) { + return false; + } + + for (const classMember of tsClassLikeDecl.members) { + if (targetMember === classMember) { continue; } - if (isNodeReported[curIdx]) { + + // Check constructor parameter properties. + if (ts.isConstructorDeclaration(classMember) && classMember.parameters.some((x) => { + return ts.isIdentifier(x.name) && TsUtils.hasAccessModifier(x) && + TypeScriptLinter.isPrivateIdentifierDuplicateOfIdentifier(targetMember.name as ts.Identifier, x.name); + })) { + return true; + } + + if (!TypeScriptLinter.isIdentifierOrPrivateIdentifier(classMember.name)) { continue; } - for (let idx = curIdx + 1; idx < nClassMembers; ++idx) { - const tsClassMember = tsClassDecl.members[idx]; - if (!TypeScriptLinter.isIdentifierOrPrivateIdentifier(tsClassMember.name)) { - continue; - } - if (TypeScriptLinter.isPrivateIdentifierDuplicateOfIdentifier(tsCurrentMember.name, tsClassMember.name)) { - this.incrementCounters(tsCurrentMember, FaultID.DeclWithDuplicateName); - this.incrementCounters(tsClassMember, FaultID.DeclWithDuplicateName); - isNodeReported[idx] = true; - break; + + if (TypeScriptLinter.isPrivateIdentifierDuplicateOfIdentifier(targetMember.name, classMember.name)) { + return true; + } + } + + classType ??= this.tsTypeChecker.getTypeAtLocation(tsClassLikeDecl); + if (classType) { + const baseType = TsUtils.getBaseClassType(classType); + if (baseType) { + const baseDecl = baseType.getSymbol()?.valueDeclaration as ts.ClassLikeDeclaration; + if (baseDecl) { + return this.classMemberHasDuplicateName(targetMember, baseDecl); } } } + + return false; } private isPrototypePropertyAccess( @@ -534,16 +563,6 @@ export class TypeScriptLinter { if (ts.isArrayBindingPattern(tsParam.name) || ts.isObjectBindingPattern(tsParam.name)) { this.incrementCounters(node, FaultID.DestructuringParameter); } - const tsParamMods = ts.getModifiers(tsParam); - if ( - tsParamMods && - (TsUtils.hasModifier(tsParamMods, ts.SyntaxKind.PublicKeyword) || - TsUtils.hasModifier(tsParamMods, ts.SyntaxKind.ProtectedKeyword) || - TsUtils.hasModifier(tsParamMods, ts.SyntaxKind.ReadonlyKeyword) || - TsUtils.hasModifier(tsParamMods, ts.SyntaxKind.PrivateKeyword)) - ) { - this.incrementCounters(node, FaultID.ParameterProperties); - } this.handleDeclarationInferredType(tsParam); } @@ -923,6 +942,10 @@ export class TypeScriptLinter { private handleMissingReturnType( funcLikeDecl: ts.FunctionLikeDeclaration | ts.MethodSignature ): [boolean, ts.TypeNode | undefined] { + if (funcLikeDecl.type) { + return [false, funcLikeDecl.type]; + } + // Note: Return type can't be inferred for function without body. const isSignature = ts.isMethodSignature(funcLikeDecl); if (isSignature || !funcLikeDecl.body) { @@ -960,11 +983,12 @@ export class TypeScriptLinter { hasLimitedRetTypeInference = true; } else if (hasLimitedRetTypeInference) { newRetTypeNode = this.tsTypeChecker.typeToTypeNode(tsRetType, funcLikeDecl, ts.NodeBuilderFlags.None); - if (newRetTypeNode && !isFuncExpr) { - autofixable = true; - if (this.autofixesInfo.shouldAutofix(funcLikeDecl, FaultID.LimitedReturnTypeInference)) { - autofix = [Autofixer.fixReturnType(funcLikeDecl, newRetTypeNode)]; - } + autofixable = !!newRetTypeNode; + + if (newRetTypeNode && !isFuncExpr && + this.autofixesInfo.shouldAutofix(funcLikeDecl, FaultID.LimitedReturnTypeInference) + ) { + autofix = [Autofixer.fixMissingReturnType(funcLikeDecl, newRetTypeNode)]; } } } @@ -1208,7 +1232,7 @@ export class TypeScriptLinter { * In TS catch clause doesn't permit specification of the exception varible type except 'any' or 'unknown'. * It is not compatible with STS 'catch' where the exception variable has to be of type * Error or derived from it. - * So each 'catch' which has explicit type for the exception object goes to problems in strict mode. + * So each 'catch' which has explicit type for the exception object goes to problems. */ if (tsCatch.variableDeclaration?.type) { let autofix: Autofix[] | undefined; @@ -2118,6 +2142,69 @@ export class TypeScriptLinter { forEachNodeInSubtree(scope, callback, stopCondition); } + private handleConstructorDeclaration(node: ts.Node): void { + const ctorDecl = node as ts.ConstructorDeclaration; + + if (ctorDecl.parameters.some((x) => { + return TsUtils.hasAccessModifier(x); + })) { + let paramTypes: ts.TypeNode[] | undefined; + if (ctorDecl.body) { + paramTypes = this.collectCtorParamTypes(ctorDecl); + } + + const autofixable = !!paramTypes; + let autofix: Autofix[] | undefined; + + if (autofixable && paramTypes !== undefined && + this.autofixesInfo.shouldAutofix(node, FaultID.ParameterProperties) + ) { + autofix = Autofixer.fixCtorParameterProperties(ctorDecl, paramTypes); + } + + this.incrementCounters(node, FaultID.ParameterProperties, autofixable, autofix); + } + } + + private collectCtorParamTypes(ctorDecl: ts.ConstructorDeclaration): ts.TypeNode[] | undefined { + const paramTypes: ts.TypeNode[] = []; + + for (const param of ctorDecl.parameters) { + let paramTypeNode = param.type; + if (!paramTypeNode) { + const paramType = this.tsTypeChecker.getTypeAtLocation(param); + paramTypeNode = this.tsTypeChecker.typeToTypeNode(paramType, param, ts.NodeBuilderFlags.None); + } + if (!paramTypeNode || !this.tsUtils.isSupportedType(paramTypeNode)) { + return undefined; + } + paramTypes.push(paramTypeNode); + } + + return paramTypes; + } + + private handlePrivateIdentifier(node: ts.Node): void { + const ident = node as ts.PrivateIdentifier; + let autofix: Autofix[] | undefined; + let autofixable = false; + + const classMember = this.tsTypeChecker.getSymbolAtLocation(ident); + if (classMember && (classMember.getFlags() & ts.SymbolFlags.ClassMember) !== 0 && classMember.valueDeclaration) { + const memberDecl = classMember.valueDeclaration as ts.ClassElement; + const parentDecl = memberDecl.parent; + if (ts.isClassLike(parentDecl) && !this.classMemberHasDuplicateName(memberDecl, parentDecl)) { + autofixable = true; + + if (this.autofixesInfo.shouldAutofix(node, FaultID.PrivateIdentifier)) { + autofix = [Autofixer.fixPrivateIdentifier(ident)]; + } + } + } + + this.incrementCounters(node, FaultID.PrivateIdentifier, autofixable, autofix); + } + lint(sourceFile: ts.SourceFile): void { this.walkedComments.clear(); this.sourceFile = sourceFile; diff --git a/ets2panda/linter/lib/TypeScriptLinterConfig.ts b/ets2panda/linter/lib/TypeScriptLinterConfig.ts index 6051e73445..0429b16bc3 100644 --- a/ets2panda/linter/lib/TypeScriptLinterConfig.ts +++ b/ets2panda/linter/lib/TypeScriptLinterConfig.ts @@ -133,7 +133,6 @@ export class LinterConfig { [ts.SyntaxKind.IntersectionType, FaultID.IntersectionType], [ts.SyntaxKind.TypeLiteral, FaultID.ObjectTypeLiteral], [ts.SyntaxKind.ConstructorType, FaultID.ConstructorFuncs], - [ts.SyntaxKind.PrivateIdentifier, FaultID.PrivateIdentifier], [ts.SyntaxKind.ConditionalType, FaultID.ConditionalType], [ts.SyntaxKind.MappedType, FaultID.MappedType], [ts.SyntaxKind.JsxElement, FaultID.JsxElement], diff --git a/ets2panda/linter/lib/autofixes/AutofixTitles.ts b/ets2panda/linter/lib/autofixes/AutofixTitles.ts index 546dbdba61..efb3ee2480 100644 --- a/ets2panda/linter/lib/autofixes/AutofixTitles.ts +++ b/ets2panda/linter/lib/autofixes/AutofixTitles.ts @@ -16,11 +16,12 @@ // generated from recipes.rst export const cookBookRefToFixTitle: Map = new Map([ [1, 'Replace property name with identifier'], + [3, 'Replace with \'private\' modifier'], + [25, 'Replace with field declaration'], [29, 'Replace with dot notation'], [46, 'Convert to arrow function'], [53, 'Replace to \'as\' expression'], [79, 'Remove type annotation'], - [87, 'Wrap in \'Error\''], [90, 'Annotate return type'], [120, 'Replace with explicit import'] ]); diff --git a/ets2panda/linter/lib/utils/TsUtils.ts b/ets2panda/linter/lib/utils/TsUtils.ts index 8e88946275..45b0d04519 100644 --- a/ets2panda/linter/lib/utils/TsUtils.ts +++ b/ets2panda/linter/lib/utils/TsUtils.ts @@ -1009,9 +1009,15 @@ export class TsUtils { [FaultID.DeclWithDuplicateName, TsUtils.getDeclWithDuplicateNameHighlightRange], [FaultID.ObjectLiteralNoContextType, TsUtils.getObjectLiteralNoContextTypeHighlightRange], [FaultID.ClassExpression, TsUtils.getClassExpressionHighlightRange], - [FaultID.MultipleStaticBlocks, TsUtils.getMultipleStaticBlocksHighlightRange] + [FaultID.MultipleStaticBlocks, TsUtils.getMultipleStaticBlocksHighlightRange], + [FaultID.ParameterProperties, TsUtils.getParameterPropertiesHighlightRange] ]); + static getKeywordHighlightRange(nodeOrComment: ts.Node | ts.CommentRange, keyword: string): [number, number] { + const start = this.getStartPos(nodeOrComment); + return [start, start + keyword.length]; + } + static getVarDeclarationHighlightRange(nodeOrComment: ts.Node | ts.CommentRange): [number, number] | undefined { return this.getKeywordHighlightRange(nodeOrComment, 'var'); } @@ -1120,9 +1126,12 @@ export class TsUtils { return this.getKeywordHighlightRange(nodeOrComment, 'static'); } - static getKeywordHighlightRange(nodeOrComment: ts.Node | ts.CommentRange, keyword: string): [number, number] { - const start = this.getStartPos(nodeOrComment); - return [start, start + keyword.length]; + static getParameterPropertiesHighlightRange(nodeOrComment: ts.Node | ts.CommentRange): [number, number] | undefined { + const params = (nodeOrComment as ts.ConstructorDeclaration).parameters; + if (params.length) { + return [params[0].getStart(), params[params.length - 1].getEnd()]; + } + return undefined; } isStdRecordType(type: ts.Type): boolean { @@ -1556,4 +1565,44 @@ export class TsUtils { return !!sourceFile && !!isEtsFileCb && isEtsFileCb(sourceFile) && sourceFile.isDeclarationFile && !!decl.modifiers?.some((m) => { return m.kind === ts.SyntaxKind.PrivateKeyword; }); } + + static hasAccessModifier(decl: ts.HasModifiers): boolean { + const modifiers = ts.getModifiers(decl); + return ( + !!modifiers && + (TsUtils.hasModifier(modifiers, ts.SyntaxKind.PublicKeyword) || + TsUtils.hasModifier(modifiers, ts.SyntaxKind.ProtectedKeyword) || + TsUtils.hasModifier(modifiers, ts.SyntaxKind.PrivateKeyword)) + ); + } + + static getModifier( + modifiers: readonly ts.Modifier[] | undefined, modifierKind: ts.SyntaxKind + ): ts.Modifier | undefined { + if (!modifiers) { + return undefined; + } + return modifiers.find((x) => { + return x.kind === modifierKind; + }); + } + + static getAccessModifier(modifiers: readonly ts.Modifier[] | undefined): ts.Modifier | undefined { + return TsUtils.getModifier(modifiers, ts.SyntaxKind.PublicKeyword) ?? + TsUtils.getModifier(modifiers, ts.SyntaxKind.ProtectedKeyword) ?? + TsUtils.getModifier(modifiers, ts.SyntaxKind.PrivateKeyword); + } + + static getBaseClassType(type: ts.Type): ts.InterfaceType | undefined { + const baseTypes = type.getBaseTypes(); + if (baseTypes) { + for (const baseType of baseTypes) { + if (baseType.isClass()) { + return baseType; + } + } + } + + return undefined; + } } diff --git a/ets2panda/linter/scripts/update-test-results.mjs b/ets2panda/linter/scripts/update-test-results.mjs index 533eeb8745..552af2fc69 100644 --- a/ets2panda/linter/scripts/update-test-results.mjs +++ b/ets2panda/linter/scripts/update-test-results.mjs @@ -21,14 +21,12 @@ const TSX_EXT = ".tsx"; const D_TS_EXT = '.d.ts'; class Mode { - static STRICT = 1; - static RELAX = 2; - static AUTOFIX = 3 + static DEFAULT = 1; + static AUTOFIX = 2 } const RESULT_EXT = []; -RESULT_EXT[Mode.STRICT] = '.strict.json'; -RESULT_EXT[Mode.RELAX] = '.relax.json'; +RESULT_EXT[Mode.DEFAULT] = '.json'; RESULT_EXT[Mode.AUTOFIX] = '.autofix.json'; const AUTOFIX_SKIP_EXT = '.autofix.skip'; const DIFF_EXT = '.diff'; @@ -114,10 +112,9 @@ for (let testDir of testDirs) { if (!testFiles) continue; - // Update result for each test for Strict and Relax modes: + // Update result for each test for Default and Autofix modes: for (let testFile of testFiles) { - updateTest(testDir, testFile, Mode.RELAX); - updateTest(testDir, testFile, Mode.STRICT); + updateTest(testDir, testFile, Mode.DEFAULT); updateTest(testDir, testFile, Mode.AUTOFIX); } } \ No newline at end of file diff --git a/ets2panda/linter/src/CommandLineParser.ts b/ets2panda/linter/src/CommandLineParser.ts index c51dd6cc8a..56e3a8ff26 100644 --- a/ets2panda/linter/src/CommandLineParser.ts +++ b/ets2panda/linter/src/CommandLineParser.ts @@ -62,15 +62,8 @@ function addProjectFolder(projectFolder: string, previous: string[]): string[] { } function formCommandLineOptions(program: Command): CommandLineOptions { - const opts: CommandLineOptions = { inputFiles: [], warningsAsErrors: false }; - // Default mode of the linter. - opts.strictMode = true; - opts.inputFiles = inputFiles; - + const opts: CommandLineOptions = { inputFiles: inputFiles, warningsAsErrors: false }; const options = program.opts(); - if (options.relax) { - opts.strictMode = false; - } if (options.TSC_Errors) { opts.logTscErrors = true; } @@ -101,7 +94,6 @@ export function parseCommandLine(commandLineArgs: string[]): CommandLineOptions version('0.0.1'); program. option('-E, --TSC_Errors', 'show error messages from Tsc'). - option('--relax', 'relax mode On'). option('--test-mode', 'run linter as if running TS test files'). option('--deveco-plugin-mode', 'run as IDE plugin'). option('-p, --project ', 'path to TS project config file'). diff --git a/ets2panda/linter/src/TestRunner.ts b/ets2panda/linter/src/TestRunner.ts index dcec13bc86..e6469e1532 100644 --- a/ets2panda/linter/src/TestRunner.ts +++ b/ets2panda/linter/src/TestRunner.ts @@ -41,14 +41,12 @@ interface TestNodeInfo { } enum Mode { - STRICT, - RELAX, + DEFAULT, AUTOFIX } const RESULT_EXT: string[] = []; -RESULT_EXT[Mode.STRICT] = '.strict.json'; -RESULT_EXT[Mode.RELAX] = '.relax.json'; +RESULT_EXT[Mode.DEFAULT] = '.json'; RESULT_EXT[Mode.AUTOFIX] = '.autofix.json'; const AUTOFIX_CONFIG_EXT = '.autofix.cfg.json'; const AUTOFIX_SKIP_EXT = '.autofix.skip'; @@ -79,9 +77,9 @@ function runTests(testDirs: string[]): number { ); }); Logger.info(`\nProcessing "${testDir}" directory:\n`); - // Run each test in Strict, Autofix, and Relax mode: + // Run each test in Default and Autofix mode: for (const testFile of testFiles) { - if (runTest(testDir, testFile, Mode.STRICT)) { + if (runTest(testDir, testFile, Mode.DEFAULT)) { failed++; hasComparisonFailures = true; } else { @@ -93,12 +91,6 @@ function runTests(testDirs: string[]): number { } else { passed++; } - if (runTest(testDir, testFile, Mode.RELAX)) { - failed++; - hasComparisonFailures = true; - } else { - passed++; - } } } Logger.info(`\nSUMMARY: ${passed + failed} total, ${passed} passed or skipped, ${failed} failed.`); @@ -119,9 +111,7 @@ function parseArgs(testDir: string, testFile: string, mode: Mode): CommandLineOp } } - if (mode === Mode.RELAX) { - args.push('--relax'); - } else if (mode === Mode.AUTOFIX) { + if (mode === Mode.AUTOFIX) { args.push('--autofix'); const autofixCfg = path.join(testDir, testFile + AUTOFIX_CONFIG_EXT); if (fs.existsSync(autofixCfg)) { diff --git a/ets2panda/linter/test/UMD_module.ts.relax.json b/ets2panda/linter/test/UMD_module.ts.json old mode 100755 new mode 100644 similarity index 93% rename from ets2panda/linter/test/UMD_module.ts.relax.json rename to ets2panda/linter/test/UMD_module.ts.json index 01ab4a223c..f8f2a83c9b --- a/ets2panda/linter/test/UMD_module.ts.relax.json +++ b/ets2panda/linter/test/UMD_module.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/UMD_module.ts.strict.json b/ets2panda/linter/test/UMD_module.ts.strict.json deleted file mode 100755 index 01ab4a223c..0000000000 --- a/ets2panda/linter/test/UMD_module.ts.strict.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 1, - "problem": "UMDModuleDefinition" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/ambient_module.ts.relax.json b/ets2panda/linter/test/ambient_module.ts.json old mode 100755 new mode 100644 similarity index 100% rename from ets2panda/linter/test/ambient_module.ts.relax.json rename to ets2panda/linter/test/ambient_module.ts.json diff --git a/ets2panda/linter/test/ambient_module.ts.strict.json b/ets2panda/linter/test/ambient_module.ts.strict.json deleted file mode 100755 index 4ea9700f6a..0000000000 --- a/ets2panda/linter/test/ambient_module.ts.strict.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 1, - "problem": "ShorthandAmbientModuleDecl", - "suggest": "", - "rule": "Ambient module declaration is not supported (arkts-no-ambient-decls)" - }, - { - "line": 22, - "column": 3, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)" - }, - { - "line": 20, - "column": 1, - "problem": "ShorthandAmbientModuleDecl", - "suggest": "", - "rule": "Ambient module declaration is not supported (arkts-no-ambient-decls)" - }, - { - "line": 20, - "column": 1, - "problem": "WildcardsInModuleName", - "suggest": "", - "rule": "Wildcards in module names are not supported (arkts-no-module-wildcards)" - }, - { - "line": 27, - "column": 3, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)" - }, - { - "line": 25, - "column": 1, - "problem": "ShorthandAmbientModuleDecl", - "suggest": "", - "rule": "Ambient module declaration is not supported (arkts-no-ambient-decls)" - }, - { - "line": 25, - "column": 1, - "problem": "WildcardsInModuleName", - "suggest": "", - "rule": "Wildcards in module names are not supported (arkts-no-module-wildcards)" - }, - { - "line": 26, - "column": 16, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 30, - "column": 1, - "problem": "ShorthandAmbientModuleDecl", - "suggest": "", - "rule": "Ambient module declaration is not supported (arkts-no-ambient-decls)" - }, - { - "line": 30, - "column": 1, - "problem": "WildcardsInModuleName", - "suggest": "", - "rule": "Wildcards in module names are not supported (arkts-no-module-wildcards)" - }, - { - "line": 32, - "column": 1, - "problem": "ShorthandAmbientModuleDecl", - "suggest": "", - "rule": "Ambient module declaration is not supported (arkts-no-ambient-decls)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/arkui_decorators.ts.relax.json b/ets2panda/linter/test/arkui_decorators.ts.json similarity index 100% rename from ets2panda/linter/test/arkui_decorators.ts.relax.json rename to ets2panda/linter/test/arkui_decorators.ts.json diff --git a/ets2panda/linter/test/arkui_decorators.ts.strict.json b/ets2panda/linter/test/arkui_decorators.ts.strict.json deleted file mode 100644 index 7e6c5f32c9..0000000000 --- a/ets2panda/linter/test/arkui_decorators.ts.strict.json +++ /dev/null @@ -1,193 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 31, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 16, - "column": 49, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 18, - "column": 30, - "problem": "IntersectionType", - "suggest": "", - "rule": "Use inheritance instead of intersection types (arkts-no-intersection-types)" - }, - { - "line": 22, - "column": 33, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 22, - "column": 36, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 24, - "column": 44, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 24, - "column": 47, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 29, - "column": 32, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 29, - "column": 35, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 37, - "column": 34, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 37, - "column": 37, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 39, - "column": 40, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 39, - "column": 43, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 40, - "column": 63, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 40, - "column": 66, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 43, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'name' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'name' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 44, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'age' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'age' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 61, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'localStorage' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'localStorage' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 71, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'provide' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'provide' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 74, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'state' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'state' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 78, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'storage' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'storage' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 81, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'style' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'style' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 84, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'watch' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'watch' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 94, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'invalid' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'invalid' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 106, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'data' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'data' has no initializer and is not definitely assigned in the constructor." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/array_literal_spread.ts.relax.json b/ets2panda/linter/test/array_literal_spread.ts.json similarity index 100% rename from ets2panda/linter/test/array_literal_spread.ts.relax.json rename to ets2panda/linter/test/array_literal_spread.ts.json diff --git a/ets2panda/linter/test/array_literals.ts.strict.json b/ets2panda/linter/test/array_literals.ts.json similarity index 98% rename from ets2panda/linter/test/array_literals.ts.strict.json rename to ets2panda/linter/test/array_literals.ts.json index 77cde08220..7d566de7bd 100644 --- a/ets2panda/linter/test/array_literals.ts.strict.json +++ b/ets2panda/linter/test/array_literals.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/array_literals.ts.relax.json b/ets2panda/linter/test/array_literals.ts.relax.json deleted file mode 100644 index ca829d8e77..0000000000 --- a/ets2panda/linter/test/array_literals.ts.relax.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 6, - "problem": "AnyType" - }, - { - "line": 18, - "column": 6, - "problem": "AnyType" - }, - { - "line": 25, - "column": 12, - "problem": "AnyType" - }, - { - "line": 26, - "column": 12, - "problem": "AnyType" - }, - { - "line": 43, - "column": 8, - "problem": "AnyType" - }, - { - "line": 44, - "column": 8, - "problem": "AnyType" - }, - { - "line": 72, - "column": 18, - "problem": "AnyType" - }, - { - "line": 75, - "column": 18, - "problem": "AnyType" - }, - { - "line": 97, - "column": 18, - "problem": "AnyType" - }, - { - "line": 100, - "column": 18, - "problem": "AnyType" - }, - { - "line": 126, - "column": 11, - "problem": "ArrayLiteralNoContextType" - }, - { - "line": 126, - "column": 13, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 126, - "column": 30, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 18, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 19, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 20, - "column": 3, - "problem": "StrictDiagnostic" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/assign_to_method.ts.relax.json b/ets2panda/linter/test/assign_to_method.ts.json similarity index 95% rename from ets2panda/linter/test/assign_to_method.ts.relax.json rename to ets2panda/linter/test/assign_to_method.ts.json index e316167a30..fc8d5a3b14 100644 --- a/ets2panda/linter/test/assign_to_method.ts.relax.json +++ b/ets2panda/linter/test/assign_to_method.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/assign_to_method.ts.strict.json b/ets2panda/linter/test/assign_to_method.ts.strict.json deleted file mode 100644 index e316167a30..0000000000 --- a/ets2panda/linter/test/assign_to_method.ts.strict.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 26, - "column": 1, - "problem": "MethodReassignment", - "suggest": "", - "rule": "Reassigning object methods is not supported (arkts-no-method-reassignment)" - }, - { - "line": 27, - "column": 1, - "problem": "MethodReassignment", - "suggest": "", - "rule": "Reassigning object methods is not supported (arkts-no-method-reassignment)" - }, - { - "line": 34, - "column": 5, - "problem": "MethodReassignment", - "suggest": "", - "rule": "Reassigning object methods is not supported (arkts-no-method-reassignment)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/binary_wrong_types.ts.relax.json b/ets2panda/linter/test/binary_wrong_types.ts.json similarity index 96% rename from ets2panda/linter/test/binary_wrong_types.ts.relax.json rename to ets2panda/linter/test/binary_wrong_types.ts.json index 30ed120e91..66624ba5ad 100644 --- a/ets2panda/linter/test/binary_wrong_types.ts.relax.json +++ b/ets2panda/linter/test/binary_wrong_types.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -50,4 +50,4 @@ "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" } ] -} +} \ No newline at end of file diff --git a/ets2panda/linter/test/binary_wrong_types.ts.strict.json b/ets2panda/linter/test/binary_wrong_types.ts.strict.json deleted file mode 100644 index 30ed120e91..0000000000 --- a/ets2panda/linter/test/binary_wrong_types.ts.strict.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 28, - "column": 12, - "problem": "UnaryArithmNotNumber", - "suggest": "", - "rule": "Unary operators \"+\", \"-\" and \"~\" work only on numbers (arkts-no-polymorphic-unops)" - }, - { - "line": 39, - "column": 15, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 45, - "column": 7, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 46, - "column": 7, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 95, - "column": 15, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - } - ] -} diff --git a/ets2panda/linter/test/catch_clause.ts.autofix.json b/ets2panda/linter/test/catch_clause.ts.autofix.json index 53819a024f..024250d2a6 100755 --- a/ets2panda/linter/test/catch_clause.ts.autofix.json +++ b/ets2panda/linter/test/catch_clause.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/catch_clause.ts.strict.json b/ets2panda/linter/test/catch_clause.ts.json similarity index 97% rename from ets2panda/linter/test/catch_clause.ts.strict.json rename to ets2panda/linter/test/catch_clause.ts.json index 7a9cf239b8..305324e852 100644 --- a/ets2panda/linter/test/catch_clause.ts.strict.json +++ b/ets2panda/linter/test/catch_clause.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/catch_clause.ts.relax.json b/ets2panda/linter/test/catch_clause.ts.relax.json deleted file mode 100644 index 2369efdbce..0000000000 --- a/ets2panda/linter/test/catch_clause.ts.relax.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 18, - "column": 13, - "problem": "AnyType" - }, - { - "line": 24, - "column": 13, - "problem": "UnknownType" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/dynamic_object_literals.ts.strict.json b/ets2panda/linter/test/classA.ts.json similarity index 92% rename from ets2panda/linter/test/dynamic_object_literals.ts.strict.json rename to ets2panda/linter/test/classA.ts.json index e7d2d6779b..ad85bf6b84 100644 --- a/ets2panda/linter/test/dynamic_object_literals.ts.strict.json +++ b/ets2panda/linter/test/classA.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/classA.ts.relax.json b/ets2panda/linter/test/classA.ts.relax.json deleted file mode 100644 index 92d4052d12..0000000000 --- a/ets2panda/linter/test/classA.ts.relax.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - - ] -} diff --git a/ets2panda/linter/test/classA.ts.strict.json b/ets2panda/linter/test/classA.ts.strict.json deleted file mode 100644 index 92d4052d12..0000000000 --- a/ets2panda/linter/test/classA.ts.strict.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - - ] -} diff --git a/ets2panda/linter/test_rules/rule93.ts.strict.json b/ets2panda/linter/test/classB.ts.json similarity index 89% rename from ets2panda/linter/test_rules/rule93.ts.strict.json rename to ets2panda/linter/test/classB.ts.json index 160f413784..5a4a2306bb 100644 --- a/ets2panda/linter/test_rules/rule93.ts.strict.json +++ b/ets2panda/linter/test/classB.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -15,8 +15,8 @@ ], "nodes": [ { - "line": 17, - "column": 5, + "line": 25, + "column": 16, "problem": "FunctionContainsThis", "suggest": "", "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" diff --git a/ets2panda/linter/test/classB.ts.relax.json b/ets2panda/linter/test/classB.ts.relax.json deleted file mode 100644 index dc2b9ced44..0000000000 --- a/ets2panda/linter/test/classB.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 25, - "column": 16, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - } - ] -} diff --git a/ets2panda/linter/test/classB.ts.strict.json b/ets2panda/linter/test/classB.ts.strict.json deleted file mode 100644 index dc2b9ced44..0000000000 --- a/ets2panda/linter/test/classB.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 25, - "column": 16, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - } - ] -} diff --git a/ets2panda/linter/test/class_as_object.ts.relax.json b/ets2panda/linter/test/class_as_object.ts.json similarity index 98% rename from ets2panda/linter/test/class_as_object.ts.relax.json rename to ets2panda/linter/test/class_as_object.ts.json index ebe30080e0..2c6378c2ef 100644 --- a/ets2panda/linter/test/class_as_object.ts.relax.json +++ b/ets2panda/linter/test/class_as_object.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/class_as_object.ts.strict.json b/ets2panda/linter/test/class_as_object.ts.strict.json deleted file mode 100644 index ebe30080e0..0000000000 --- a/ets2panda/linter/test/class_as_object.ts.strict.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "http://www.apache.org/licenses/LICENSE-2.0", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 27, - "column": 9, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 28, - "column": 5, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 29, - "column": 11, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 30, - "column": 7, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 38, - "column": 20, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 39, - "column": 6, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 42, - "column": 12, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 45, - "column": 20, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 46, - "column": 8, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 49, - "column": 14, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 58, - "column": 22, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 60, - "column": 7, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 87, - "column": 39, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 91, - "column": 12, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 96, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 98, - "column": 8, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 116, - "column": 42, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/class_static_block.ts.strict.json b/ets2panda/linter/test/class_static_block.ts.json similarity index 92% rename from ets2panda/linter/test/class_static_block.ts.strict.json rename to ets2panda/linter/test/class_static_block.ts.json index 224c7261ab..c83680e5b0 100644 --- a/ets2panda/linter/test/class_static_block.ts.strict.json +++ b/ets2panda/linter/test/class_static_block.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/class_static_block.ts.relax.json b/ets2panda/linter/test/class_static_block.ts.relax.json deleted file mode 100644 index 224c7261ab..0000000000 --- a/ets2panda/linter/test/class_static_block.ts.relax.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "http://www.apache.org/licenses/LICENSE-2.0", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 23, - "column": 3, - "problem": "MultipleStaticBlocks" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule3.ts.autofix.skip b/ets2panda/linter/test/conditional_types.ts.autofix.skip similarity index 90% rename from ets2panda/linter/test_rules/rule3.ts.autofix.skip rename to ets2panda/linter/test/conditional_types.ts.autofix.skip index 13982e9c91..ebd4f995a2 100644 --- a/ets2panda/linter/test_rules/rule3.ts.autofix.skip +++ b/ets2panda/linter/test/conditional_types.ts.autofix.skip @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,4 +11,4 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + */ \ No newline at end of file diff --git a/ets2panda/linter/test/conditional_types.ts.strict.json b/ets2panda/linter/test/conditional_types.ts.json similarity index 97% rename from ets2panda/linter/test/conditional_types.ts.strict.json rename to ets2panda/linter/test/conditional_types.ts.json index 9607e2b3e1..86ae97325f 100644 --- a/ets2panda/linter/test/conditional_types.ts.strict.json +++ b/ets2panda/linter/test/conditional_types.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/conditional_types.ts.relax.json b/ets2panda/linter/test/conditional_types.ts.relax.json deleted file mode 100644 index 849cd5a27b..0000000000 --- a/ets2panda/linter/test/conditional_types.ts.relax.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 19, - "column": 1, - "problem": "InterfaceMerging" - }, - { - "line": 22, - "column": 17, - "problem": "ConditionalType" - }, - { - "line": 23, - "column": 17, - "problem": "ConditionalType" - }, - { - "line": 31, - "column": 44, - "problem": "ConditionalType" - }, - { - "line": 41, - "column": 21, - "problem": "ConditionalType" - }, - { - "line": 41, - "column": 31, - "problem": "ObjectTypeLiteral" - }, - { - "line": 41, - "column": 42, - "problem": "UnknownType" - }, - { - "line": 41, - "column": 54, - "problem": "IndexedAccessType" - }, - { - "line": 45, - "column": 1, - "problem": "InterfaceMerging" - }, - { - "line": 51, - "column": 19, - "problem": "ConditionalType" - }, - { - "line": 51, - "column": 29, - "problem": "AnyType" - }, - { - "line": 51, - "column": 37, - "problem": "IndexedAccessType" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/const_assertion.ts.relax.json b/ets2panda/linter/test/const_assertion.ts.json old mode 100755 new mode 100644 similarity index 96% rename from ets2panda/linter/test/const_assertion.ts.relax.json rename to ets2panda/linter/test/const_assertion.ts.json index d38b74f0a2..cf6cab5c8c --- a/ets2panda/linter/test/const_assertion.ts.relax.json +++ b/ets2panda/linter/test/const_assertion.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/const_assertion.ts.strict.json b/ets2panda/linter/test/const_assertion.ts.strict.json deleted file mode 100755 index d38b74f0a2..0000000000 --- a/ets2panda/linter/test/const_assertion.ts.strict.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 19, - "problem": "ConstAssertion", - "suggest": "", - "rule": "\"as const\" assertions are not supported (arkts-no-as-const)" - }, - { - "line": 17, - "column": 20, - "problem": "ConstAssertion", - "suggest": "", - "rule": "\"as const\" assertions are not supported (arkts-no-as-const)" - }, - { - "line": 19, - "column": 27, - "problem": "ConstAssertion", - "suggest": "", - "rule": "\"as const\" assertions are not supported (arkts-no-as-const)" - }, - { - "line": 20, - "column": 28, - "problem": "ConstAssertion", - "suggest": "", - "rule": "\"as const\" assertions are not supported (arkts-no-as-const)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/constructor_types.ts.strict.json b/ets2panda/linter/test/constructor_types.ts.json similarity index 97% rename from ets2panda/linter/test/constructor_types.ts.strict.json rename to ets2panda/linter/test/constructor_types.ts.json index 94a926f9c3..0d4914b34f 100644 --- a/ets2panda/linter/test/constructor_types.ts.strict.json +++ b/ets2panda/linter/test/constructor_types.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -90,4 +90,4 @@ "problem": "ClassAsObject" } ] -} +} \ No newline at end of file diff --git a/ets2panda/linter/test/constructor_types.ts.relax.json b/ets2panda/linter/test/constructor_types.ts.relax.json deleted file mode 100644 index 73924c66b8..0000000000 --- a/ets2panda/linter/test/constructor_types.ts.relax.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 45, - "column": 27, - "problem": "ConstructorFuncs" - }, - { - "line": 55, - "column": 31, - "problem": "ClassAsObject" - }, - { - "line": 56, - "column": 30, - "problem": "ClassAsObject" - }, - { - "line": 61, - "column": 11, - "problem": "ConstructorFuncs" - }, - { - "line": 68, - "column": 31, - "problem": "ClassAsObject" - }, - { - "line": 69, - "column": 30, - "problem": "ClassAsObject" - }, - { - "line": 73, - "column": 3, - "problem": "ConstructorIface" - }, - { - "line": 82, - "column": 24, - "problem": "ObjectTypeLiteral" - }, - { - "line": 83, - "column": 3, - "problem": "ConstructorType" - }, - { - "line": 94, - "column": 19, - "problem": "ConstructorFuncs" - }, - { - "line": 100, - "column": 9, - "problem": "ConstructorFuncs" - }, - { - "line": 107, - "column": 31, - "problem": "ClassAsObject" - }, - { - "line": 108, - "column": 31, - "problem": "ClassAsObject" - } - ] -} diff --git a/ets2panda/linter/test/d_ts.ts.autofix.json b/ets2panda/linter/test/d_ts.ts.autofix.json deleted file mode 100644 index 834217ed96..0000000000 --- a/ets2panda/linter/test/d_ts.ts.autofix.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 53, - "column": 3, - "problem": "IndexMember", - "autofixable": false, - "suggest": "", - "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" - }, - { - "line": 55, - "column": 22, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 59, - "column": 1, - "problem": "PropertyAccessByIndex", - "autofixable": true, - "suggest": "", - "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" - }, - { - "line": 60, - "column": 1, - "problem": "PropertyAccessByIndex", - "autofixable": true, - "suggest": "", - "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" - }, - { - "line": 82, - "column": 19, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/iife.ts.autofix.skip b/ets2panda/linter/test/d_ts.ts.autofix.skip similarity index 90% rename from ets2panda/linter/test/iife.ts.autofix.skip rename to ets2panda/linter/test/d_ts.ts.autofix.skip index 13982e9c91..64ca30f56b 100644 --- a/ets2panda/linter/test/iife.ts.autofix.skip +++ b/ets2panda/linter/test/d_ts.ts.autofix.skip @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,4 +11,4 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + */ \ No newline at end of file diff --git a/ets2panda/linter/test/d_ts.ts.strict.json b/ets2panda/linter/test/d_ts.ts.json similarity index 97% rename from ets2panda/linter/test/d_ts.ts.strict.json rename to ets2panda/linter/test/d_ts.ts.json index 136a9c5a37..2be10b5e9c 100644 --- a/ets2panda/linter/test/d_ts.ts.strict.json +++ b/ets2panda/linter/test/d_ts.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/d_ts.ts.relax.json b/ets2panda/linter/test/d_ts.ts.relax.json deleted file mode 100644 index 02da8775b6..0000000000 --- a/ets2panda/linter/test/d_ts.ts.relax.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 53, - "column": 3, - "problem": "IndexMember", - "suggest": "", - "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" - }, - { - "line": 55, - "column": 22, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 82, - "column": 19, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/default_imports.ts.autofix.json b/ets2panda/linter/test/default_imports.ts.autofix.json index b083d587f1..a27317b20e 100755 --- a/ets2panda/linter/test/default_imports.ts.autofix.json +++ b/ets2panda/linter/test/default_imports.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/default_imports.ts.strict.json b/ets2panda/linter/test/default_imports.ts.json old mode 100755 new mode 100644 similarity index 95% rename from ets2panda/linter/test/default_imports.ts.strict.json rename to ets2panda/linter/test/default_imports.ts.json index ffea8cd37a..95dcd9cd64 --- a/ets2panda/linter/test/default_imports.ts.strict.json +++ b/ets2panda/linter/test/default_imports.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/definite_assignment.ts.strict.json b/ets2panda/linter/test/definite_assignment.ts.json similarity index 93% rename from ets2panda/linter/test/definite_assignment.ts.strict.json rename to ets2panda/linter/test/definite_assignment.ts.json index 6c3d89f235..049e5f2163 100644 --- a/ets2panda/linter/test/definite_assignment.ts.strict.json +++ b/ets2panda/linter/test/definite_assignment.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/definite_assignment.ts.relax.json b/ets2panda/linter/test/definite_assignment.ts.relax.json deleted file mode 100644 index 6c3d89f235..0000000000 --- a/ets2panda/linter/test/definite_assignment.ts.relax.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 5, - "problem": "DefiniteAssignment" - }, - { - "line": 33, - "column": 3, - "problem": "DefiniteAssignment" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/delete_operator.ts.strict.json b/ets2panda/linter/test/delete_operator.ts.json similarity index 97% rename from ets2panda/linter/test/delete_operator.ts.strict.json rename to ets2panda/linter/test/delete_operator.ts.json index 2addafd48c..d79beedf5b 100644 --- a/ets2panda/linter/test/delete_operator.ts.strict.json +++ b/ets2panda/linter/test/delete_operator.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/delete_operator.ts.relax.json b/ets2panda/linter/test/delete_operator.ts.relax.json deleted file mode 100644 index 2addafd48c..0000000000 --- a/ets2panda/linter/test/delete_operator.ts.relax.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 11, - "problem": "ObjectTypeLiteral" - }, - { - "line": 17, - "column": 10, - "problem": "AnyType" - }, - { - "line": 20, - "column": 23, - "problem": "DeleteOperator" - }, - { - "line": 22, - "column": 11, - "problem": "ObjectTypeLiteral" - }, - { - "line": 23, - "column": 10, - "problem": "UnknownType" - }, - { - "line": 26, - "column": 23, - "problem": "DeleteOperator" - }, - { - "line": 28, - "column": 11, - "problem": "ObjectTypeLiteral" - }, - { - "line": 32, - "column": 23, - "problem": "DeleteOperator" - }, - { - "line": 34, - "column": 11, - "problem": "ObjectTypeLiteral" - }, - { - "line": 38, - "column": 23, - "problem": "DeleteOperator" - }, - { - "line": 40, - "column": 11, - "problem": "ObjectTypeLiteral" - }, - { - "line": 44, - "column": 23, - "problem": "DeleteOperator" - }, - { - "line": 44, - "column": 30, - "problem": "StrictDiagnostic" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/destructuring.ts.strict.json b/ets2panda/linter/test/destructuring.ts.json similarity index 99% rename from ets2panda/linter/test/destructuring.ts.strict.json rename to ets2panda/linter/test/destructuring.ts.json index 5eb42e1431..3affbb5e59 100644 --- a/ets2panda/linter/test/destructuring.ts.strict.json +++ b/ets2panda/linter/test/destructuring.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/destructuring.ts.relax.json b/ets2panda/linter/test/destructuring.ts.relax.json deleted file mode 100644 index 996437714e..0000000000 --- a/ets2panda/linter/test/destructuring.ts.relax.json +++ /dev/null @@ -1,168 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 21, - "problem": "DestructuringParameter" - }, - { - "line": 20, - "column": 12, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 22, - "column": 18, - "problem": "DestructuringParameter" - }, - { - "line": 27, - "column": 18, - "problem": "DestructuringParameter" - }, - { - "line": 30, - "column": 6, - "problem": "ObjectTypeLiteral" - }, - { - "line": 34, - "column": 21, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 36, - "column": 18, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 44, - "column": 15, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 48, - "column": 10, - "problem": "SpreadOperator" - }, - { - "line": 55, - "column": 12, - "problem": "ObjectTypeLiteral" - }, - { - "line": 62, - "column": 7, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 62, - "column": 19, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 63, - "column": 31, - "problem": "ArrayLiteralNoContextType" - }, - { - "line": 63, - "column": 43, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 67, - "column": 23, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 70, - "column": 12, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 81, - "column": 18, - "problem": "ObjectTypeLiteral" - }, - { - "line": 81, - "column": 47, - "problem": "ArrayLiteralNoContextType" - }, - { - "line": 82, - "column": 5, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 83, - "column": 5, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 84, - "column": 5, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 109, - "column": 18, - "problem": "ArrayLiteralNoContextType" - }, - { - "line": 110, - "column": 5, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 112, - "column": 15, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 114, - "column": 5, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 116, - "column": 15, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 132, - "column": 13, - "problem": "DestructuringParameter" - }, - { - "line": 136, - "column": 13, - "problem": "DestructuringParameter" - }, - { - "line": 136, - "column": 22, - "problem": "ObjectTypeLiteral" - }, - { - "line": 138, - "column": 4, - "problem": "ObjectLiteralNoContextType" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/dynamic_import.ts.strict.json b/ets2panda/linter/test/dynamic_import.ts.json old mode 100755 new mode 100644 similarity index 95% rename from ets2panda/linter/test/dynamic_import.ts.strict.json rename to ets2panda/linter/test/dynamic_import.ts.json index e361de54ca..d3220a568e --- a/ets2panda/linter/test/dynamic_import.ts.strict.json +++ b/ets2panda/linter/test/dynamic_import.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/dynamic_object_literals.ts b/ets2panda/linter/test/dynamic_object_literals.ts index dc4de64dff..3c6220218d 100644 --- a/ets2panda/linter/test/dynamic_object_literals.ts +++ b/ets2panda/linter/test/dynamic_object_literals.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/linter/test/iface2.ts.relax.json b/ets2panda/linter/test/dynamic_object_literals.ts.json similarity index 92% rename from ets2panda/linter/test/iface2.ts.relax.json rename to ets2panda/linter/test/dynamic_object_literals.ts.json index b06227021f..ad85bf6b84 100644 --- a/ets2panda/linter/test/iface2.ts.relax.json +++ b/ets2panda/linter/test/dynamic_object_literals.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/enum_indexing.ts.relax.json b/ets2panda/linter/test/enum_indexing.ts.json similarity index 93% rename from ets2panda/linter/test/enum_indexing.ts.relax.json rename to ets2panda/linter/test/enum_indexing.ts.json index 1cb184ed34..eb5a22d9ab 100644 --- a/ets2panda/linter/test/enum_indexing.ts.relax.json +++ b/ets2panda/linter/test/enum_indexing.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/enum_indexing.ts.strict.json b/ets2panda/linter/test/enum_indexing.ts.strict.json deleted file mode 100644 index 1cb184ed34..0000000000 --- a/ets2panda/linter/test/enum_indexing.ts.strict.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 18, - "column": 11, - "problem": "ClassAsObject" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/enum_member_non_constant.ts b/ets2panda/linter/test/enum_member_non_constant.ts index 9666d197b9..4ae90fde17 100644 --- a/ets2panda/linter/test/enum_member_non_constant.ts +++ b/ets2panda/linter/test/enum_member_non_constant.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/linter/test/enum_member_non_constant.ts.relax.json b/ets2panda/linter/test/enum_member_non_constant.ts.json similarity index 95% rename from ets2panda/linter/test/enum_member_non_constant.ts.relax.json rename to ets2panda/linter/test/enum_member_non_constant.ts.json index 1305936dd3..bfe1bdcad2 100644 --- a/ets2panda/linter/test/enum_member_non_constant.ts.relax.json +++ b/ets2panda/linter/test/enum_member_non_constant.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -29,4 +29,4 @@ "rule": "Enumeration members can be initialized only with compile time expressions of the same type (arkts-no-enum-mixed-types)" } ] -} +} \ No newline at end of file diff --git a/ets2panda/linter/test/enum_member_non_constant.ts.strict.json b/ets2panda/linter/test/enum_member_non_constant.ts.strict.json deleted file mode 100644 index 1305936dd3..0000000000 --- a/ets2panda/linter/test/enum_member_non_constant.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 48, - "column": 3, - "problem": "EnumMemberNonConstInit", - "suggest": "", - "rule": "Enumeration members can be initialized only with compile time expressions of the same type (arkts-no-enum-mixed-types)" - }, - { - "line": 52, - "column": 3, - "problem": "EnumMemberNonConstInit", - "suggest": "", - "rule": "Enumeration members can be initialized only with compile time expressions of the same type (arkts-no-enum-mixed-types)" - } - ] -} diff --git a/ets2panda/linter/test/es_object.ts.relax.json b/ets2panda/linter/test/es_object.ts.json similarity index 99% rename from ets2panda/linter/test/es_object.ts.relax.json rename to ets2panda/linter/test/es_object.ts.json index 5bab1a3eee..0dac4afe26 100644 --- a/ets2panda/linter/test/es_object.ts.relax.json +++ b/ets2panda/linter/test/es_object.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/es_object.ts.strict.json b/ets2panda/linter/test/es_object.ts.strict.json deleted file mode 100644 index 86c0f49acf..0000000000 --- a/ets2panda/linter/test/es_object.ts.strict.json +++ /dev/null @@ -1,683 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 17, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 20, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 21, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 22, - "column": 11, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 25, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 26, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 27, - "column": 11, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 29, - "column": 21, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 29, - "column": 35, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 29, - "column": 53, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 35, - "column": 14, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 35, - "column": 28, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 35, - "column": 46, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 35, - "column": 58, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 39, - "column": 14, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 39, - "column": 28, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 39, - "column": 46, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 39, - "column": 58, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 43, - "column": 14, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 43, - "column": 28, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 43, - "column": 46, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 43, - "column": 60, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 48, - "column": 19, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 48, - "column": 33, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 48, - "column": 51, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 48, - "column": 63, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 52, - "column": 19, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 52, - "column": 33, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 52, - "column": 51, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 52, - "column": 63, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 56, - "column": 19, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 56, - "column": 33, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 56, - "column": 51, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 56, - "column": 65, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 60, - "column": 16, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 61, - "column": 12, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 64, - "column": 18, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 64, - "column": 32, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 64, - "column": 50, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 66, - "column": 15, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 67, - "column": 17, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 70, - "column": 13, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 71, - "column": 15, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 77, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 78, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 79, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 80, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 82, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 83, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 85, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 86, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 87, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 88, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 90, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 91, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 93, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 94, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 95, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 96, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 98, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 99, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 103, - "column": 12, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 105, - "column": 11, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 106, - "column": 11, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 108, - "column": 18, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 109, - "column": 18, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 114, - "column": 25, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 115, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 119, - "column": 25, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 119, - "column": 36, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 136, - "column": 25, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 136, - "column": 38, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 148, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 149, - "column": 1, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 154, - "column": 32, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 154, - "column": 45, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 154, - "column": 58, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 162, - "column": 32, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 162, - "column": 47, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 162, - "column": 60, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 170, - "column": 28, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 172, - "column": 22, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 174, - "column": 30, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 176, - "column": 19, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 177, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 178, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 179, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 181, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 182, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 183, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 184, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 185, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 188, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 189, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 190, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/for_stmts.ts.relax.json b/ets2panda/linter/test/for_stmts.ts.json similarity index 97% rename from ets2panda/linter/test/for_stmts.ts.relax.json rename to ets2panda/linter/test/for_stmts.ts.json index 73a294f7d6..3c828969eb 100644 --- a/ets2panda/linter/test/for_stmts.ts.relax.json +++ b/ets2panda/linter/test/for_stmts.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/for_stmts.ts.strict.json b/ets2panda/linter/test/for_stmts.ts.strict.json deleted file mode 100644 index 73a294f7d6..0000000000 --- a/ets2panda/linter/test/for_stmts.ts.strict.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 14, - "problem": "ForInStatement", - "suggest": "", - "rule": "\"for .. in\" is not supported (arkts-no-for-in)" - }, - { - "line": 22, - "column": 17, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 49, - "column": 14, - "problem": "ForInStatement", - "suggest": "", - "rule": "\"for .. in\" is not supported (arkts-no-for-in)" - }, - { - "line": 75, - "column": 14, - "problem": "ForInStatement", - "suggest": "", - "rule": "\"for .. in\" is not supported (arkts-no-for-in)" - }, - { - "line": 91, - "column": 14, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 91, - "column": 54, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 99, - "column": 7, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 124, - "column": 12, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/func_inferred_type_args.ts.strict.json b/ets2panda/linter/test/func_inferred_type_args.ts.json similarity index 98% rename from ets2panda/linter/test/func_inferred_type_args.ts.strict.json rename to ets2panda/linter/test/func_inferred_type_args.ts.json index 24341526de..d6eab1b638 100644 --- a/ets2panda/linter/test/func_inferred_type_args.ts.strict.json +++ b/ets2panda/linter/test/func_inferred_type_args.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/func_inferred_type_args.ts.relax.json b/ets2panda/linter/test/func_inferred_type_args.ts.relax.json deleted file mode 100644 index 24341526de..0000000000 --- a/ets2panda/linter/test/func_inferred_type_args.ts.relax.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 26, - "column": 5, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 26, - "column": 9, - "problem": "GenericCallNoTypeArgs", - "suggest": "", - "rule": "Type inference in case of generic function calls is limited (arkts-no-inferred-generic-params)" - }, - { - "line": 28, - "column": 21, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 31, - "column": 1, - "problem": "GenericCallNoTypeArgs", - "suggest": "", - "rule": "Type inference in case of generic function calls is limited (arkts-no-inferred-generic-params)" - }, - { - "line": 38, - "column": 1, - "problem": "GenericCallNoTypeArgs", - "suggest": "", - "rule": "Type inference in case of generic function calls is limited (arkts-no-inferred-generic-params)" - }, - { - "line": 46, - "column": 8, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 47, - "column": 16, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 49, - "column": 8, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 51, - "column": 5, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 51, - "column": 11, - "problem": "GenericCallNoTypeArgs", - "suggest": "", - "rule": "Type inference in case of generic function calls is limited (arkts-no-inferred-generic-params)" - }, - { - "line": 56, - "column": 5, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 56, - "column": 9, - "problem": "GenericCallNoTypeArgs", - "suggest": "", - "rule": "Type inference in case of generic function calls is limited (arkts-no-inferred-generic-params)" - }, - { - "line": 58, - "column": 11, - "problem": "GenericCallNoTypeArgs", - "suggest": "", - "rule": "Type inference in case of generic function calls is limited (arkts-no-inferred-generic-params)" - }, - { - "line": 60, - "column": 19, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 62, - "column": 10, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 69, - "column": 11, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 63, - "column": 1, - "problem": "StrictDiagnostic", - "suggest": "Variable 'd' is used before being assigned.", - "rule": "Variable 'd' is used before being assigned." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/func_return_type.ts.autofix.json b/ets2panda/linter/test/func_return_type.ts.autofix.json index 683c01ee85..a0fc5a5b3f 100644 --- a/ets2panda/linter/test/func_return_type.ts.autofix.json +++ b/ets2panda/linter/test/func_return_type.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/func_return_type.ts.strict.json b/ets2panda/linter/test/func_return_type.ts.json similarity index 99% rename from ets2panda/linter/test/func_return_type.ts.strict.json rename to ets2panda/linter/test/func_return_type.ts.json index 2e0cdf0b69..2383cd253b 100644 --- a/ets2panda/linter/test/func_return_type.ts.strict.json +++ b/ets2panda/linter/test/func_return_type.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/func_return_type.ts.relax.json b/ets2panda/linter/test/func_return_type.ts.relax.json deleted file mode 100644 index 513a0217d5..0000000000 --- a/ets2panda/linter/test/func_return_type.ts.relax.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 57, - "column": 15, - "problem": "AnyType" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/function_expression.ts.autofix.json b/ets2panda/linter/test/function_expression.ts.autofix.json index 8421030d57..59206876f8 100644 --- a/ets2panda/linter/test/function_expression.ts.autofix.json +++ b/ets2panda/linter/test/function_expression.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/function_expression.ts.strict.json b/ets2panda/linter/test/function_expression.ts.json similarity index 99% rename from ets2panda/linter/test/function_expression.ts.strict.json rename to ets2panda/linter/test/function_expression.ts.json index f44592a877..ffee4f7553 100644 --- a/ets2panda/linter/test/function_expression.ts.strict.json +++ b/ets2panda/linter/test/function_expression.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/function_expression.ts.relax.json b/ets2panda/linter/test/function_expression.ts.relax.json deleted file mode 100644 index 565d2ad18d..0000000000 --- a/ets2panda/linter/test/function_expression.ts.relax.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 18, - "column": 39, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 48, - "column": 35, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 52, - "column": 19, - "problem": "GeneratorFunction", - "suggest": "", - "rule": "Generator functions are not supported (arkts-no-generators)" - }, - { - "line": 53, - "column": 3, - "problem": "YieldExpression", - "suggest": "", - "rule": "Generator functions are not supported (arkts-no-generators)" - }, - { - "line": 82, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 102, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 104, - "column": 7, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/function_object_methods.ts.strict.json b/ets2panda/linter/test/function_object_methods.ts.json similarity index 99% rename from ets2panda/linter/test/function_object_methods.ts.strict.json rename to ets2panda/linter/test/function_object_methods.ts.json index 69daf85ea2..667345ccfc 100644 --- a/ets2panda/linter/test/function_object_methods.ts.strict.json +++ b/ets2panda/linter/test/function_object_methods.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/function_object_methods.ts.relax.json b/ets2panda/linter/test/function_object_methods.ts.relax.json deleted file mode 100644 index c9e4d85124..0000000000 --- a/ets2panda/linter/test/function_object_methods.ts.relax.json +++ /dev/null @@ -1,250 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 29, - "column": 5, - "problem": "MethodReassignment", - "suggest": "", - "rule": "Reassigning object methods is not supported (arkts-no-method-reassignment)" - }, - { - "line": 29, - "column": 35, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - }, - { - "line": 30, - "column": 5, - "problem": "MethodReassignment", - "suggest": "", - "rule": "Reassigning object methods is not supported (arkts-no-method-reassignment)" - }, - { - "line": 30, - "column": 45, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - }, - { - "line": 37, - "column": 37, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - }, - { - "line": 38, - "column": 40, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - }, - { - "line": 68, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 68, - "column": 44, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 70, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 70, - "column": 35, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - }, - { - "line": 75, - "column": 48, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - }, - { - "line": 78, - "column": 48, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - }, - { - "line": 81, - "column": 31, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 82, - "column": 31, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 87, - "column": 32, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 94, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 94, - "column": 37, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 96, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 96, - "column": 30, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - }, - { - "line": 101, - "column": 42, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - }, - { - "line": 104, - "column": 42, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - }, - { - "line": 107, - "column": 20, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 108, - "column": 20, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 113, - "column": 21, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 116, - "column": 16, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 119, - "column": 12, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 122, - "column": 12, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 125, - "column": 12, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 128, - "column": 12, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 132, - "column": 17, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 136, - "column": 23, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 137, - "column": 23, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 138, - "column": 23, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 139, - "column": 23, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 141, - "column": 5, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/function_overload.ts.strict.json b/ets2panda/linter/test/function_overload.ts.json similarity index 96% rename from ets2panda/linter/test/function_overload.ts.strict.json rename to ets2panda/linter/test/function_overload.ts.json index 13aacbf8bd..0ecc8c6e9b 100644 --- a/ets2panda/linter/test/function_overload.ts.strict.json +++ b/ets2panda/linter/test/function_overload.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/function_overload.ts.relax.json b/ets2panda/linter/test/function_overload.ts.relax.json deleted file mode 100644 index 37ee072d73..0000000000 --- a/ets2panda/linter/test/function_overload.ts.relax.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 37, - "column": 19, - "problem": "AnyType" - }, - { - "line": 37, - "column": 28, - "problem": "AnyType" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/function_spread_arg.ts.strict.json b/ets2panda/linter/test/function_spread_arg.ts.json similarity index 96% rename from ets2panda/linter/test/function_spread_arg.ts.strict.json rename to ets2panda/linter/test/function_spread_arg.ts.json index 300f6ea4c9..59b30bcd87 100644 --- a/ets2panda/linter/test/function_spread_arg.ts.strict.json +++ b/ets2panda/linter/test/function_spread_arg.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/function_spread_arg.ts.relax.json b/ets2panda/linter/test/function_spread_arg.ts.relax.json deleted file mode 100644 index 300f6ea4c9..0000000000 --- a/ets2panda/linter/test/function_spread_arg.ts.relax.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 14, - "problem": "AnyType" - }, - { - "line": 16, - "column": 17, - "problem": "AnyType" - }, - { - "line": 16, - "column": 20, - "problem": "AnyType" - }, - { - "line": 21, - "column": 5, - "problem": "SpreadOperator" - }, - { - "line": 23, - "column": 14, - "problem": "AnyType" - }, - { - "line": 23, - "column": 17, - "problem": "AnyType" - }, - { - "line": 23, - "column": 20, - "problem": "AnyType" - }, - { - "line": 27, - "column": 12, - "problem": "SpreadOperator" - }, - { - "line": 42, - "column": 5, - "problem": "AnyType" - }, - { - "line": 87, - "column": 11, - "problem": "SpreadOperator" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/functions.ts.autofix.json b/ets2panda/linter/test/functions.ts.autofix.json deleted file mode 100755 index 0b6af45e6e..0000000000 --- a/ets2panda/linter/test/functions.ts.autofix.json +++ /dev/null @@ -1,194 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 20, - "column": 3, - "problem": "LocalFunction", - "autofixable": false, - "suggest": "", - "rule": "Nested functions are not supported (arkts-no-nested-funcs)" - }, - { - "line": 20, - "column": 17, - "problem": "AnyType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 20, - "column": 20, - "problem": "AnyType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 29, - "column": 3, - "problem": "GeneratorFunction", - "autofixable": false, - "suggest": "", - "rule": "Generator functions are not supported (arkts-no-generators)" - }, - { - "line": 33, - "column": 7, - "problem": "YieldExpression", - "autofixable": false, - "suggest": "", - "rule": "Generator functions are not supported (arkts-no-generators)" - }, - { - "line": 53, - "column": 19, - "problem": "AnyType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 55, - "column": 17, - "problem": "AnyType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 58, - "column": 27, - "problem": "AnyType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 60, - "column": 19, - "problem": "LambdaWithTypeParameters", - "autofixable": false, - "suggest": "", - "rule": "Use generic functions instead of generic arrow functions (arkts-no-generic-lambdas)" - }, - { - "line": 64, - "column": 3, - "problem": "FunctionContainsThis", - "autofixable": false, - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 67, - "column": 3, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Property 'c' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'c' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 93, - "column": 7, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 97, - "column": 5, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 101, - "column": 5, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 102, - "column": 12, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 106, - "column": 7, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 107, - "column": 14, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 108, - "column": 16, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 116, - "column": 5, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 118, - "column": 7, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 120, - "column": 11, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 122, - "column": 11, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/parameter_properties.ts.autofix.skip b/ets2panda/linter/test/functions.ts.autofix.skip similarity index 90% rename from ets2panda/linter/test/parameter_properties.ts.autofix.skip rename to ets2panda/linter/test/functions.ts.autofix.skip index 13982e9c91..64ca30f56b 100644 --- a/ets2panda/linter/test/parameter_properties.ts.autofix.skip +++ b/ets2panda/linter/test/functions.ts.autofix.skip @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,4 +11,4 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + */ \ No newline at end of file diff --git a/ets2panda/linter/test/functions.ts.strict.json b/ets2panda/linter/test/functions.ts.json similarity index 99% rename from ets2panda/linter/test/functions.ts.strict.json rename to ets2panda/linter/test/functions.ts.json index d57b74aa35..63595a78f2 100644 --- a/ets2panda/linter/test/functions.ts.strict.json +++ b/ets2panda/linter/test/functions.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/functions.ts.relax.json b/ets2panda/linter/test/functions.ts.relax.json deleted file mode 100644 index 6729c50d23..0000000000 --- a/ets2panda/linter/test/functions.ts.relax.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 20, - "column": 17, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 20, - "column": 20, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 29, - "column": 3, - "problem": "GeneratorFunction", - "suggest": "", - "rule": "Generator functions are not supported (arkts-no-generators)" - }, - { - "line": 33, - "column": 7, - "problem": "YieldExpression", - "suggest": "", - "rule": "Generator functions are not supported (arkts-no-generators)" - }, - { - "line": 53, - "column": 19, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 55, - "column": 17, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 58, - "column": 27, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 64, - "column": 3, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 67, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'c' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'c' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 93, - "column": 7, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 97, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 101, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 102, - "column": 12, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 106, - "column": 7, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 107, - "column": 14, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 108, - "column": 16, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 116, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 118, - "column": 7, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 120, - "column": 11, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 122, - "column": 11, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/generators.ts.strict.json b/ets2panda/linter/test/generators.ts.json similarity index 98% rename from ets2panda/linter/test/generators.ts.strict.json rename to ets2panda/linter/test/generators.ts.json index 1617219889..acc78735df 100644 --- a/ets2panda/linter/test/generators.ts.strict.json +++ b/ets2panda/linter/test/generators.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/generators.ts.relax.json b/ets2panda/linter/test/generators.ts.relax.json deleted file mode 100644 index 35b51a9403..0000000000 --- a/ets2panda/linter/test/generators.ts.relax.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 1, - "problem": "GeneratorFunction" - }, - { - "line": 19, - "column": 5, - "problem": "YieldExpression" - }, - { - "line": 23, - "column": 13, - "problem": "GeneratorFunction" - }, - { - "line": 24, - "column": 3, - "problem": "YieldExpression" - }, - { - "line": 25, - "column": 3, - "problem": "YieldExpression" - }, - { - "line": 26, - "column": 3, - "problem": "YieldExpression" - }, - { - "line": 35, - "column": 3, - "problem": "GeneratorFunction" - }, - { - "line": 39, - "column": 7, - "problem": "YieldExpression" - }, - { - "line": 49, - "column": 1, - "problem": "GeneratorFunction" - }, - { - "line": 50, - "column": 3, - "problem": "YieldExpression" - }, - { - "line": 52, - "column": 1, - "problem": "GeneratorFunction" - }, - { - "line": 53, - "column": 3, - "problem": "YieldExpression" - }, - { - "line": 55, - "column": 7, - "problem": "UnknownType" - }, - { - "line": 58, - "column": 1, - "problem": "GeneratorFunction" - }, - { - "line": 59, - "column": 3, - "problem": "YieldExpression" - }, - { - "line": 60, - "column": 3, - "problem": "YieldExpression" - }, - { - "line": 61, - "column": 3, - "problem": "YieldExpression" - }, - { - "line": 63, - "column": 1, - "problem": "GeneratorFunction" - }, - { - "line": 64, - "column": 3, - "problem": "YieldExpression" - }, - { - "line": 65, - "column": 3, - "problem": "YieldExpression" - }, - { - "line": 66, - "column": 3, - "problem": "YieldExpression" - }, - { - "line": 68, - "column": 7, - "problem": "UnknownType" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/global_this.ts.strict.json b/ets2panda/linter/test/global_this.ts.json old mode 100755 new mode 100644 similarity index 95% rename from ets2panda/linter/test/global_this.ts.strict.json rename to ets2panda/linter/test/global_this.ts.json index 76fe7bbf40..5f6fc92f85 --- a/ets2panda/linter/test/global_this.ts.strict.json +++ b/ets2panda/linter/test/global_this.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/global_this.ts.relax.json b/ets2panda/linter/test/global_this.ts.relax.json deleted file mode 100755 index 76fe7bbf40..0000000000 --- a/ets2panda/linter/test/global_this.ts.relax.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 19, - "column": 7, - "problem": "GlobalThis", - "suggest": "", - "rule": "\"globalThis\" is not supported (arkts-no-globalthis)" - }, - { - "line": 21, - "column": 10, - "problem": "GlobalThis", - "suggest": "", - "rule": "\"globalThis\" is not supported (arkts-no-globalthis)" - }, - { - "line": 24, - "column": 17, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/array_literal_spread.ts.strict.json b/ets2panda/linter/test/iface2.ts.json similarity index 100% rename from ets2panda/linter/test/array_literal_spread.ts.strict.json rename to ets2panda/linter/test/iface2.ts.json diff --git a/ets2panda/linter/test/iface2.ts.strict.json b/ets2panda/linter/test/iface2.ts.strict.json deleted file mode 100644 index b06227021f..0000000000 --- a/ets2panda/linter/test/iface2.ts.strict.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/iife.ts b/ets2panda/linter/test/iife.ts deleted file mode 100644 index fe14cd16fd..0000000000 --- a/ets2panda/linter/test/iife.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(() => { - let a = 5; - let b = 10; - let c = a + b; -})(); - diff --git a/ets2panda/linter/test/iife.ts.relax.json b/ets2panda/linter/test/iife.ts.relax.json deleted file mode 100644 index b06227021f..0000000000 --- a/ets2panda/linter/test/iife.ts.relax.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/iife.ts.strict.json b/ets2panda/linter/test/iife.ts.strict.json deleted file mode 100644 index b06227021f..0000000000 --- a/ets2panda/linter/test/iife.ts.strict.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/implements_class.ts.strict.json b/ets2panda/linter/test/implements_class.ts.json similarity index 92% rename from ets2panda/linter/test/implements_class.ts.strict.json rename to ets2panda/linter/test/implements_class.ts.json index aee8626191..b2718c5d4a 100644 --- a/ets2panda/linter/test/implements_class.ts.strict.json +++ b/ets2panda/linter/test/implements_class.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/implements_class.ts.relax.json b/ets2panda/linter/test/implements_class.ts.relax.json deleted file mode 100644 index aee8626191..0000000000 --- a/ets2panda/linter/test/implements_class.ts.relax.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "http://www.apache.org/licenses/LICENSE-2.0", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 28, - "column": 33, - "problem": "ImplementsClass" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/import_after_statement.ts.strict.json b/ets2panda/linter/test/import_after_statement.ts.json similarity index 94% rename from ets2panda/linter/test/import_after_statement.ts.strict.json rename to ets2panda/linter/test/import_after_statement.ts.json index 2521bd90f3..aa085f4c22 100644 --- a/ets2panda/linter/test/import_after_statement.ts.strict.json +++ b/ets2panda/linter/test/import_after_statement.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/import_after_statement.ts.relax.json b/ets2panda/linter/test/import_after_statement.ts.relax.json deleted file mode 100644 index 2521bd90f3..0000000000 --- a/ets2panda/linter/test/import_after_statement.ts.relax.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 1, - "problem": "ImportAfterStatement" - }, - { - "line": 23, - "column": 1, - "problem": "ImportAfterStatement" - }, - { - "line": 24, - "column": 1, - "problem": "ImportAfterStatement" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/import_assertion.ts.relax.json b/ets2panda/linter/test/import_assertion.ts.json old mode 100755 new mode 100644 similarity index 97% rename from ets2panda/linter/test/import_assertion.ts.relax.json rename to ets2panda/linter/test/import_assertion.ts.json index c7b104909d..d90897f03e --- a/ets2panda/linter/test/import_assertion.ts.relax.json +++ b/ets2panda/linter/test/import_assertion.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/import_assertion.ts.strict.json b/ets2panda/linter/test/import_assertion.ts.strict.json deleted file mode 100755 index c7b104909d..0000000000 --- a/ets2panda/linter/test/import_assertion.ts.strict.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 38, - "problem": "ImportAssertion", - "suggest": "", - "rule": "Import assertions are not supported (arkts-no-import-assertions)" - }, - { - "line": 19, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 19, - "column": 43, - "problem": "ImportAssertion", - "suggest": "", - "rule": "Import assertions are not supported (arkts-no-import-assertions)" - }, - { - "line": 20, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 20, - "column": 49, - "problem": "ImportAssertion", - "suggest": "", - "rule": "Import assertions are not supported (arkts-no-import-assertions)" - }, - { - "line": 22, - "column": 18, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 23, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 23, - "column": 43, - "problem": "ImportAssertion", - "suggest": "", - "rule": "Import assertions are not supported (arkts-no-import-assertions)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/imported_use_as_object.ts.relax.json b/ets2panda/linter/test/imported_use_as_object.ts.json similarity index 97% rename from ets2panda/linter/test/imported_use_as_object.ts.relax.json rename to ets2panda/linter/test/imported_use_as_object.ts.json index 8120a622b6..04b8a44b44 100644 --- a/ets2panda/linter/test/imported_use_as_object.ts.relax.json +++ b/ets2panda/linter/test/imported_use_as_object.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/imported_use_as_object.ts.strict.json b/ets2panda/linter/test/imported_use_as_object.ts.strict.json deleted file mode 100644 index 8120a622b6..0000000000 --- a/ets2panda/linter/test/imported_use_as_object.ts.strict.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 25, - "column": 12, - "problem": "ClassAsObject" - }, - { - "line": 26, - "column": 6, - "problem": "ClassAsObject" - }, - { - "line": 27, - "column": 8, - "problem": "ClassAsObject" - }, - { - "line": 29, - "column": 12, - "problem": "NamespaceAsObject" - }, - { - "line": 30, - "column": 6, - "problem": "NamespaceAsObject" - }, - { - "line": 31, - "column": 8, - "problem": "NamespaceAsObject" - }, - { - "line": 33, - "column": 12, - "problem": "ClassAsObject" - }, - { - "line": 34, - "column": 6, - "problem": "ClassAsObject" - }, - { - "line": 35, - "column": 8, - "problem": "ClassAsObject" - }, - { - "line": 37, - "column": 12, - "problem": "ClassAsObject" - }, - { - "line": 38, - "column": 6, - "problem": "ClassAsObject" - }, - { - "line": 39, - "column": 8, - "problem": "ClassAsObject" - }, - { - "line": 41, - "column": 12, - "problem": "NamespaceAsObject" - }, - { - "line": 42, - "column": 6, - "problem": "NamespaceAsObject" - }, - { - "line": 43, - "column": 8, - "problem": "NamespaceAsObject" - }, - { - "line": 45, - "column": 12, - "problem": "ClassAsObject" - }, - { - "line": 46, - "column": 6, - "problem": "ClassAsObject" - }, - { - "line": 47, - "column": 8, - "problem": "ClassAsObject" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/default_imports.ts.relax.json b/ets2panda/linter/test/imported_use_as_object_module.ts.json old mode 100755 new mode 100644 similarity index 92% rename from ets2panda/linter/test/default_imports.ts.relax.json rename to ets2panda/linter/test/imported_use_as_object_module.ts.json index e7d2d6779b..e8cff6c256 --- a/ets2panda/linter/test/default_imports.ts.relax.json +++ b/ets2panda/linter/test/imported_use_as_object_module.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/imported_use_as_object_module.ts.relax.json b/ets2panda/linter/test/imported_use_as_object_module.ts.relax.json deleted file mode 100644 index 9ef9898408..0000000000 --- a/ets2panda/linter/test/imported_use_as_object_module.ts.relax.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/imported_use_as_object_module.ts.strict.json b/ets2panda/linter/test/imported_use_as_object_module.ts.strict.json deleted file mode 100644 index 9ef9898408..0000000000 --- a/ets2panda/linter/test/imported_use_as_object_module.ts.strict.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/dynamic_object_literals.ts.relax.json b/ets2panda/linter/test/indexed_derived_from_array.ts.json similarity index 92% rename from ets2panda/linter/test/dynamic_object_literals.ts.relax.json rename to ets2panda/linter/test/indexed_derived_from_array.ts.json index e7d2d6779b..ad85bf6b84 100644 --- a/ets2panda/linter/test/dynamic_object_literals.ts.relax.json +++ b/ets2panda/linter/test/indexed_derived_from_array.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/indexed_derived_from_array.ts.relax.json b/ets2panda/linter/test/indexed_derived_from_array.ts.relax.json deleted file mode 100644 index f3fdebc36b..0000000000 --- a/ets2panda/linter/test/indexed_derived_from_array.ts.relax.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} diff --git a/ets2panda/linter/test/indexed_derived_from_array.ts.strict.json b/ets2panda/linter/test/indexed_derived_from_array.ts.strict.json deleted file mode 100644 index f3fdebc36b..0000000000 --- a/ets2panda/linter/test/indexed_derived_from_array.ts.strict.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} diff --git a/ets2panda/linter/test/inferred_type.ts.strict.json b/ets2panda/linter/test/inferred_type.ts.json similarity index 98% rename from ets2panda/linter/test/inferred_type.ts.strict.json rename to ets2panda/linter/test/inferred_type.ts.json index ea64409adc..d318751398 100644 --- a/ets2panda/linter/test/inferred_type.ts.strict.json +++ b/ets2panda/linter/test/inferred_type.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/inferred_type.ts.relax.json b/ets2panda/linter/test/inferred_type.ts.relax.json deleted file mode 100644 index ae15d496c2..0000000000 --- a/ets2panda/linter/test/inferred_type.ts.relax.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 17, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 24, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 25, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 27, - "column": 14, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 28, - "column": 23, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 31, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 32, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 34, - "column": 7, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 34, - "column": 10, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 34, - "column": 13, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 37, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 38, - "column": 20, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 39, - "column": 20, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 42, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/instanceof.ts.strict.json b/ets2panda/linter/test/instanceof.ts.json similarity index 98% rename from ets2panda/linter/test/instanceof.ts.strict.json rename to ets2panda/linter/test/instanceof.ts.json index 4d3277e0d7..165e5da5ed 100644 --- a/ets2panda/linter/test/instanceof.ts.strict.json +++ b/ets2panda/linter/test/instanceof.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/instanceof.ts.relax.json b/ets2panda/linter/test/instanceof.ts.relax.json deleted file mode 100644 index 348b7dd402..0000000000 --- a/ets2panda/linter/test/instanceof.ts.relax.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 13, - "problem": "InstanceofUnsupported", - "suggest": "", - "rule": "\"instanceof\" operator is partially supported (arkts-instanceof-ref-types)" - }, - { - "line": 23, - "column": 13, - "problem": "InstanceofUnsupported", - "suggest": "", - "rule": "\"instanceof\" operator is partially supported (arkts-instanceof-ref-types)" - }, - { - "line": 50, - "column": 14, - "problem": "InstanceofUnsupported", - "suggest": "", - "rule": "\"instanceof\" operator is partially supported (arkts-instanceof-ref-types)" - }, - { - "line": 55, - "column": 32, - "problem": "InstanceofUnsupported", - "suggest": "", - "rule": "\"instanceof\" operator is partially supported (arkts-instanceof-ref-types)" - }, - { - "line": 58, - "column": 39, - "problem": "InstanceofUnsupported", - "suggest": "", - "rule": "\"instanceof\" operator is partially supported (arkts-instanceof-ref-types)" - }, - { - "line": 61, - "column": 26, - "problem": "InstanceofUnsupported", - "suggest": "", - "rule": "\"instanceof\" operator is partially supported (arkts-instanceof-ref-types)" - }, - { - "line": 65, - "column": 23, - "problem": "InstanceofUnsupported", - "suggest": "", - "rule": "\"instanceof\" operator is partially supported (arkts-instanceof-ref-types)" - }, - { - "line": 70, - "column": 26, - "problem": "InstanceofUnsupported", - "suggest": "", - "rule": "\"instanceof\" operator is partially supported (arkts-instanceof-ref-types)" - }, - { - "line": 76, - "column": 29, - "problem": "InstanceofUnsupported", - "suggest": "", - "rule": "\"instanceof\" operator is partially supported (arkts-instanceof-ref-types)" - }, - { - "line": 76, - "column": 19, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/interfaces_props.ts.strict.json b/ets2panda/linter/test/interfaces_props.ts.json similarity index 95% rename from ets2panda/linter/test/interfaces_props.ts.strict.json rename to ets2panda/linter/test/interfaces_props.ts.json index de27e76f22..4daa96036c 100644 --- a/ets2panda/linter/test/interfaces_props.ts.strict.json +++ b/ets2panda/linter/test/interfaces_props.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/interfaces_props.ts.relax.json b/ets2panda/linter/test/interfaces_props.ts.relax.json deleted file mode 100644 index de27e76f22..0000000000 --- a/ets2panda/linter/test/interfaces_props.ts.relax.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 18, - "column": 16, - "problem": "ObjectTypeLiteral" - }, - { - "line": 23, - "column": 16, - "problem": "ObjectTypeLiteral" - }, - { - "line": 26, - "column": 1, - "problem": "IntefaceExtendDifProps" - }, - { - "line": 27, - "column": 16, - "problem": "ObjectTypeLiteral" - }, - { - "line": 42, - "column": 12, - "problem": "ObjectLiteralNoContextType" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/interop_import.ts.relax.json b/ets2panda/linter/test/interop_import.ts.json similarity index 95% rename from ets2panda/linter/test/interop_import.ts.relax.json rename to ets2panda/linter/test/interop_import.ts.json index 636038c4bf..20036d49cc 100644 --- a/ets2panda/linter/test/interop_import.ts.relax.json +++ b/ets2panda/linter/test/interop_import.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -36,4 +36,4 @@ "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" } ] -} +} \ No newline at end of file diff --git a/ets2panda/linter/test/interop_import.ts.strict.json b/ets2panda/linter/test/interop_import.ts.strict.json deleted file mode 100644 index 636038c4bf..0000000000 --- a/ets2panda/linter/test/interop_import.ts.strict.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 29, - "column": 7, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 38, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 41, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} diff --git a/ets2panda/linter/test/interop_imports.ts.json b/ets2panda/linter/test/interop_imports.ts.json new file mode 100644 index 0000000000..ad85bf6b84 --- /dev/null +++ b/ets2panda/linter/test/interop_imports.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test/interop_imports.ts.relax.json b/ets2panda/linter/test/interop_imports.ts.relax.json deleted file mode 100644 index 18ac144f5d..0000000000 --- a/ets2panda/linter/test/interop_imports.ts.relax.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/interop_imports.ts.strict.json b/ets2panda/linter/test/interop_imports.ts.strict.json deleted file mode 100644 index 18ac144f5d..0000000000 --- a/ets2panda/linter/test/interop_imports.ts.strict.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/jsx.tsx.strict.json b/ets2panda/linter/test/jsx.tsx.json similarity index 96% rename from ets2panda/linter/test/jsx.tsx.strict.json rename to ets2panda/linter/test/jsx.tsx.json index c8561e293d..edc9ec7508 100644 --- a/ets2panda/linter/test/jsx.tsx.strict.json +++ b/ets2panda/linter/test/jsx.tsx.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/jsx.tsx.relax.json b/ets2panda/linter/test/jsx.tsx.relax.json deleted file mode 100644 index 835896f99d..0000000000 --- a/ets2panda/linter/test/jsx.tsx.relax.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 33, - "problem": "JsxElement" - }, - { - "line": 19, - "column": 27, - "problem": "JsxElement" - }, - { - "line": 21, - "column": 7, - "problem": "AnyType" - }, - { - "line": 22, - "column": 5, - "problem": "JsxElement" - }, - { - "line": 23, - "column": 38, - "problem": "JsxElement" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/limited_stdlib_api.ts.autofix.json b/ets2panda/linter/test/limited_stdlib_api.ts.autofix.json deleted file mode 100644 index 08f902699b..0000000000 --- a/ets2panda/linter/test/limited_stdlib_api.ts.autofix.json +++ /dev/null @@ -1,530 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 1, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 31, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 32, - "column": 1, - "problem": "GlobalThis", - "autofixable": false, - "suggest": "", - "rule": "\"globalThis\" is not supported (arkts-no-globalthis)" - }, - { - "line": 32, - "column": 12, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 56, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 57, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 58, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 58, - "column": 31, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 59, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 61, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 62, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 63, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 64, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 65, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 66, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 67, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 68, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 69, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 70, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 71, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 72, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 73, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 74, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 75, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 76, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 85, - "column": 9, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 86, - "column": 9, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 86, - "column": 32, - "problem": "ClassAsObject", - "autofixable": false, - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 87, - "column": 9, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 87, - "column": 32, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 88, - "column": 9, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 90, - "column": 9, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 91, - "column": 9, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 92, - "column": 9, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 93, - "column": 9, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 94, - "column": 9, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 104, - "column": 32, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 105, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 105, - "column": 28, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 106, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 106, - "column": 32, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 107, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 107, - "column": 37, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 107, - "column": 63, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 108, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 108, - "column": 37, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 109, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 109, - "column": 26, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 110, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 110, - "column": 47, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 111, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 111, - "column": 37, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 112, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 112, - "column": 26, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 113, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 113, - "column": 35, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 114, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 114, - "column": 30, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 115, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 115, - "column": 40, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 116, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 116, - "column": 26, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 117, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 117, - "column": 37, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - } - ] -} diff --git a/ets2panda/linter/test_rules/rule25.ts.autofix.skip b/ets2panda/linter/test/limited_stdlib_api.ts.autofix.skip similarity index 90% rename from ets2panda/linter/test_rules/rule25.ts.autofix.skip rename to ets2panda/linter/test/limited_stdlib_api.ts.autofix.skip index 13982e9c91..64ca30f56b 100644 --- a/ets2panda/linter/test_rules/rule25.ts.autofix.skip +++ b/ets2panda/linter/test/limited_stdlib_api.ts.autofix.skip @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,4 +11,4 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + */ \ No newline at end of file diff --git a/ets2panda/linter/test/limited_stdlib_api.ts.strict.json b/ets2panda/linter/test/limited_stdlib_api.ts.json similarity index 99% rename from ets2panda/linter/test/limited_stdlib_api.ts.strict.json rename to ets2panda/linter/test/limited_stdlib_api.ts.json index 55e798673c..1c9d6a1dc8 100644 --- a/ets2panda/linter/test/limited_stdlib_api.ts.strict.json +++ b/ets2panda/linter/test/limited_stdlib_api.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -463,4 +463,4 @@ "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" } ] -} +} \ No newline at end of file diff --git a/ets2panda/linter/test/limited_stdlib_api.ts.relax.json b/ets2panda/linter/test/limited_stdlib_api.ts.relax.json deleted file mode 100644 index 55e798673c..0000000000 --- a/ets2panda/linter/test/limited_stdlib_api.ts.relax.json +++ /dev/null @@ -1,466 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 1, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 31, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 32, - "column": 1, - "problem": "GlobalThis", - "suggest": "", - "rule": "\"globalThis\" is not supported (arkts-no-globalthis)" - }, - { - "line": 32, - "column": 12, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 56, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 57, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 58, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 58, - "column": 31, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 59, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 61, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 62, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 63, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 64, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 65, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 66, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 67, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 68, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 69, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 70, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 71, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 72, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 73, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 74, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 75, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 76, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 85, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 86, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 86, - "column": 32, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 87, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 87, - "column": 32, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 88, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 90, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 91, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 92, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 93, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 94, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 104, - "column": 32, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 105, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 105, - "column": 28, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 106, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 106, - "column": 32, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 107, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 107, - "column": 37, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 107, - "column": 63, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 108, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 108, - "column": 37, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 109, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 109, - "column": 26, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 110, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 110, - "column": 47, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 111, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 111, - "column": 37, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 112, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 112, - "column": 26, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 113, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 113, - "column": 35, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 114, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 114, - "column": 30, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 115, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 115, - "column": 40, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 116, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 116, - "column": 26, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 117, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 117, - "column": 37, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - } - ] -} diff --git a/ets2panda/linter/test/literals_as_prop_names.ts.autofix.json b/ets2panda/linter/test/literals_as_prop_names.ts.autofix.json index fe67e4ebe8..6b8ad9e612 100644 --- a/ets2panda/linter/test/literals_as_prop_names.ts.autofix.json +++ b/ets2panda/linter/test/literals_as_prop_names.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/literals_as_prop_names.ts.strict.json b/ets2panda/linter/test/literals_as_prop_names.ts.json similarity index 98% rename from ets2panda/linter/test/literals_as_prop_names.ts.strict.json rename to ets2panda/linter/test/literals_as_prop_names.ts.json index 96feeb09ac..5fcfd95e40 100644 --- a/ets2panda/linter/test/literals_as_prop_names.ts.strict.json +++ b/ets2panda/linter/test/literals_as_prop_names.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/literals_as_prop_names.ts.relax.json b/ets2panda/linter/test/literals_as_prop_names.ts.relax.json deleted file mode 100644 index d0e9e21597..0000000000 --- a/ets2panda/linter/test/literals_as_prop_names.ts.relax.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 49, - "column": 9, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 59, - "column": 13, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 34, - "column": 11, - "problem": "StrictDiagnostic", - "suggest": "Property '_2' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property '_2' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 35, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'Two' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'Two' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 55, - "column": 12, - "problem": "StrictDiagnostic", - "suggest": "Property 'name' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'name' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 56, - "column": 12, - "problem": "StrictDiagnostic", - "suggest": "Property '_2' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property '_2' has no initializer and is not definitely assigned in the constructor." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/loop_over_set.ts.relax.json b/ets2panda/linter/test/loop_over_set.ts.json similarity index 95% rename from ets2panda/linter/test/loop_over_set.ts.relax.json rename to ets2panda/linter/test/loop_over_set.ts.json index c73b5837a3..69f96af1cd 100644 --- a/ets2panda/linter/test/loop_over_set.ts.relax.json +++ b/ets2panda/linter/test/loop_over_set.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/loop_over_set.ts.strict.json b/ets2panda/linter/test/loop_over_set.ts.strict.json deleted file mode 100644 index c73b5837a3..0000000000 --- a/ets2panda/linter/test/loop_over_set.ts.strict.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 18, - "column": 15, - "problem": "ForInStatement", - "suggest": "", - "rule": "\"for .. in\" is not supported (arkts-no-for-in)" - }, - { - "line": 18, - "column": 18, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 22, - "column": 33, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/mapped_types.ts.strict.json b/ets2panda/linter/test/mapped_types.ts.json similarity index 98% rename from ets2panda/linter/test/mapped_types.ts.strict.json rename to ets2panda/linter/test/mapped_types.ts.json index 6e9f6f0879..b995161a19 100644 --- a/ets2panda/linter/test/mapped_types.ts.strict.json +++ b/ets2panda/linter/test/mapped_types.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/mapped_types.ts.relax.json b/ets2panda/linter/test/mapped_types.ts.relax.json deleted file mode 100644 index 6e9f6f0879..0000000000 --- a/ets2panda/linter/test/mapped_types.ts.relax.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 17, - "problem": "MappedType", - "suggest": "", - "rule": "Mapped type expression is not supported (arkts-no-mapped-types)" - }, - { - "line": 19, - "column": 16, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 26, - "column": 26, - "problem": "MappedType", - "suggest": "", - "rule": "Mapped type expression is not supported (arkts-no-mapped-types)" - }, - { - "line": 27, - "column": 29, - "problem": "IndexedAccessType", - "suggest": "", - "rule": "Indexed access types are not supported (arkts-no-aliases-by-index)" - }, - { - "line": 29, - "column": 22, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 36, - "column": 26, - "problem": "MappedType", - "suggest": "", - "rule": "Mapped type expression is not supported (arkts-no-mapped-types)" - }, - { - "line": 37, - "column": 21, - "problem": "IndexedAccessType", - "suggest": "", - "rule": "Indexed access types are not supported (arkts-no-aliases-by-index)" - }, - { - "line": 39, - "column": 22, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 47, - "column": 31, - "problem": "MappedType", - "suggest": "", - "rule": "Mapped type expression is not supported (arkts-no-mapped-types)" - }, - { - "line": 48, - "column": 26, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 49, - "column": 5, - "problem": "IntersectionType", - "suggest": "", - "rule": "Use inheritance instead of intersection types (arkts-no-intersection-types)" - }, - { - "line": 50, - "column": 15, - "problem": "IndexedAccessType", - "suggest": "", - "rule": "Indexed access types are not supported (arkts-no-aliases-by-index)" - }, - { - "line": 60, - "column": 22, - "problem": "MappedType", - "suggest": "", - "rule": "Mapped type expression is not supported (arkts-no-mapped-types)" - }, - { - "line": 61, - "column": 22, - "problem": "ConditionalType", - "suggest": "", - "rule": "Conditional types are not supported (arkts-no-conditional-types)" - }, - { - "line": 61, - "column": 22, - "problem": "IndexedAccessType", - "suggest": "", - "rule": "Indexed access types are not supported (arkts-no-aliases-by-index)" - }, - { - "line": 61, - "column": 38, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 65, - "column": 15, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 66, - "column": 13, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 67, - "column": 12, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/modules.ts.autofix.json b/ets2panda/linter/test/modules.ts.autofix.json index a7456973f6..9d942efdab 100755 --- a/ets2panda/linter/test/modules.ts.autofix.json +++ b/ets2panda/linter/test/modules.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/modules.ts.strict.json b/ets2panda/linter/test/modules.ts.json similarity index 99% rename from ets2panda/linter/test/modules.ts.strict.json rename to ets2panda/linter/test/modules.ts.json index ad66b1bcd3..bbfac53a61 100644 --- a/ets2panda/linter/test/modules.ts.strict.json +++ b/ets2panda/linter/test/modules.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/modules.ts.relax.json b/ets2panda/linter/test/modules.ts.relax.json deleted file mode 100644 index 20b99889ed..0000000000 --- a/ets2panda/linter/test/modules.ts.relax.json +++ /dev/null @@ -1,165 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 3, - "problem": "WithStatement", - "suggest": "", - "rule": "\"with\" statement is not supported (arkts-no-with)" - }, - { - "line": 23, - "column": 11, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 43, - "column": 3, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)" - }, - { - "line": 44, - "column": 3, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)" - }, - { - "line": 64, - "column": 11, - "problem": "NamespaceAsObject", - "suggest": "", - "rule": "Namespaces cannot be used as objects (arkts-no-ns-as-obj)" - }, - { - "line": 67, - "column": 15, - "problem": "NamespaceAsObject", - "suggest": "", - "rule": "Namespaces cannot be used as objects (arkts-no-ns-as-obj)" - }, - { - "line": 70, - "column": 18, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 73, - "column": 6, - "problem": "NamespaceAsObject", - "suggest": "", - "rule": "Namespaces cannot be used as objects (arkts-no-ns-as-obj)" - }, - { - "line": 75, - "column": 20, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 78, - "column": 9, - "problem": "NamespaceAsObject", - "suggest": "", - "rule": "Namespaces cannot be used as objects (arkts-no-ns-as-obj)" - }, - { - "line": 80, - "column": 1, - "problem": "ImportAfterStatement", - "suggest": "", - "rule": "\"import\" statements after other statements are not allowed (arkts-no-misplaced-imports)" - }, - { - "line": 92, - "column": 1, - "problem": "ImportAfterStatement", - "suggest": "", - "rule": "\"import\" statements after other statements are not allowed (arkts-no-misplaced-imports)" - }, - { - "line": 93, - "column": 1, - "problem": "ImportAfterStatement", - "suggest": "", - "rule": "\"import\" statements after other statements are not allowed (arkts-no-misplaced-imports)" - }, - { - "line": 94, - "column": 1, - "problem": "ImportAfterStatement", - "suggest": "", - "rule": "\"import\" statements after other statements are not allowed (arkts-no-misplaced-imports)" - }, - { - "line": 106, - "column": 1, - "problem": "ExportAssignment", - "suggest": "", - "rule": "\"export = ...\" assignment is not supported (arkts-no-export-assignment)" - }, - { - "line": 108, - "column": 1, - "problem": "ImportAssignment", - "suggest": "", - "rule": "\"require\" and \"import\" assignment are not supported (arkts-no-require)" - }, - { - "line": 109, - "column": 1, - "problem": "ImportAssignment", - "suggest": "", - "rule": "\"require\" and \"import\" assignment are not supported (arkts-no-require)" - }, - { - "line": 111, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 111, - "column": 5, - "problem": "ImportAssignment", - "suggest": "", - "rule": "\"require\" and \"import\" assignment are not supported (arkts-no-require)" - }, - { - "line": 112, - "column": 7, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 112, - "column": 7, - "problem": "ImportAssignment", - "suggest": "", - "rule": "\"require\" and \"import\" assignment are not supported (arkts-no-require)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/namespace_export_assignment.ts.autofix.json b/ets2panda/linter/test/namespace_export_assignment.ts.autofix.json deleted file mode 100644 index 18ac144f5d..0000000000 --- a/ets2panda/linter/test/namespace_export_assignment.ts.autofix.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/namespace_export_assignment.ts.autofix.skip b/ets2panda/linter/test/namespace_export_assignment.ts.autofix.skip new file mode 100644 index 0000000000..64ca30f56b --- /dev/null +++ b/ets2panda/linter/test/namespace_export_assignment.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/namespace_export_assignment.ts.json b/ets2panda/linter/test/namespace_export_assignment.ts.json new file mode 100644 index 0000000000..ad85bf6b84 --- /dev/null +++ b/ets2panda/linter/test/namespace_export_assignment.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test/namespace_export_assignment.ts.relax.json b/ets2panda/linter/test/namespace_export_assignment.ts.relax.json deleted file mode 100644 index 18ac144f5d..0000000000 --- a/ets2panda/linter/test/namespace_export_assignment.ts.relax.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/namespace_export_assignment.ts.strict.json b/ets2panda/linter/test/namespace_export_assignment.ts.strict.json deleted file mode 100644 index 18ac144f5d..0000000000 --- a/ets2panda/linter/test/namespace_export_assignment.ts.strict.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/new_target.ts.strict.json b/ets2panda/linter/test/new_target.ts.json similarity index 94% rename from ets2panda/linter/test/new_target.ts.strict.json rename to ets2panda/linter/test/new_target.ts.json index 0b83a11983..61118654d8 100644 --- a/ets2panda/linter/test/new_target.ts.strict.json +++ b/ets2panda/linter/test/new_target.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/new_target.ts.relax.json b/ets2panda/linter/test/new_target.ts.relax.json deleted file mode 100644 index 0b83a11983..0000000000 --- a/ets2panda/linter/test/new_target.ts.relax.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 19, - "column": 12, - "problem": "LimitedStdLibApi" - }, - { - "line": 19, - "column": 44, - "problem": "Prototype" - }, - { - "line": 19, - "column": 33, - "problem": "NewTarget" - }, - { - "line": 24, - "column": 7, - "problem": "NewTarget" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/non_initializable_prop_decorators.ts.relax.json b/ets2panda/linter/test/non_initializable_prop_decorators.ts.json similarity index 98% rename from ets2panda/linter/test/non_initializable_prop_decorators.ts.relax.json rename to ets2panda/linter/test/non_initializable_prop_decorators.ts.json index 3290a48d74..efe8fd333f 100644 --- a/ets2panda/linter/test/non_initializable_prop_decorators.ts.relax.json +++ b/ets2panda/linter/test/non_initializable_prop_decorators.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/non_initializable_prop_decorators.ts.strict.json b/ets2panda/linter/test/non_initializable_prop_decorators.ts.strict.json deleted file mode 100644 index 3290a48d74..0000000000 --- a/ets2panda/linter/test/non_initializable_prop_decorators.ts.strict.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 31, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 16, - "column": 49, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 17, - "column": 30, - "problem": "IntersectionType", - "suggest": "", - "rule": "Use inheritance instead of intersection types (arkts-no-intersection-types)" - }, - { - "line": 24, - "column": 36, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 24, - "column": 39, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 55, - "column": 7, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 57, - "column": 3, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 43, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'pr' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'pr' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 46, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'pr2' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'pr2' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 53, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'f2' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'f2' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 70, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'controller' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'controller' has no initializer and is not definitely assigned in the constructor." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/null_check_calls.ts.strict.json b/ets2panda/linter/test/null_check_calls.ts.json similarity index 98% rename from ets2panda/linter/test/null_check_calls.ts.strict.json rename to ets2panda/linter/test/null_check_calls.ts.json index 6ae1263ea8..a4723127c4 100644 --- a/ets2panda/linter/test/null_check_calls.ts.strict.json +++ b/ets2panda/linter/test/null_check_calls.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/null_check_calls.ts.relax.json b/ets2panda/linter/test/null_check_calls.ts.relax.json deleted file mode 100644 index dda25acbfe..0000000000 --- a/ets2panda/linter/test/null_check_calls.ts.relax.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 37, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'number[]'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'number[]'." - }, - { - "line": 42, - "column": 20, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'number'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'number'." - }, - { - "line": 43, - "column": 42, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'number | null' is not assignable to parameter of type 'number'.\n Type 'null' is not assignable to type 'number'.", - "rule": "Argument of type 'number | null' is not assignable to parameter of type 'number'.\n Type 'null' is not assignable to type 'number'." - }, - { - "line": 47, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'number | null' is not assignable to parameter of type 'number'.\n Type 'null' is not assignable to type 'number'.", - "rule": "Argument of type 'number | null' is not assignable to parameter of type 'number'.\n Type 'null' is not assignable to type 'number'." - }, - { - "line": 52, - "column": 12, - "problem": "StrictDiagnostic", - "suggest": "Type 'null' is not assignable to type 'Object'.", - "rule": "Type 'null' is not assignable to type 'Object'." - }, - { - "line": 56, - "column": 17, - "problem": "StrictDiagnostic", - "suggest": "Type 'null' is not assignable to type 'Object'.", - "rule": "Type 'null' is not assignable to type 'Object'." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals.ts.strict.json b/ets2panda/linter/test/object_literals.ts.json similarity index 99% rename from ets2panda/linter/test/object_literals.ts.strict.json rename to ets2panda/linter/test/object_literals.ts.json index 88c80c5016..33b86ea8a5 100644 --- a/ets2panda/linter/test/object_literals.ts.strict.json +++ b/ets2panda/linter/test/object_literals.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/object_literals.ts.relax.json b/ets2panda/linter/test/object_literals.ts.relax.json deleted file mode 100644 index 04a06d0ad5..0000000000 --- a/ets2panda/linter/test/object_literals.ts.relax.json +++ /dev/null @@ -1,223 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 27, - "column": 6, - "problem": "ObjectTypeLiteral" - }, - { - "line": 28, - "column": 6, - "problem": "AnyType" - }, - { - "line": 35, - "column": 12, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 36, - "column": 11, - "problem": "AnyType" - }, - { - "line": 37, - "column": 11, - "problem": "ObjectTypeLiteral" - }, - { - "line": 37, - "column": 38, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 40, - "column": 16, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 42, - "column": 8, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 49, - "column": 8, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 51, - "column": 8, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 54, - "column": 8, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 56, - "column": 8, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 64, - "column": 20, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 67, - "column": 20, - "problem": "AnyType" - }, - { - "line": 70, - "column": 20, - "problem": "ObjectTypeLiteral" - }, - { - "line": 70, - "column": 47, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 81, - "column": 7, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 83, - "column": 8, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 90, - "column": 12, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 92, - "column": 20, - "problem": "AnyType" - }, - { - "line": 95, - "column": 20, - "problem": "ObjectTypeLiteral" - }, - { - "line": 96, - "column": 12, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 109, - "column": 26, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 109, - "column": 46, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 110, - "column": 13, - "problem": "AnyType" - }, - { - "line": 111, - "column": 13, - "problem": "ObjectTypeLiteral" - }, - { - "line": 112, - "column": 7, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 113, - "column": 7, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 119, - "column": 16, - "problem": "ArrayLiteralNoContextType" - }, - { - "line": 120, - "column": 5, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 121, - "column": 5, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 123, - "column": 15, - "problem": "AnyType" - }, - { - "line": 127, - "column": 15, - "problem": "ObjectTypeLiteral" - }, - { - "line": 127, - "column": 44, - "problem": "ArrayLiteralNoContextType" - }, - { - "line": 128, - "column": 5, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 129, - "column": 5, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 22, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 23, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 27, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 29, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 30, - "column": 3, - "problem": "StrictDiagnostic" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals2.ts.autofix.json b/ets2panda/linter/test/object_literals2.ts.autofix.json deleted file mode 100644 index 80427f5ac4..0000000000 --- a/ets2panda/linter/test/object_literals2.ts.autofix.json +++ /dev/null @@ -1,194 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 18, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 20, - "column": 11, - "problem": "ObjectTypeLiteral", - "autofixable": false, - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 20, - "column": 16, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 22, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 32, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 42, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 86, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 96, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 106, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 118, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 128, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 138, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 150, - "column": 12, - "problem": "ObjectTypeLiteral", - "autofixable": false, - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 157, - "column": 22, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 167, - "column": 12, - "problem": "ObjectTypeLiteral", - "autofixable": false, - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 174, - "column": 22, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 184, - "column": 12, - "problem": "ObjectTypeLiteral", - "autofixable": false, - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 193, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 205, - "column": 39, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 215, - "column": 39, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 225, - "column": 58, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals2.ts.autofix.skip b/ets2panda/linter/test/object_literals2.ts.autofix.skip new file mode 100644 index 0000000000..64ca30f56b --- /dev/null +++ b/ets2panda/linter/test/object_literals2.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals2.ts.strict.json b/ets2panda/linter/test/object_literals2.ts.json similarity index 99% rename from ets2panda/linter/test/object_literals2.ts.strict.json rename to ets2panda/linter/test/object_literals2.ts.json index ac4768cb7a..a3fd6c595a 100644 --- a/ets2panda/linter/test/object_literals2.ts.strict.json +++ b/ets2panda/linter/test/object_literals2.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/object_literals2.ts.relax.json b/ets2panda/linter/test/object_literals2.ts.relax.json deleted file mode 100644 index ac4768cb7a..0000000000 --- a/ets2panda/linter/test/object_literals2.ts.relax.json +++ /dev/null @@ -1,172 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 18, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 20, - "column": 11, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 20, - "column": 16, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 22, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 32, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 42, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 86, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 96, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 106, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 118, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 128, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 138, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 150, - "column": 12, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 157, - "column": 22, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 167, - "column": 12, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 174, - "column": 22, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 184, - "column": 12, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 193, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 205, - "column": 39, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 215, - "column": 39, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 225, - "column": 58, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals3.ts.autofix.json b/ets2panda/linter/test/object_literals3.ts.autofix.json deleted file mode 100644 index b06227021f..0000000000 --- a/ets2panda/linter/test/object_literals3.ts.autofix.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals3.ts.autofix.skip b/ets2panda/linter/test/object_literals3.ts.autofix.skip new file mode 100644 index 0000000000..64ca30f56b --- /dev/null +++ b/ets2panda/linter/test/object_literals3.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals3.ts.json b/ets2panda/linter/test/object_literals3.ts.json new file mode 100644 index 0000000000..e8cff6c256 --- /dev/null +++ b/ets2panda/linter/test/object_literals3.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals3.ts.relax.json b/ets2panda/linter/test/object_literals3.ts.relax.json deleted file mode 100644 index b06227021f..0000000000 --- a/ets2panda/linter/test/object_literals3.ts.relax.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals3.ts.strict.json b/ets2panda/linter/test/object_literals3.ts.strict.json deleted file mode 100644 index b06227021f..0000000000 --- a/ets2panda/linter/test/object_literals3.ts.strict.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_2.ts.strict.json b/ets2panda/linter/test/object_literals_2.ts.json similarity index 97% rename from ets2panda/linter/test/object_literals_2.ts.strict.json rename to ets2panda/linter/test/object_literals_2.ts.json index 18cb6f505e..0adbdf7d4f 100644 --- a/ets2panda/linter/test/object_literals_2.ts.strict.json +++ b/ets2panda/linter/test/object_literals_2.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/object_literals_2.ts.relax.json b/ets2panda/linter/test/object_literals_2.ts.relax.json deleted file mode 100644 index 18cb6f505e..0000000000 --- a/ets2panda/linter/test/object_literals_2.ts.relax.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 11, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 72, - "column": 14, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 87, - "column": 14, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 91, - "column": 12, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 102, - "column": 14, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 122, - "column": 18, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 123, - "column": 18, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 144, - "column": 12, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 283, - "column": 19, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 285, - "column": 19, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 187, - "column": 5, - "problem": "StrictDiagnostic" - }, - { - "line": 195, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 196, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 205, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 206, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 224, - "column": 5, - "problem": "StrictDiagnostic" - }, - { - "line": 225, - "column": 5, - "problem": "StrictDiagnostic" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_iface.ts.autofix.json b/ets2panda/linter/test/object_literals_iface.ts.autofix.json deleted file mode 100644 index a53e63acbe..0000000000 --- a/ets2panda/linter/test/object_literals_iface.ts.autofix.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 24, - "column": 30, - "problem": "ObjectLiteralNoContextType", - "autofixable": false - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_iface.ts.autofix.skip b/ets2panda/linter/test/object_literals_iface.ts.autofix.skip new file mode 100644 index 0000000000..64ca30f56b --- /dev/null +++ b/ets2panda/linter/test/object_literals_iface.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_iface.ts.relax.json b/ets2panda/linter/test/object_literals_iface.ts.json similarity index 93% rename from ets2panda/linter/test/object_literals_iface.ts.relax.json rename to ets2panda/linter/test/object_literals_iface.ts.json index 83b487cb17..005fee18e3 100644 --- a/ets2panda/linter/test/object_literals_iface.ts.relax.json +++ b/ets2panda/linter/test/object_literals_iface.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/object_literals_iface.ts.strict.json b/ets2panda/linter/test/object_literals_iface.ts.strict.json deleted file mode 100644 index 83b487cb17..0000000000 --- a/ets2panda/linter/test/object_literals_iface.ts.strict.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 24, - "column": 30, - "problem": "ObjectLiteralNoContextType" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_iface_interop.ts.args.json b/ets2panda/linter/test/object_literals_iface_interop.ts.args.json index 0e197c0337..3284cc6637 100644 --- a/ets2panda/linter/test/object_literals_iface_interop.ts.args.json +++ b/ets2panda/linter/test/object_literals_iface_interop.ts.args.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/object_literals_iface_interop.ts.autofix.json b/ets2panda/linter/test/object_literals_iface_interop.ts.autofix.json deleted file mode 100644 index e7d2d6779b..0000000000 --- a/ets2panda/linter/test/object_literals_iface_interop.ts.autofix.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_iface_interop.ts.autofix.skip b/ets2panda/linter/test/object_literals_iface_interop.ts.autofix.skip new file mode 100644 index 0000000000..64ca30f56b --- /dev/null +++ b/ets2panda/linter/test/object_literals_iface_interop.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_iface_interop.ts.json b/ets2panda/linter/test/object_literals_iface_interop.ts.json new file mode 100644 index 0000000000..ad85bf6b84 --- /dev/null +++ b/ets2panda/linter/test/object_literals_iface_interop.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_iface_interop.ts.relax.json b/ets2panda/linter/test/object_literals_iface_interop.ts.relax.json deleted file mode 100644 index e7d2d6779b..0000000000 --- a/ets2panda/linter/test/object_literals_iface_interop.ts.relax.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_iface_interop.ts.strict.json b/ets2panda/linter/test/object_literals_iface_interop.ts.strict.json deleted file mode 100644 index e7d2d6779b..0000000000 --- a/ets2panda/linter/test/object_literals_iface_interop.ts.strict.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_prop_func_type.ts.autofix.json b/ets2panda/linter/test/object_literals_prop_func_type.ts.autofix.json deleted file mode 100644 index 7699bc663e..0000000000 --- a/ets2panda/linter/test/object_literals_prop_func_type.ts.autofix.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 18, - "column": 3, - "problem": "CallSignature", - "autofixable": false - }, - { - "line": 23, - "column": 3, - "problem": "StrictDiagnostic", - "autofixable": false - }, - { - "line": 24, - "column": 3, - "problem": "StrictDiagnostic", - "autofixable": false - }, - { - "line": 25, - "column": 3, - "problem": "StrictDiagnostic", - "autofixable": false - }, - { - "line": 26, - "column": 3, - "problem": "StrictDiagnostic", - "autofixable": false - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_prop_func_type.ts.autofix.skip b/ets2panda/linter/test/object_literals_prop_func_type.ts.autofix.skip new file mode 100644 index 0000000000..64ca30f56b --- /dev/null +++ b/ets2panda/linter/test/object_literals_prop_func_type.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_prop_func_type.ts.relax.json b/ets2panda/linter/test/object_literals_prop_func_type.ts.json similarity index 95% rename from ets2panda/linter/test/object_literals_prop_func_type.ts.relax.json rename to ets2panda/linter/test/object_literals_prop_func_type.ts.json index ba76794ce7..d74c18680d 100644 --- a/ets2panda/linter/test/object_literals_prop_func_type.ts.relax.json +++ b/ets2panda/linter/test/object_literals_prop_func_type.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/object_literals_prop_func_type.ts.strict.json b/ets2panda/linter/test/object_literals_prop_func_type.ts.strict.json deleted file mode 100644 index ba76794ce7..0000000000 --- a/ets2panda/linter/test/object_literals_prop_func_type.ts.strict.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 18, - "column": 3, - "problem": "CallSignature" - }, - { - "line": 23, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 24, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 25, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 26, - "column": 3, - "problem": "StrictDiagnostic" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_spread.ts.relax.json b/ets2panda/linter/test/object_spread.ts.json similarity index 94% rename from ets2panda/linter/test/object_spread.ts.relax.json rename to ets2panda/linter/test/object_spread.ts.json index a39dce8972..4ce16c7097 100644 --- a/ets2panda/linter/test/object_spread.ts.relax.json +++ b/ets2panda/linter/test/object_spread.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/object_spread.ts.strict.json b/ets2panda/linter/test/object_spread.ts.strict.json deleted file mode 100644 index a39dce8972..0000000000 --- a/ets2panda/linter/test/object_spread.ts.strict.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 14, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 20, - "column": 14, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 20, - "column": 16, - "problem": "SpreadOperator" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/optional_library_types.ts.strict.json b/ets2panda/linter/test/optional_library_types.ts.json similarity index 98% rename from ets2panda/linter/test/optional_library_types.ts.strict.json rename to ets2panda/linter/test/optional_library_types.ts.json index 28244d68d4..9d4b1921e3 100644 --- a/ets2panda/linter/test/optional_library_types.ts.strict.json +++ b/ets2panda/linter/test/optional_library_types.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/optional_library_types.ts.relax.json b/ets2panda/linter/test/optional_library_types.ts.relax.json deleted file mode 100644 index 0e10ce7548..0000000000 --- a/ets2panda/linter/test/optional_library_types.ts.relax.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 29, - "column": 26, - "problem": "AnyType" - }, - { - "line": 37, - "column": 19, - "problem": "AnyType" - }, - { - "line": 40, - "column": 21, - "problem": "AnyType" - }, - { - "line": 43, - "column": 21, - "problem": "AnyType" - }, - { - "line": 46, - "column": 20, - "problem": "AnyType" - }, - { - "line": 51, - "column": 7, - "problem": "AnyType" - }, - { - "line": 57, - "column": 9, - "problem": "AnyType" - }, - { - "line": 63, - "column": 9, - "problem": "AnyType" - }, - { - "line": 69, - "column": 8, - "problem": "AnyType" - }, - { - "line": 102, - "column": 8, - "problem": "AnyType" - }, - { - "line": 103, - "column": 8, - "problem": "AnyType" - }, - { - "line": 104, - "column": 8, - "problem": "AnyType" - }, - { - "line": 116, - "column": 8, - "problem": "AnyType" - }, - { - "line": 117, - "column": 8, - "problem": "AnyType" - }, - { - "line": 118, - "column": 8, - "problem": "AnyType" - }, - { - "line": 130, - "column": 8, - "problem": "AnyType" - }, - { - "line": 131, - "column": 8, - "problem": "AnyType" - }, - { - "line": 132, - "column": 8, - "problem": "AnyType" - }, - { - "line": 144, - "column": 11, - "problem": "AnyType" - }, - { - "line": 145, - "column": 11, - "problem": "AnyType" - }, - { - "line": 146, - "column": 11, - "problem": "AnyType" - }, - { - "line": 158, - "column": 11, - "problem": "AnyType" - }, - { - "line": 159, - "column": 11, - "problem": "AnyType" - }, - { - "line": 160, - "column": 11, - "problem": "AnyType" - }, - { - "line": 172, - "column": 11, - "problem": "AnyType" - }, - { - "line": 173, - "column": 11, - "problem": "AnyType" - }, - { - "line": 174, - "column": 11, - "problem": "AnyType" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/parameter_properties.ts b/ets2panda/linter/test/parameter_properties.ts index 2a7a10b3fe..fba40cf531 100644 --- a/ets2panda/linter/test/parameter_properties.ts +++ b/ets2panda/linter/test/parameter_properties.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -class Params { +class A { constructor( public readonly x: number, protected y: number, @@ -25,11 +25,24 @@ class Params { } } -class DerivedParams extends Params { - bar(): void { - console.log(this.x + this.y); +const a = new A(1, 2, 3); +console.log(a.x); + +class B { + public f: number = 10; + + constructor(q: number, public w = 'default', e: boolean, private readonly r: number[] = [1, 2, 3]) { + console.log(q, this.w, e, this.r, this.f); } } -const a = new Params(1, 2, 3); -console.log(a.x); +const b = new B(1, '2', true, []); +console.log(b.w); + +class C { + constructor(public a: any) {} // not fixable +} + +class D { + constructor(public a: number, private b: {x: string}) {} // not fixable +} \ No newline at end of file diff --git a/ets2panda/linter/test/conditional_types.ts.autofix.json b/ets2panda/linter/test/parameter_properties.ts.autofix.json old mode 100755 new mode 100644 similarity index 33% rename from ets2panda/linter/test/conditional_types.ts.autofix.json rename to ets2panda/linter/test/parameter_properties.ts.autofix.json index 9e4d4e6b9f..4085d82e2b --- a/ets2panda/linter/test/conditional_types.ts.autofix.json +++ b/ets2panda/linter/test/parameter_properties.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -15,108 +15,101 @@ ], "nodes": [ { - "line": 19, - "column": 1, - "problem": "InterfaceMerging", - "autofixable": false, - "suggest": "", - "rule": "Declaration merging is not supported (arkts-no-decl-merging)" - }, - { - "line": 22, - "column": 17, - "problem": "ConditionalType", - "autofixable": false, + "line": 18, + "column": 5, + "problem": "ParameterProperties", + "autofixable": true, + "autofix": [ + { + "start": 622, + "end": 622, + "replacementText": "public readonly x: number;\nprotected y: number;\nprivate z: number;\n" + }, + { + "start": 639, + "end": 664, + "replacementText": "x: number" + }, + { + "start": 670, + "end": 689, + "replacementText": "y: number" + }, + { + "start": 695, + "end": 712, + "replacementText": "z: number" + }, + { + "start": 717, + "end": 719, + "replacementText": "{\n this.x = x;\n this.y = y;\n this.z = z;\n}" + } + ], "suggest": "", - "rule": "Conditional types are not supported (arkts-no-conditional-types)" + "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" }, { - "line": 23, - "column": 17, - "problem": "ConditionalType", - "autofixable": false, + "line": 34, + "column": 15, + "problem": "ParameterProperties", + "autofixable": true, + "autofix": [ + { + "start": 870, + "end": 870, + "replacementText": "public w: string;\nprivate readonly r: number[];\n" + }, + { + "start": 893, + "end": 913, + "replacementText": "w = 'default'" + }, + { + "start": 927, + "end": 967, + "replacementText": "r: number[] = [1, 2, 3]" + }, + { + "start": 969, + "end": 1021, + "replacementText": "{\n this.w = w;\n this.r = r;\n console.log(q, this.w, e, this.r, this.f);\n}" + } + ], "suggest": "", - "rule": "Conditional types are not supported (arkts-no-conditional-types)" + "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" }, { - "line": 31, - "column": 44, - "problem": "ConditionalType", + "line": 43, + "column": 15, + "problem": "ParameterProperties", "autofixable": false, "suggest": "", - "rule": "Conditional types are not supported (arkts-no-conditional-types)" + "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" }, { - "line": 35, - "column": 3, - "problem": "ThrowStatement", + "line": 43, + "column": 25, + "problem": "AnyType", "autofixable": false, "suggest": "", - "rule": "\"throw\" statements cannot accept values of arbitrary types (arkts-limited-throw)" + "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" }, { - "line": 41, - "column": 21, - "problem": "ConditionalType", + "line": 47, + "column": 15, + "problem": "ParameterProperties", "autofixable": false, "suggest": "", - "rule": "Conditional types are not supported (arkts-no-conditional-types)" + "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" }, { - "line": 41, - "column": 31, + "line": 47, + "column": 44, "problem": "ObjectTypeLiteral", "autofixable": false, "suggest": "", "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 41, - "column": 42, - "problem": "UnknownType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 41, - "column": 54, - "problem": "IndexedAccessType", - "autofixable": false, - "suggest": "", - "rule": "Indexed access types are not supported (arkts-no-aliases-by-index)" - }, - { - "line": 45, - "column": 1, - "problem": "InterfaceMerging", - "autofixable": false, - "suggest": "", - "rule": "Declaration merging is not supported (arkts-no-decl-merging)" - }, - { - "line": 51, - "column": 19, - "problem": "ConditionalType", - "autofixable": false, - "suggest": "", - "rule": "Conditional types are not supported (arkts-no-conditional-types)" - }, - { - "line": 51, - "column": 29, - "problem": "AnyType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 51, - "column": 37, - "problem": "IndexedAccessType", - "autofixable": false, - "suggest": "", - "rule": "Indexed access types are not supported (arkts-no-aliases-by-index)" } ] } \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule25.ts.strict.json b/ets2panda/linter/test/parameter_properties.ts.json similarity index 67% rename from ets2panda/linter/test_rules/rule25.ts.strict.json rename to ets2panda/linter/test/parameter_properties.ts.json index a54bc16dde..60aa75dae4 100644 --- a/ets2panda/linter/test_rules/rule25.ts.strict.json +++ b/ets2panda/linter/test/parameter_properties.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -16,31 +16,45 @@ "nodes": [ { "line": 18, - "column": 9, + "column": 5, "problem": "ParameterProperties", "suggest": "", "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" }, { - "line": 19, - "column": 9, + "line": 34, + "column": 15, "problem": "ParameterProperties", "suggest": "", "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" }, { - "line": 20, - "column": 9, + "line": 43, + "column": 15, "problem": "ParameterProperties", "suggest": "", "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" }, { - "line": 49, - "column": 17, + "line": 43, + "column": 25, + "problem": "AnyType", + "suggest": "", + "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" + }, + { + "line": 47, + "column": 15, "problem": "ParameterProperties", "suggest": "", "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" + }, + { + "line": 47, + "column": 44, + "problem": "ObjectTypeLiteral", + "suggest": "", + "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" } ] } \ No newline at end of file diff --git a/ets2panda/linter/test/parameter_properties.ts.relax.json b/ets2panda/linter/test/parameter_properties.ts.relax.json deleted file mode 100644 index e7d2d6779b..0000000000 --- a/ets2panda/linter/test/parameter_properties.ts.relax.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/parameter_properties.ts.strict.json b/ets2panda/linter/test/parameter_properties.ts.strict.json deleted file mode 100644 index 6dd05ac8d0..0000000000 --- a/ets2panda/linter/test/parameter_properties.ts.strict.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 18, - "column": 5, - "problem": "ParameterProperties" - }, - { - "line": 19, - "column": 5, - "problem": "ParameterProperties" - }, - { - "line": 20, - "column": 5, - "problem": "ParameterProperties" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/partial_type.ts.autofix.json b/ets2panda/linter/test/partial_type.ts.autofix.json deleted file mode 100644 index 67eac61dfd..0000000000 --- a/ets2panda/linter/test/partial_type.ts.autofix.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 21, - "column": 10, - "problem": "ObjectLiteralNoContextType", - "autofixable": false - }, - { - "line": 21, - "column": 12, - "problem": "SpreadOperator", - "autofixable": false - }, - { - "line": 21, - "column": 21, - "problem": "SpreadOperator", - "autofixable": false - }, - { - "line": 23, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "autofixable": false - }, - { - "line": 31, - "column": 20, - "problem": "UtilityType", - "autofixable": false - }, - { - "line": 32, - "column": 22, - "problem": "UtilityType", - "autofixable": false - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/partial_type.ts.autofix.skip b/ets2panda/linter/test/partial_type.ts.autofix.skip new file mode 100644 index 0000000000..64ca30f56b --- /dev/null +++ b/ets2panda/linter/test/partial_type.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/partial_type.ts.relax.json b/ets2panda/linter/test/partial_type.ts.json similarity index 95% rename from ets2panda/linter/test/partial_type.ts.relax.json rename to ets2panda/linter/test/partial_type.ts.json index 013ae1a978..25da8b75bf 100644 --- a/ets2panda/linter/test/partial_type.ts.relax.json +++ b/ets2panda/linter/test/partial_type.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/partial_type.ts.strict.json b/ets2panda/linter/test/partial_type.ts.strict.json deleted file mode 100644 index 013ae1a978..0000000000 --- a/ets2panda/linter/test/partial_type.ts.strict.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 21, - "column": 10, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 21, - "column": 12, - "problem": "SpreadOperator" - }, - { - "line": 21, - "column": 21, - "problem": "SpreadOperator" - }, - { - "line": 23, - "column": 15, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 31, - "column": 20, - "problem": "UtilityType" - }, - { - "line": 32, - "column": 22, - "problem": "UtilityType" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/readonly_arr.ts b/ets2panda/linter/test/private_identifiers.ts similarity index 32% rename from ets2panda/linter/test/readonly_arr.ts rename to ets2panda/linter/test/private_identifiers.ts index b5bbb80dc5..5ed8b9f2d6 100644 --- a/ets2panda/linter/test/readonly_arr.ts +++ b/ets2panda/linter/test/private_identifiers.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,12 +13,63 @@ * limitations under the License. */ -class Person { - readonly name: string; // not count 'readonly' ! - age: number; +class C { + #p: number; + + p2: number; + #p2: string; // not fixable + + #q?: string; + #e!: string; + static #s = 0; + readonly #r = 20; + static readonly #sr = 0; + static readonly #srq?: string; + + #m(x: number): void {} + + m2(x: number): void {} + #m2(x: number): void {} // not fixable + + m3: boolean; + #m3(x: number): void {} // not fixable + + get #g1(): number { return 10; } + set #s1(x: number) { } + + static get #g2(): number { return 10; } + static set #s2(x: number) { } + + test() { + console.log(this.#p + this.#p2 + this.#q + this.#e + C.#s + this.#r + C.#sr + C.#srq); // '#p2' is not fixable + this.#m(10); + this.#m2(20); // not fixable + this.#m3(30); // not fixable + let x = this.#g1; + this.#s1 = x; + let y = C.#g2; + C.#s2 = y; + } } -function foo(arr: readonly string[]) { - arr.slice(); - arr.push('hello!'); +class D extends C { + #a: string; + #p: number; // not fixable + + #m(): string { return 'foo'; } // not fixable + + #bar(): string { return 'baz'; } + + test() { + console.log(this.#p + this.#a); // '#p' is not fixable + let x = this.#m(); // not fixable + let y = this.#bar(); + } } + +class E { + #a: number; + #b: string; // not fixable + + constructor(public b: number) {} +} \ No newline at end of file diff --git a/ets2panda/linter/test/private_identifiers.ts.autofix.json b/ets2panda/linter/test/private_identifiers.ts.autofix.json new file mode 100644 index 0000000000..44c2cd6712 --- /dev/null +++ b/ets2panda/linter/test/private_identifiers.ts.autofix.json @@ -0,0 +1,507 @@ +{ + "copyright": [ + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [ + { + "line": 19, + "column": 3, + "problem": "DeclWithDuplicateName", + "autofixable": false, + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 20, + "column": 3, + "problem": "DeclWithDuplicateName", + "autofixable": false, + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 31, + "column": 3, + "problem": "DeclWithDuplicateName", + "autofixable": false, + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 32, + "column": 3, + "problem": "DeclWithDuplicateName", + "autofixable": false, + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 34, + "column": 3, + "problem": "DeclWithDuplicateName", + "autofixable": false, + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 35, + "column": 3, + "problem": "DeclWithDuplicateName", + "autofixable": false, + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 17, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 20, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": false, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 22, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 23, + "column": 3, + "problem": "DefiniteAssignment", + "autofixable": false, + "suggest": "", + "rule": "Definite assignment assertions are not supported (arkts-no-definite-assignment)" + }, + { + "line": 23, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 24, + "column": 10, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 25, + "column": 12, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 26, + "column": 19, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 27, + "column": 19, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 29, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 32, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": false, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 35, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": false, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 37, + "column": 7, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 38, + "column": 7, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 40, + "column": 14, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 41, + "column": 14, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 22, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 32, + "problem": "PrivateIdentifier", + "autofixable": false, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 43, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 53, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 60, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 70, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 77, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 85, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 45, + "column": 10, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 46, + "column": 10, + "problem": "PrivateIdentifier", + "autofixable": false, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 47, + "column": 10, + "problem": "PrivateIdentifier", + "autofixable": false, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 48, + "column": 18, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 49, + "column": 10, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 50, + "column": 15, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 51, + "column": 7, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 57, + "column": 3, + "problem": "DeclWithDuplicateName", + "autofixable": false, + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 59, + "column": 3, + "problem": "DeclWithDuplicateName", + "autofixable": false, + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 56, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 57, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": false, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 59, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": false, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 61, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 64, + "column": 22, + "problem": "PrivateIdentifier", + "autofixable": false, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 64, + "column": 32, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 65, + "column": 18, + "problem": "PrivateIdentifier", + "autofixable": false, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 66, + "column": 18, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 72, + "column": 3, + "problem": "DeclWithDuplicateName", + "autofixable": false, + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 71, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 72, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": false, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 74, + "column": 15, + "problem": "ParameterProperties", + "autofixable": true, + "autofix": [ + { + "start": 1726, + "end": 1726, + "replacementText": "public b: number;\n" + }, + { + "start": 1738, + "end": 1754, + "replacementText": "b: number" + }, + { + "start": 1756, + "end": 1758, + "replacementText": "{\n this.b = b;\n}" + } + ], + "suggest": "", + "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" + }, + { + "line": 17, + "column": 3, + "problem": "StrictDiagnostic", + "autofixable": false, + "suggest": "Property '#p' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#p' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 19, + "column": 3, + "problem": "StrictDiagnostic", + "autofixable": false, + "suggest": "Property 'p2' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property 'p2' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 20, + "column": 3, + "problem": "StrictDiagnostic", + "autofixable": false, + "suggest": "Property '#p2' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#p2' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 34, + "column": 3, + "problem": "StrictDiagnostic", + "autofixable": false, + "suggest": "Property 'm3' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property 'm3' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 56, + "column": 3, + "problem": "StrictDiagnostic", + "autofixable": false, + "suggest": "Property '#a' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#a' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 57, + "column": 3, + "problem": "StrictDiagnostic", + "autofixable": false, + "suggest": "Property '#p' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#p' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 71, + "column": 3, + "problem": "StrictDiagnostic", + "autofixable": false, + "suggest": "Property '#a' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#a' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 72, + "column": 3, + "problem": "StrictDiagnostic", + "autofixable": false, + "suggest": "Property '#b' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#b' has no initializer and is not definitely assigned in the constructor." + } + ] +} \ No newline at end of file diff --git a/ets2panda/linter/test/private_identifiers.ts.json b/ets2panda/linter/test/private_identifiers.ts.json new file mode 100644 index 0000000000..052df2f574 --- /dev/null +++ b/ets2panda/linter/test/private_identifiers.ts.json @@ -0,0 +1,431 @@ +{ + "copyright": [ + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [ + { + "line": 19, + "column": 3, + "problem": "DeclWithDuplicateName", + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 20, + "column": 3, + "problem": "DeclWithDuplicateName", + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 31, + "column": 3, + "problem": "DeclWithDuplicateName", + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 32, + "column": 3, + "problem": "DeclWithDuplicateName", + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 34, + "column": 3, + "problem": "DeclWithDuplicateName", + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 35, + "column": 3, + "problem": "DeclWithDuplicateName", + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 17, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 20, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 22, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 23, + "column": 3, + "problem": "DefiniteAssignment", + "suggest": "", + "rule": "Definite assignment assertions are not supported (arkts-no-definite-assignment)" + }, + { + "line": 23, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 24, + "column": 10, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 25, + "column": 12, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 26, + "column": 19, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 27, + "column": 19, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 29, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 32, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 35, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 37, + "column": 7, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 38, + "column": 7, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 40, + "column": 14, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 41, + "column": 14, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 22, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 32, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 43, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 53, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 60, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 70, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 77, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 85, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 45, + "column": 10, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 46, + "column": 10, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 47, + "column": 10, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 48, + "column": 18, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 49, + "column": 10, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 50, + "column": 15, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 51, + "column": 7, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 57, + "column": 3, + "problem": "DeclWithDuplicateName", + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 59, + "column": 3, + "problem": "DeclWithDuplicateName", + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 56, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 57, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 59, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 61, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 64, + "column": 22, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 64, + "column": 32, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 65, + "column": 18, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 66, + "column": 18, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 72, + "column": 3, + "problem": "DeclWithDuplicateName", + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 71, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 72, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 74, + "column": 15, + "problem": "ParameterProperties", + "suggest": "", + "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" + }, + { + "line": 17, + "column": 3, + "problem": "StrictDiagnostic", + "suggest": "Property '#p' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#p' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 19, + "column": 3, + "problem": "StrictDiagnostic", + "suggest": "Property 'p2' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property 'p2' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 20, + "column": 3, + "problem": "StrictDiagnostic", + "suggest": "Property '#p2' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#p2' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 34, + "column": 3, + "problem": "StrictDiagnostic", + "suggest": "Property 'm3' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property 'm3' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 56, + "column": 3, + "problem": "StrictDiagnostic", + "suggest": "Property '#a' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#a' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 57, + "column": 3, + "problem": "StrictDiagnostic", + "suggest": "Property '#p' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#p' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 71, + "column": 3, + "problem": "StrictDiagnostic", + "suggest": "Property '#a' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#a' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 72, + "column": 3, + "problem": "StrictDiagnostic", + "suggest": "Property '#b' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#b' has no initializer and is not definitely assigned in the constructor." + } + ] +} \ No newline at end of file diff --git a/ets2panda/linter/test/property_access_by_index.ts.autofix.json b/ets2panda/linter/test/property_access_by_index.ts.autofix.json index 8a92854765..02aed772dc 100644 --- a/ets2panda/linter/test/property_access_by_index.ts.autofix.json +++ b/ets2panda/linter/test/property_access_by_index.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/property_access_by_index.ts.strict.json b/ets2panda/linter/test/property_access_by_index.ts.json similarity index 98% rename from ets2panda/linter/test/property_access_by_index.ts.strict.json rename to ets2panda/linter/test/property_access_by_index.ts.json index 0afff457f4..6a486f9916 100644 --- a/ets2panda/linter/test/property_access_by_index.ts.strict.json +++ b/ets2panda/linter/test/property_access_by_index.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/property_access_by_index.ts.relax.json b/ets2panda/linter/test/property_access_by_index.ts.relax.json deleted file mode 100644 index b492ed7380..0000000000 --- a/ets2panda/linter/test/property_access_by_index.ts.relax.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 56, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 107, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 117, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/property_decl_on_function.ts.relax.json b/ets2panda/linter/test/property_decl_on_function.ts.json old mode 100755 new mode 100644 similarity index 95% rename from ets2panda/linter/test/property_decl_on_function.ts.relax.json rename to ets2panda/linter/test/property_decl_on_function.ts.json index 7cc12e9c49..c460825a9b --- a/ets2panda/linter/test/property_decl_on_function.ts.relax.json +++ b/ets2panda/linter/test/property_decl_on_function.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/property_decl_on_function.ts.strict.json b/ets2panda/linter/test/property_decl_on_function.ts.strict.json deleted file mode 100755 index 7cc12e9c49..0000000000 --- a/ets2panda/linter/test/property_decl_on_function.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 20, - "column": 1, - "problem": "MethodReassignment", - "suggest": "", - "rule": "Reassigning object methods is not supported (arkts-no-method-reassignment)" - }, - { - "line": 20, - "column": 1, - "problem": "PropertyDeclOnFunction", - "suggest": "", - "rule": "Declaring properties on functions is not supported (arkts-no-func-props)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/prototype_assignment.ts.autofix.json b/ets2panda/linter/test/prototype_assignment.ts.autofix.json deleted file mode 100755 index c1e3b5c631..0000000000 --- a/ets2panda/linter/test/prototype_assignment.ts.autofix.json +++ /dev/null @@ -1,218 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 26, - "column": 19, - "problem": "FunctionContainsThis", - "autofixable": false, - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 20, - "column": 20, - "problem": "FunctionExpression", - "autofixable": false, - "suggest": "", - "rule": "Use arrow functions instead of function expressions (arkts-no-func-expressions)" - }, - { - "line": 21, - "column": 5, - "problem": "FunctionContainsThis", - "autofixable": false, - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 20, - "column": 30, - "problem": "AnyType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 24, - "column": 12, - "problem": "Prototype", - "autofixable": false, - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 30, - "column": 12, - "problem": "Prototype", - "autofixable": false, - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 30, - "column": 26, - "problem": "FunctionExpression", - "autofixable": false, - "suggest": "", - "rule": "Use arrow functions instead of function expressions (arkts-no-func-expressions)" - }, - { - "line": 31, - "column": 12, - "problem": "FunctionContainsThis", - "autofixable": false, - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 30, - "column": 36, - "problem": "AnyType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 34, - "column": 3, - "problem": "LocalFunction", - "autofixable": false, - "suggest": "", - "rule": "Nested functions are not supported (arkts-no-nested-funcs)" - }, - { - "line": 37, - "column": 7, - "problem": "Prototype", - "autofixable": false, - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 38, - "column": 17, - "problem": "Prototype", - "autofixable": false, - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 38, - "column": 7, - "problem": "Prototype", - "autofixable": false, - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 39, - "column": 9, - "problem": "AnyType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 39, - "column": 25, - "problem": "Prototype", - "autofixable": false, - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 42, - "column": 22, - "problem": "ClassExpression", - "autofixable": false, - "suggest": "", - "rule": "Class literals are not supported (arkts-no-class-literals)" - }, - { - "line": 45, - "column": 14, - "problem": "Prototype", - "autofixable": false, - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 54, - "column": 5, - "problem": "Prototype", - "autofixable": false, - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 55, - "column": 5, - "problem": "Prototype", - "autofixable": false, - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 56, - "column": 20, - "problem": "Prototype", - "autofixable": false, - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 61, - "column": 5, - "problem": "AnyType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 64, - "column": 5, - "problem": "AnyType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 43, - "column": 5, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Property 'p' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'p' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 50, - "column": 3, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Property 'prototype' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'prototype' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 51, - "column": 3, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Property 'xy' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'xy' has no initializer and is not definitely assigned in the constructor." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/prototype_assignment.ts.autofix.skip b/ets2panda/linter/test/prototype_assignment.ts.autofix.skip new file mode 100644 index 0000000000..64ca30f56b --- /dev/null +++ b/ets2panda/linter/test/prototype_assignment.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/prototype_assignment.ts.strict.json b/ets2panda/linter/test/prototype_assignment.ts.json similarity index 99% rename from ets2panda/linter/test/prototype_assignment.ts.strict.json rename to ets2panda/linter/test/prototype_assignment.ts.json index f1ebe772db..1f0ef63098 100644 --- a/ets2panda/linter/test/prototype_assignment.ts.strict.json +++ b/ets2panda/linter/test/prototype_assignment.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/prototype_assignment.ts.relax.json b/ets2panda/linter/test/prototype_assignment.ts.relax.json deleted file mode 100644 index 79345f433f..0000000000 --- a/ets2panda/linter/test/prototype_assignment.ts.relax.json +++ /dev/null @@ -1,165 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 26, - "column": 19, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 21, - "column": 5, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 20, - "column": 30, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 24, - "column": 12, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 30, - "column": 12, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 31, - "column": 12, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 30, - "column": 36, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 37, - "column": 7, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 38, - "column": 17, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 38, - "column": 7, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 39, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 39, - "column": 25, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 45, - "column": 14, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 54, - "column": 5, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 55, - "column": 5, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 56, - "column": 20, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 61, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 64, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 43, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Property 'p' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'p' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 50, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'prototype' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'prototype' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 51, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'xy' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'xy' has no initializer and is not definitely assigned in the constructor." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/readonly_arr.ts.autofix.json b/ets2panda/linter/test/readonly_arr.ts.autofix.json deleted file mode 100644 index 982cc7b696..0000000000 --- a/ets2panda/linter/test/readonly_arr.ts.autofix.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 12, - "problem": "StrictDiagnostic", - "autofixable": false - }, - { - "line": 18, - "column": 3, - "problem": "StrictDiagnostic", - "autofixable": false - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/readonly_arr.ts.relax.json b/ets2panda/linter/test/readonly_arr.ts.relax.json deleted file mode 100644 index ac12844358..0000000000 --- a/ets2panda/linter/test/readonly_arr.ts.relax.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 12, - "problem": "StrictDiagnostic" - }, - { - "line": 18, - "column": 3, - "problem": "StrictDiagnostic" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/readonly_arr.ts.strict.json b/ets2panda/linter/test/readonly_arr.ts.strict.json deleted file mode 100644 index ac12844358..0000000000 --- a/ets2panda/linter/test/readonly_arr.ts.strict.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 12, - "problem": "StrictDiagnostic" - }, - { - "line": 18, - "column": 3, - "problem": "StrictDiagnostic" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/record_type.ts.autofix.json b/ets2panda/linter/test/record_type.ts.autofix.json deleted file mode 100644 index f1c5404ffe..0000000000 --- a/ets2panda/linter/test/record_type.ts.autofix.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 96, - "column": 7, - "problem": "ObjectLiteralNoContextType", - "autofixable": false - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/record_type.ts.autofix.skip b/ets2panda/linter/test/record_type.ts.autofix.skip new file mode 100644 index 0000000000..64ca30f56b --- /dev/null +++ b/ets2panda/linter/test/record_type.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/record_type.ts.strict.json b/ets2panda/linter/test/record_type.ts.json similarity index 93% rename from ets2panda/linter/test/record_type.ts.strict.json rename to ets2panda/linter/test/record_type.ts.json index 3a0cdaf108..dd327b9c90 100644 --- a/ets2panda/linter/test/record_type.ts.strict.json +++ b/ets2panda/linter/test/record_type.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/record_type.ts.relax.json b/ets2panda/linter/test/record_type.ts.relax.json deleted file mode 100644 index 3a0cdaf108..0000000000 --- a/ets2panda/linter/test/record_type.ts.relax.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 96, - "column": 7, - "problem": "ObjectLiteralNoContextType" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/recursive_types.ts.json b/ets2panda/linter/test/recursive_types.ts.json new file mode 100644 index 0000000000..e8cff6c256 --- /dev/null +++ b/ets2panda/linter/test/recursive_types.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test/recursive_types.ts.relax.json b/ets2panda/linter/test/recursive_types.ts.relax.json deleted file mode 100644 index b06227021f..0000000000 --- a/ets2panda/linter/test/recursive_types.ts.relax.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/recursive_types.ts.strict.json b/ets2panda/linter/test/recursive_types.ts.strict.json deleted file mode 100644 index b06227021f..0000000000 --- a/ets2panda/linter/test/recursive_types.ts.strict.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/strict_mode_error.ts.relax.json b/ets2panda/linter/test/strict_mode_error.ts.json similarity index 94% rename from ets2panda/linter/test/strict_mode_error.ts.relax.json rename to ets2panda/linter/test/strict_mode_error.ts.json index aa83c9ca33..d69cb839df 100644 --- a/ets2panda/linter/test/strict_mode_error.ts.relax.json +++ b/ets2panda/linter/test/strict_mode_error.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/strict_mode_error.ts.strict.json b/ets2panda/linter/test/strict_mode_error.ts.strict.json deleted file mode 100644 index aa83c9ca33..0000000000 --- a/ets2panda/linter/test/strict_mode_error.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Type 'number | undefined' is not assignable to type 'number'.\n Type 'undefined' is not assignable to type 'number'.", - "rule": "Type 'number | undefined' is not assignable to type 'number'.\n Type 'undefined' is not assignable to type 'number'." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/structural_identity.ts.relax.json b/ets2panda/linter/test/structural_identity.ts.json old mode 100755 new mode 100644 similarity index 99% rename from ets2panda/linter/test/structural_identity.ts.relax.json rename to ets2panda/linter/test/structural_identity.ts.json index 9217ab3185..a662a8d73a --- a/ets2panda/linter/test/structural_identity.ts.relax.json +++ b/ets2panda/linter/test/structural_identity.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/structural_identity.ts.strict.json b/ets2panda/linter/test/structural_identity.ts.strict.json deleted file mode 100755 index 9217ab3185..0000000000 --- a/ets2panda/linter/test/structural_identity.ts.strict.json +++ /dev/null @@ -1,312 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 44, - "column": 5, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 44, - "column": 19, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 47, - "column": 1, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 49, - "column": 5, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 52, - "column": 3, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 106, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 107, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 109, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 110, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 113, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 136, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 137, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 138, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 139, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 140, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 141, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 142, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 143, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 144, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 145, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 146, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 147, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 173, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 174, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 175, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 176, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 177, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 178, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 179, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 180, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 181, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 182, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 183, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 184, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 339, - "column": 3, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 342, - "column": 3, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 343, - "column": 3, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 346, - "column": 3, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 349, - "column": 3, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 354, - "column": 3, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 355, - "column": 3, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 358, - "column": 3, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/symbol_api.ts.relax.json b/ets2panda/linter/test/symbol_api.ts.json similarity index 98% rename from ets2panda/linter/test/symbol_api.ts.relax.json rename to ets2panda/linter/test/symbol_api.ts.json index e62c8c7b77..5a731b3c87 100644 --- a/ets2panda/linter/test/symbol_api.ts.relax.json +++ b/ets2panda/linter/test/symbol_api.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/symbol_api.ts.strict.json b/ets2panda/linter/test/symbol_api.ts.strict.json deleted file mode 100644 index e62c8c7b77..0000000000 --- a/ets2panda/linter/test/symbol_api.ts.strict.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 16, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 17, - "column": 16, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 18, - "column": 16, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 20, - "column": 16, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 21, - "column": 16, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 22, - "column": 16, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 23, - "column": 16, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 24, - "column": 16, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 25, - "column": 16, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 26, - "column": 16, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 27, - "column": 16, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 29, - "column": 9, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 31, - "column": 12, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 33, - "column": 17, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 35, - "column": 20, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 38, - "column": 44, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 39, - "column": 22, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 42, - "column": 14, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 46, - "column": 14, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 50, - "column": 12, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/template_literals.ts.relax.json b/ets2panda/linter/test/template_literals.ts.json similarity index 94% rename from ets2panda/linter/test/template_literals.ts.relax.json rename to ets2panda/linter/test/template_literals.ts.json index 323ad19059..613c1340d0 100644 --- a/ets2panda/linter/test/template_literals.ts.relax.json +++ b/ets2panda/linter/test/template_literals.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/template_literals.ts.strict.json b/ets2panda/linter/test/template_literals.ts.strict.json deleted file mode 100644 index 323ad19059..0000000000 --- a/ets2panda/linter/test/template_literals.ts.strict.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 30, - "column": 57, - "problem": "AnyType" - }, - { - "line": 35, - "column": 14, - "problem": "AnyType" - }, - { - "line": 36, - "column": 4, - "problem": "TypeQuery" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/this_type.ts.strict.json b/ets2panda/linter/test/this_type.ts.json similarity index 97% rename from ets2panda/linter/test/this_type.ts.strict.json rename to ets2panda/linter/test/this_type.ts.json index 1e2f8ec865..8459ac2d2e 100644 --- a/ets2panda/linter/test/this_type.ts.strict.json +++ b/ets2panda/linter/test/this_type.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/this_type.ts.relax.json b/ets2panda/linter/test/this_type.ts.relax.json deleted file mode 100644 index 7afe8f170d..0000000000 --- a/ets2panda/linter/test/this_type.ts.relax.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 13, - "problem": "ThisType" - }, - { - "line": 19, - "column": 13, - "problem": "ThisType" - }, - { - "line": 21, - "column": 30, - "problem": "ThisType" - }, - { - "line": 31, - "column": 13, - "problem": "ThisType" - }, - { - "line": 36, - "column": 13, - "problem": "ThisType" - }, - { - "line": 41, - "column": 30, - "problem": "ThisType" - }, - { - "line": 53, - "column": 8, - "problem": "ThisType" - }, - { - "line": 73, - "column": 5, - "problem": "FunctionContainsThis" - }, - { - "line": 78, - "column": 3, - "problem": "FunctionContainsThis" - }, - { - "line": 81, - "column": 3, - "problem": "FunctionContainsThis" - }, - { - "line": 84, - "column": 3, - "problem": "FunctionContainsThis" - }, - { - "line": 89, - "column": 5, - "problem": "FunctionContainsThis" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/throw_error.ts.autofix.json b/ets2panda/linter/test/throw_error.ts.autofix.json deleted file mode 100644 index 6e0f88b9e9..0000000000 --- a/ets2panda/linter/test/throw_error.ts.autofix.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 42, - "column": 3, - "problem": "ThrowStatement", - "autofixable": false, - "suggest": "", - "rule": "\"throw\" statements cannot accept values of arbitrary types (arkts-limited-throw)" - }, - { - "line": 43, - "column": 3, - "problem": "ThrowStatement", - "autofixable": false, - "suggest": "", - "rule": "\"throw\" statements cannot accept values of arbitrary types (arkts-limited-throw)" - }, - { - "line": 44, - "column": 3, - "problem": "ThrowStatement", - "autofixable": false, - "suggest": "", - "rule": "\"throw\" statements cannot accept values of arbitrary types (arkts-limited-throw)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/throw_error.ts.autofix.skip b/ets2panda/linter/test/throw_error.ts.autofix.skip new file mode 100644 index 0000000000..64ca30f56b --- /dev/null +++ b/ets2panda/linter/test/throw_error.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/throw_error.ts.strict.json b/ets2panda/linter/test/throw_error.ts.json similarity index 94% rename from ets2panda/linter/test/throw_error.ts.strict.json rename to ets2panda/linter/test/throw_error.ts.json index a0fe890edd..bc832745b3 100644 --- a/ets2panda/linter/test/throw_error.ts.strict.json +++ b/ets2panda/linter/test/throw_error.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -30,4 +30,4 @@ "problem": "ThrowStatement" } ] -} +} \ No newline at end of file diff --git a/ets2panda/linter/test/throw_error.ts.relax.json b/ets2panda/linter/test/throw_error.ts.relax.json deleted file mode 100644 index 397574237a..0000000000 --- a/ets2panda/linter/test/throw_error.ts.relax.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} diff --git a/ets2panda/linter/test/ts_ignore.ts.relax.json b/ets2panda/linter/test/ts_ignore.ts.json similarity index 98% rename from ets2panda/linter/test/ts_ignore.ts.relax.json rename to ets2panda/linter/test/ts_ignore.ts.json index f802c561b8..b63dd11d82 100644 --- a/ets2panda/linter/test/ts_ignore.ts.relax.json +++ b/ets2panda/linter/test/ts_ignore.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/ts_ignore.ts.strict.json b/ets2panda/linter/test/ts_ignore.ts.strict.json deleted file mode 100644 index f802c561b8..0000000000 --- a/ets2panda/linter/test/ts_ignore.ts.strict.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 53, - "column": 3, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 55, - "column": 22, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 16, - "column": 1, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 21, - "column": 3, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 25, - "column": 19, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 30, - "column": 9, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 43, - "column": 9, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 52, - "column": 3, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 56, - "column": 9, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 58, - "column": 9, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 75, - "column": 1, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 18, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Type 'null' is not assignable to type 'number'.", - "rule": "Type 'null' is not assignable to type 'number'." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/ts_ignore_2.ts.autofix.json b/ets2panda/linter/test/ts_ignore_2.ts.autofix.json deleted file mode 100644 index 87d88d712f..0000000000 --- a/ets2panda/linter/test/ts_ignore_2.ts.autofix.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 1, - "column": 1, - "problem": "ErrorSuppression", - "autofixable": false, - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/ts_ignore_2.ts.autofix.skip b/ets2panda/linter/test/ts_ignore_2.ts.autofix.skip new file mode 100644 index 0000000000..64ca30f56b --- /dev/null +++ b/ets2panda/linter/test/ts_ignore_2.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/ts_ignore_2.ts.strict.json b/ets2panda/linter/test/ts_ignore_2.ts.json similarity index 94% rename from ets2panda/linter/test/ts_ignore_2.ts.strict.json rename to ets2panda/linter/test/ts_ignore_2.ts.json index 4f498993ad..c5e21e6d2a 100644 --- a/ets2panda/linter/test/ts_ignore_2.ts.strict.json +++ b/ets2panda/linter/test/ts_ignore_2.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/ts_ignore_2.ts.relax.json b/ets2panda/linter/test/ts_ignore_2.ts.relax.json deleted file mode 100644 index 4f498993ad..0000000000 --- a/ets2panda/linter/test/ts_ignore_2.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 1, - "column": 1, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/ts_nocheck.ts.relax.json b/ets2panda/linter/test/ts_nocheck.ts.json similarity index 93% rename from ets2panda/linter/test/ts_nocheck.ts.relax.json rename to ets2panda/linter/test/ts_nocheck.ts.json index 3fac79311b..b8e010cb3d 100644 --- a/ets2panda/linter/test/ts_nocheck.ts.relax.json +++ b/ets2panda/linter/test/ts_nocheck.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -25,4 +25,4 @@ "problem": "ErrorSuppression" } ] -} +} \ No newline at end of file diff --git a/ets2panda/linter/test/ts_nocheck.ts.strict.json b/ets2panda/linter/test/ts_nocheck.ts.strict.json deleted file mode 100644 index 3fac79311b..0000000000 --- a/ets2panda/linter/test/ts_nocheck.ts.strict.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 1, - "problem": "ErrorSuppression" - }, - { - "line": 21, - "column": 1, - "problem": "ErrorSuppression" - } - ] -} diff --git a/ets2panda/linter/test/ts_nocheck_2.ts.autofix.json b/ets2panda/linter/test/ts_nocheck_2.ts.autofix.json deleted file mode 100644 index e56817ef3e..0000000000 --- a/ets2panda/linter/test/ts_nocheck_2.ts.autofix.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 1, - "column": 1, - "problem": "ErrorSuppression", - "autofixable": false, - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 2, - "column": 1, - "problem": "ErrorSuppression", - "autofixable": false, - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/ts_nocheck_2.ts.autofix.skip b/ets2panda/linter/test/ts_nocheck_2.ts.autofix.skip new file mode 100644 index 0000000000..64ca30f56b --- /dev/null +++ b/ets2panda/linter/test/ts_nocheck_2.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/ts_nocheck_2.ts.relax.json b/ets2panda/linter/test/ts_nocheck_2.ts.json similarity index 95% rename from ets2panda/linter/test/ts_nocheck_2.ts.relax.json rename to ets2panda/linter/test/ts_nocheck_2.ts.json index a8844f27fc..b9446ecdb8 100644 --- a/ets2panda/linter/test/ts_nocheck_2.ts.relax.json +++ b/ets2panda/linter/test/ts_nocheck_2.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/ts_nocheck_2.ts.strict.json b/ets2panda/linter/test/ts_nocheck_2.ts.strict.json deleted file mode 100644 index a8844f27fc..0000000000 --- a/ets2panda/linter/test/ts_nocheck_2.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 1, - "column": 1, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 2, - "column": 1, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/type_declarations.ts.strict.json b/ets2panda/linter/test/type_declarations.ts.json similarity index 98% rename from ets2panda/linter/test/type_declarations.ts.strict.json rename to ets2panda/linter/test/type_declarations.ts.json index dc1f301bc9..7de1c418e1 100644 --- a/ets2panda/linter/test/type_declarations.ts.strict.json +++ b/ets2panda/linter/test/type_declarations.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/type_declarations.ts.relax.json b/ets2panda/linter/test/type_declarations.ts.relax.json deleted file mode 100644 index 42cdf50f43..0000000000 --- a/ets2panda/linter/test/type_declarations.ts.relax.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 10, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 36, - "column": 14, - "problem": "InOperator", - "suggest": "", - "rule": "\"in\" operator is not supported (arkts-no-in)" - }, - { - "line": 36, - "column": 17, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 41, - "column": 18, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 55, - "column": 1, - "problem": "InterfaceMerging", - "suggest": "", - "rule": "Declaration merging is not supported (arkts-no-decl-merging)" - }, - { - "line": 55, - "column": 30, - "problem": "InterfaceExtendsClass", - "suggest": "", - "rule": "Interfaces cannot extend classes (arkts-extends-only-class)" - }, - { - "line": 59, - "column": 1, - "problem": "InterfaceMerging", - "suggest": "", - "rule": "Declaration merging is not supported (arkts-no-decl-merging)" - }, - { - "line": 59, - "column": 30, - "problem": "InterfaceExtendsClass", - "suggest": "", - "rule": "Interfaces cannot extend classes (arkts-extends-only-class)" - }, - { - "line": 63, - "column": 1, - "problem": "EnumMerging", - "suggest": "", - "rule": "\"enum\" declaration merging is not supported (arkts-no-enum-merging)" - }, - { - "line": 68, - "column": 1, - "problem": "EnumMerging", - "suggest": "", - "rule": "\"enum\" declaration merging is not supported (arkts-no-enum-merging)" - }, - { - "line": 84, - "column": 17, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 84, - "column": 25, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 96, - "column": 13, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 101, - "column": 24, - "problem": "InterfaceExtendsClass", - "suggest": "", - "rule": "Interfaces cannot extend classes (arkts-extends-only-class)" - }, - { - "line": 103, - "column": 23, - "problem": "ImplementsClass", - "suggest": "", - "rule": "Classes cannot be specified in \"implements\" clause (arkts-implements-only-iface)" - }, - { - "line": 108, - "column": 7, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 109, - "column": 7, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 42, - "column": 11, - "problem": "StrictDiagnostic", - "suggest": "Property 'pipe' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'pipe' has no initializer and is not definitely assigned in the constructor." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/types.ts.autofix.json b/ets2panda/linter/test/types.ts.autofix.json index 2d9bbd6638..b3a72b994b 100644 --- a/ets2panda/linter/test/types.ts.autofix.json +++ b/ets2panda/linter/test/types.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/types.ts.strict.json b/ets2panda/linter/test/types.ts.json similarity index 99% rename from ets2panda/linter/test/types.ts.strict.json rename to ets2panda/linter/test/types.ts.json index 0be6ecd0d1..2ec70db19b 100644 --- a/ets2panda/linter/test/types.ts.strict.json +++ b/ets2panda/linter/test/types.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/types.ts.relax.json b/ets2panda/linter/test/types.ts.relax.json deleted file mode 100644 index ed2fa5fb0d..0000000000 --- a/ets2panda/linter/test/types.ts.relax.json +++ /dev/null @@ -1,263 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 15, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 18, - "column": 15, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 19, - "column": 20, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 26, - "column": 18, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 32, - "column": 16, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 34, - "column": 15, - "problem": "IndexedAccessType", - "suggest": "", - "rule": "Indexed access types are not supported (arkts-no-aliases-by-index)" - }, - { - "line": 36, - "column": 24, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 37, - "column": 20, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 43, - "column": 24, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 43, - "column": 30, - "problem": "IsOperator", - "suggest": "", - "rule": "Type guarding is supported with \"instanceof\" and \"as\" (arkts-no-is)" - }, - { - "line": 54, - "column": 26, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 57, - "column": 3, - "problem": "ComputedPropertyName", - "suggest": "", - "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)" - }, - { - "line": 58, - "column": 3, - "problem": "ComputedPropertyName", - "suggest": "", - "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)" - }, - { - "line": 71, - "column": 19, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 72, - "column": 3, - "problem": "IndexMember", - "suggest": "", - "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" - }, - { - "line": 72, - "column": 18, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 76, - "column": 32, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 77, - "column": 11, - "problem": "InOperator", - "suggest": "", - "rule": "\"in\" operator is not supported (arkts-no-in)" - }, - { - "line": 92, - "column": 22, - "problem": "IntersectionType", - "suggest": "", - "rule": "Use inheritance instead of intersection types (arkts-no-intersection-types)" - }, - { - "line": 94, - "column": 28, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 96, - "column": 3, - "problem": "CallSignature", - "suggest": "", - "rule": "Use \"class\" instead of a type with call signature (arkts-no-call-signatures)" - }, - { - "line": 111, - "column": 19, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 112, - "column": 12, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 112, - "column": 35, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 116, - "column": 9, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 116, - "column": 25, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 119, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 119, - "column": 16, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 124, - "column": 13, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 128, - "column": 12, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 157, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 106, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'val' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'val' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 148, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Type 'undefined' is not assignable to type 'string'.", - "rule": "Type 'undefined' is not assignable to type 'string'." - }, - { - "line": 149, - "column": 18, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'undefined' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'undefined' is not assignable to parameter of type 'string'." - }, - { - "line": 150, - "column": 17, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'undefined' is not assignable to parameter of type 'number'.", - "rule": "Argument of type 'undefined' is not assignable to parameter of type 'number'." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/unary_wrong_types.ts.relax.json b/ets2panda/linter/test/unary_wrong_types.ts.json similarity index 95% rename from ets2panda/linter/test/unary_wrong_types.ts.relax.json rename to ets2panda/linter/test/unary_wrong_types.ts.json index beef091349..6347fa9c13 100644 --- a/ets2panda/linter/test/unary_wrong_types.ts.relax.json +++ b/ets2panda/linter/test/unary_wrong_types.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/unary_wrong_types.ts.strict.json b/ets2panda/linter/test/unary_wrong_types.ts.strict.json deleted file mode 100644 index beef091349..0000000000 --- a/ets2panda/linter/test/unary_wrong_types.ts.strict.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 24, - "column": 12, - "problem": "UnaryArithmNotNumber" - }, - { - "line": 25, - "column": 12, - "problem": "UnaryArithmNotNumber" - }, - { - "line": 26, - "column": 12, - "problem": "UnaryArithmNotNumber" - }, - { - "line": 27, - "column": 12, - "problem": "UnaryArithmNotNumber" - }, - { - "line": 28, - "column": 12, - "problem": "UnaryArithmNotNumber" - }, - { - "line": 29, - "column": 12, - "problem": "UnaryArithmNotNumber" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/undefined_check_calls.ts.strict.json b/ets2panda/linter/test/undefined_check_calls.ts.json similarity index 96% rename from ets2panda/linter/test/undefined_check_calls.ts.strict.json rename to ets2panda/linter/test/undefined_check_calls.ts.json index 21f9e86912..1a3b15b836 100644 --- a/ets2panda/linter/test/undefined_check_calls.ts.strict.json +++ b/ets2panda/linter/test/undefined_check_calls.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/undefined_check_calls.ts.relax.json b/ets2panda/linter/test/undefined_check_calls.ts.relax.json deleted file mode 100644 index 21f9e86912..0000000000 --- a/ets2panda/linter/test/undefined_check_calls.ts.relax.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 37, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'undefined' is not assignable to parameter of type 'number[]'.", - "rule": "Argument of type 'undefined' is not assignable to parameter of type 'number[]'." - }, - { - "line": 51, - "column": 42, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'string | undefined' is not assignable to parameter of type 'ResourceStr'.", - "rule": "Argument of type 'string | undefined' is not assignable to parameter of type 'ResourceStr'." - }, - { - "line": 58, - "column": 12, - "problem": "StrictDiagnostic", - "suggest": "Type 'undefined' is not assignable to type 'Object'.", - "rule": "Type 'undefined' is not assignable to type 'Object'." - }, - { - "line": 62, - "column": 17, - "problem": "StrictDiagnostic", - "suggest": "Type 'undefined' is not assignable to type 'Object'.", - "rule": "Type 'undefined' is not assignable to type 'Object'." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/unique_names.ts.strict.json b/ets2panda/linter/test/unique_names.ts.json similarity index 99% rename from ets2panda/linter/test/unique_names.ts.strict.json rename to ets2panda/linter/test/unique_names.ts.json index c9a962d16b..a96902a4f0 100644 --- a/ets2panda/linter/test/unique_names.ts.strict.json +++ b/ets2panda/linter/test/unique_names.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/unique_names.ts.relax.json b/ets2panda/linter/test/unique_names.ts.relax.json deleted file mode 100644 index 6780a6aade..0000000000 --- a/ets2panda/linter/test/unique_names.ts.relax.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 20, - "problem": "ImplementsClass" - }, - { - "line": 30, - "column": 3, - "problem": "InterfaceMerging" - }, - { - "line": 34, - "column": 3, - "problem": "InterfaceMerging" - }, - { - "line": 40, - "column": 3, - "problem": "InterfaceMerging" - }, - { - "line": 43, - "column": 3, - "problem": "InterfaceMerging" - }, - { - "line": 48, - "column": 1, - "problem": "ImportAfterStatement" - }, - { - "line": 54, - "column": 1, - "problem": "ImportAfterStatement" - }, - { - "line": 58, - "column": 30, - "problem": "ImplementsClass" - }, - { - "line": 134, - "column": 7, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 134, - "column": 19, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 206, - "column": 1, - "problem": "EnumMerging" - }, - { - "line": 207, - "column": 1, - "problem": "EnumMerging" - }, - { - "line": 209, - "column": 1, - "problem": "InterfaceMerging" - }, - { - "line": 210, - "column": 1, - "problem": "InterfaceMerging" - }, - { - "line": 163, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 164, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 173, - "column": 3, - "problem": "StrictDiagnostic" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/unknown_params.ts.strict.json b/ets2panda/linter/test/unknown_params.ts.json similarity index 95% rename from ets2panda/linter/test/unknown_params.ts.strict.json rename to ets2panda/linter/test/unknown_params.ts.json index 52221ff05b..aae3606a0a 100644 --- a/ets2panda/linter/test/unknown_params.ts.strict.json +++ b/ets2panda/linter/test/unknown_params.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/unknown_params.ts.relax.json b/ets2panda/linter/test/unknown_params.ts.relax.json deleted file mode 100644 index 8f486a9660..0000000000 --- a/ets2panda/linter/test/unknown_params.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 18, - "column": 51, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/utility_types.ts.strict.json b/ets2panda/linter/test/utility_types.ts.json similarity index 99% rename from ets2panda/linter/test/utility_types.ts.strict.json rename to ets2panda/linter/test/utility_types.ts.json index 22896007c7..f2f1056492 100644 --- a/ets2panda/linter/test/utility_types.ts.strict.json +++ b/ets2panda/linter/test/utility_types.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/utility_types.ts.relax.json b/ets2panda/linter/test/utility_types.ts.relax.json deleted file mode 100644 index 5d007f9001..0000000000 --- a/ets2panda/linter/test/utility_types.ts.relax.json +++ /dev/null @@ -1,556 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 12, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 19, - "column": 12, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 21, - "column": 12, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 53, - "column": 22, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 55, - "column": 29, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 71, - "column": 22, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 73, - "column": 29, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 81, - "column": 19, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 83, - "column": 30, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 92, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 94, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 96, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 100, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 102, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 106, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 108, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 108, - "column": 43, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 112, - "column": 20, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 116, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 118, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 120, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 122, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 122, - "column": 24, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 124, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 124, - "column": 24, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 126, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 130, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 132, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 134, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 136, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 136, - "column": 35, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 140, - "column": 18, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 141, - "column": 12, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 144, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 146, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 148, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 150, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 152, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 152, - "column": 24, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 154, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 154, - "column": 24, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 156, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 165, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 165, - "column": 26, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 167, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 167, - "column": 26, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 169, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 174, - "column": 12, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 177, - "column": 30, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 177, - "column": 48, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 178, - "column": 18, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 184, - "column": 12, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 187, - "column": 20, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 187, - "column": 38, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 187, - "column": 60, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - }, - { - "line": 208, - "column": 9, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 209, - "column": 9, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 193, - "column": 33, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 195, - "column": 15, - "problem": "IntersectionType", - "suggest": "", - "rule": "Use inheritance instead of intersection types (arkts-no-intersection-types)" - }, - { - "line": 195, - "column": 19, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 195, - "column": 28, - "problem": "IntersectionType", - "suggest": "", - "rule": "Use inheritance instead of intersection types (arkts-no-intersection-types)" - }, - { - "line": 198, - "column": 60, - "problem": "IntersectionType", - "suggest": "", - "rule": "Use inheritance instead of intersection types (arkts-no-intersection-types)" - }, - { - "line": 199, - "column": 39, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 200, - "column": 45, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 201, - "column": 12, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 201, - "column": 14, - "problem": "SpreadOperator", - "suggest": "", - "rule": "It is possible to spread only arrays or classes derived from arrays into the rest parameter or array literals (arkts-no-spread)" - }, - { - "line": 201, - "column": 23, - "problem": "SpreadOperator", - "suggest": "", - "rule": "It is possible to spread only arrays or classes derived from arrays into the rest parameter or array literals (arkts-no-spread)" - }, - { - "line": 201, - "column": 39, - "problem": "IntersectionType", - "suggest": "", - "rule": "Use inheritance instead of intersection types (arkts-no-intersection-types)" - }, - { - "line": 204, - "column": 26, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 205, - "column": 11, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 206, - "column": 14, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 221, - "column": 25, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 223, - "column": 50, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 229, - "column": 24, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 231, - "column": 50, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 237, - "column": 19, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 242, - "column": 32, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/var_declarations.ts.strict.json b/ets2panda/linter/test/var_declarations.ts.json similarity index 97% rename from ets2panda/linter/test/var_declarations.ts.strict.json rename to ets2panda/linter/test/var_declarations.ts.json index 0f24e4b64a..dfe7c2a564 100644 --- a/ets2panda/linter/test/var_declarations.ts.strict.json +++ b/ets2panda/linter/test/var_declarations.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/var_declarations.ts.relax.json b/ets2panda/linter/test/var_declarations.ts.relax.json deleted file mode 100644 index 8606279121..0000000000 --- a/ets2panda/linter/test/var_declarations.ts.relax.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 31, - "column": 14, - "problem": "ForInStatement", - "suggest": "", - "rule": "\"for .. in\" is not supported (arkts-no-for-in)" - }, - { - "line": 23, - "column": 12, - "problem": "StrictDiagnostic", - "suggest": "Variable 'y' is used before being assigned.", - "rule": "Variable 'y' is used before being assigned." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_regression/14412.ts.json b/ets2panda/linter/test_regression/14412.ts.json new file mode 100644 index 0000000000..e8cff6c256 --- /dev/null +++ b/ets2panda/linter/test_regression/14412.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test_regression/14412.ts.relax.json b/ets2panda/linter/test_regression/14412.ts.relax.json deleted file mode 100755 index e4efb45db7..0000000000 --- a/ets2panda/linter/test_regression/14412.ts.relax.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} diff --git a/ets2panda/linter/test_regression/14412.ts.strict.json b/ets2panda/linter/test_regression/14412.ts.strict.json deleted file mode 100755 index e4efb45db7..0000000000 --- a/ets2panda/linter/test_regression/14412.ts.strict.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} diff --git a/ets2panda/linter/test_regression/14832.ts.json b/ets2panda/linter/test_regression/14832.ts.json new file mode 100644 index 0000000000..ad85bf6b84 --- /dev/null +++ b/ets2panda/linter/test_regression/14832.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test_regression/14832.ts.relax.json b/ets2panda/linter/test_regression/14832.ts.relax.json deleted file mode 100644 index e7d2d6779b..0000000000 --- a/ets2panda/linter/test_regression/14832.ts.relax.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_regression/14832.ts.strict.json b/ets2panda/linter/test_regression/14832.ts.strict.json deleted file mode 100644 index e7d2d6779b..0000000000 --- a/ets2panda/linter/test_regression/14832.ts.strict.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_regression/14860.ts.json b/ets2panda/linter/test_regression/14860.ts.json new file mode 100644 index 0000000000..e8cff6c256 --- /dev/null +++ b/ets2panda/linter/test_regression/14860.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test_regression/14860.ts.relax.json b/ets2panda/linter/test_regression/14860.ts.relax.json deleted file mode 100644 index 79536057ae..0000000000 --- a/ets2panda/linter/test_regression/14860.ts.relax.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] - } - \ No newline at end of file diff --git a/ets2panda/linter/test_regression/14860.ts.strict.json b/ets2panda/linter/test_regression/14860.ts.strict.json deleted file mode 100644 index 79536057ae..0000000000 --- a/ets2panda/linter/test_regression/14860.ts.strict.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] - } - \ No newline at end of file diff --git a/ets2panda/linter/test_regression/14953.ts.strict.json b/ets2panda/linter/test_regression/14953.ts.json similarity index 97% rename from ets2panda/linter/test_regression/14953.ts.strict.json rename to ets2panda/linter/test_regression/14953.ts.json index 130f6099b6..e1b17430ef 100644 --- a/ets2panda/linter/test_regression/14953.ts.strict.json +++ b/ets2panda/linter/test_regression/14953.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_regression/14953.ts.relax.json b/ets2panda/linter/test_regression/14953.ts.relax.json deleted file mode 100644 index 130f6099b6..0000000000 --- a/ets2panda/linter/test_regression/14953.ts.relax.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 29, - "column": 36, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 30, - "column": 3, - "problem": "ComputedPropertyName", - "suggest": "", - "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)" - }, - { - "line": 37, - "column": 3, - "problem": "ComputedPropertyName", - "suggest": "", - "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)" - }, - { - "line": 34, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property '['b']' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property '['b']' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 35, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property '[T.A]' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property '[T.A]' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 36, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property '[T.B]' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property '[T.B]' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 37, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property '[str1]' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property '[str1]' has no initializer and is not definitely assigned in the constructor." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_regression/15086.ts.json b/ets2panda/linter/test_regression/15086.ts.json new file mode 100644 index 0000000000..ad85bf6b84 --- /dev/null +++ b/ets2panda/linter/test_regression/15086.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test_regression/15086.ts.relax.json b/ets2panda/linter/test_regression/15086.ts.relax.json deleted file mode 100644 index c2495eb8c3..0000000000 --- a/ets2panda/linter/test_regression/15086.ts.relax.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} diff --git a/ets2panda/linter/test_regression/15086.ts.strict.json b/ets2panda/linter/test_regression/15086.ts.strict.json deleted file mode 100644 index c2495eb8c3..0000000000 --- a/ets2panda/linter/test_regression/15086.ts.strict.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} diff --git a/ets2panda/linter/test_regression/15431.ts.relax.json b/ets2panda/linter/test_regression/15431.ts.json similarity index 100% rename from ets2panda/linter/test_regression/15431.ts.relax.json rename to ets2panda/linter/test_regression/15431.ts.json diff --git a/ets2panda/linter/test_regression/15497.ts.relax.json b/ets2panda/linter/test_regression/15497.ts.json similarity index 100% rename from ets2panda/linter/test_regression/15497.ts.relax.json rename to ets2panda/linter/test_regression/15497.ts.json diff --git a/ets2panda/linter/test_rules/rule1.ts.autofix.json b/ets2panda/linter/test_rules/rule1.ts.autofix.json index 383a690f5d..5392f3c3b7 100644 --- a/ets2panda/linter/test_rules/rule1.ts.autofix.json +++ b/ets2panda/linter/test_rules/rule1.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule1.ts.strict.json b/ets2panda/linter/test_rules/rule1.ts.json similarity index 98% rename from ets2panda/linter/test_rules/rule1.ts.strict.json rename to ets2panda/linter/test_rules/rule1.ts.json index 35adef8d5a..873c706475 100644 --- a/ets2panda/linter/test_rules/rule1.ts.strict.json +++ b/ets2panda/linter/test_rules/rule1.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule1.ts.relax.json b/ets2panda/linter/test_rules/rule1.ts.relax.json deleted file mode 100644 index 6038bcaea7..0000000000 --- a/ets2panda/linter/test_rules/rule1.ts.relax.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 9, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 24, - "column": 9, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 43, - "column": 3, - "problem": "ComputedPropertyName", - "suggest": "", - "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)" - }, - { - "line": 51, - "column": 3, - "problem": "ComputedPropertyName", - "suggest": "", - "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule102.ts.strict.json b/ets2panda/linter/test_rules/rule102.ts.json similarity index 97% rename from ets2panda/linter/test_rules/rule102.ts.strict.json rename to ets2panda/linter/test_rules/rule102.ts.json index 0cd7fc8098..95ce866e08 100644 --- a/ets2panda/linter/test_rules/rule102.ts.strict.json +++ b/ets2panda/linter/test_rules/rule102.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule102.ts.relax.json b/ets2panda/linter/test_rules/rule102.ts.relax.json deleted file mode 100644 index 0cd7fc8098..0000000000 --- a/ets2panda/linter/test_rules/rule102.ts.relax.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 1, - "problem": "InterfaceMerging", - "suggest": "", - "rule": "Declaration merging is not supported (arkts-no-decl-merging)" - }, - { - "line": 17, - "column": 18, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 19, - "column": 1, - "problem": "InterfaceMerging", - "suggest": "", - "rule": "Declaration merging is not supported (arkts-no-decl-merging)" - }, - { - "line": 20, - "column": 18, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 23, - "column": 1, - "problem": "IntefaceExtendDifProps", - "suggest": "", - "rule": "Interface can not extend interfaces with the same method (arkts-no-extend-same-prop)" - }, - { - "line": 24, - "column": 18, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 35, - "column": 16, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 45, - "column": 1, - "problem": "InterfaceMerging", - "suggest": "", - "rule": "Declaration merging is not supported (arkts-no-decl-merging)" - }, - { - "line": 55, - "column": 1, - "problem": "InterfaceMerging", - "suggest": "", - "rule": "Declaration merging is not supported (arkts-no-decl-merging)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule103.ts.strict.json b/ets2panda/linter/test_rules/rule103.ts.json similarity index 97% rename from ets2panda/linter/test_rules/rule103.ts.strict.json rename to ets2panda/linter/test_rules/rule103.ts.json index 82f8d331b9..f1885e1046 100644 --- a/ets2panda/linter/test_rules/rule103.ts.strict.json +++ b/ets2panda/linter/test_rules/rule103.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule103.ts.relax.json b/ets2panda/linter/test_rules/rule103.ts.relax.json deleted file mode 100644 index 01a1813511..0000000000 --- a/ets2panda/linter/test_rules/rule103.ts.relax.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 1, - "problem": "InterfaceMerging", - "suggest": "", - "rule": "Declaration merging is not supported (arkts-no-decl-merging)" - }, - { - "line": 17, - "column": 28, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 20, - "column": 1, - "problem": "InterfaceMerging", - "suggest": "", - "rule": "Declaration merging is not supported (arkts-no-decl-merging)" - }, - { - "line": 24, - "column": 1, - "problem": "InterfaceMerging", - "suggest": "", - "rule": "Declaration merging is not supported (arkts-no-decl-merging)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule104.ts.strict.json b/ets2panda/linter/test_rules/rule104.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule104.ts.strict.json rename to ets2panda/linter/test_rules/rule104.ts.json index d86c8262c4..93315a2427 100644 --- a/ets2panda/linter/test_rules/rule104.ts.strict.json +++ b/ets2panda/linter/test_rules/rule104.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule104.ts.relax.json b/ets2panda/linter/test_rules/rule104.ts.relax.json deleted file mode 100644 index d86c8262c4..0000000000 --- a/ets2panda/linter/test_rules/rule104.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 20, - "column": 37, - "problem": "InterfaceExtendsClass", - "suggest": "", - "rule": "Interfaces cannot extend classes (arkts-extends-only-class)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule106.ts.relax.json b/ets2panda/linter/test_rules/rule106.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule106.ts.relax.json rename to ets2panda/linter/test_rules/rule106.ts.json index f4388b8681..7923677d02 100644 --- a/ets2panda/linter/test_rules/rule106.ts.relax.json +++ b/ets2panda/linter/test_rules/rule106.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule106.ts.strict.json b/ets2panda/linter/test_rules/rule106.ts.strict.json deleted file mode 100644 index f4388b8681..0000000000 --- a/ets2panda/linter/test_rules/rule106.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 19, - "problem": "ConstructorFuncs", - "suggest": "", - "rule": "Constructor function type is not supported (arkts-no-ctor-signatures-funcs)" - }, - { - "line": 29, - "column": 29, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule111.ts.strict.json b/ets2panda/linter/test_rules/rule111.ts.json similarity index 96% rename from ets2panda/linter/test_rules/rule111.ts.strict.json rename to ets2panda/linter/test_rules/rule111.ts.json index 03e6a6a196..971371b25b 100644 --- a/ets2panda/linter/test_rules/rule111.ts.strict.json +++ b/ets2panda/linter/test_rules/rule111.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule111.ts.relax.json b/ets2panda/linter/test_rules/rule111.ts.relax.json deleted file mode 100644 index 03e6a6a196..0000000000 --- a/ets2panda/linter/test_rules/rule111.ts.relax.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 19, - "column": 5, - "problem": "EnumMemberNonConstInit", - "suggest": "", - "rule": "Enumeration members can be initialized only with compile time expressions of the same type (arkts-no-enum-mixed-types)" - }, - { - "line": 26, - "column": 5, - "problem": "EnumMemberNonConstInit", - "suggest": "", - "rule": "Enumeration members can be initialized only with compile time expressions of the same type (arkts-no-enum-mixed-types)" - }, - { - "line": 28, - "column": 5, - "problem": "EnumMemberNonConstInit", - "suggest": "", - "rule": "Enumeration members can be initialized only with compile time expressions of the same type (arkts-no-enum-mixed-types)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule113.ts.relax.json b/ets2panda/linter/test_rules/rule113.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule113.ts.relax.json rename to ets2panda/linter/test_rules/rule113.ts.json index 755ab330fc..9463869c22 100644 --- a/ets2panda/linter/test_rules/rule113.ts.relax.json +++ b/ets2panda/linter/test_rules/rule113.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule113.ts.strict.json b/ets2panda/linter/test_rules/rule113.ts.strict.json deleted file mode 100644 index 755ab330fc..0000000000 --- a/ets2panda/linter/test_rules/rule113.ts.strict.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 1, - "problem": "EnumMerging", - "suggest": "", - "rule": "\"enum\" declaration merging is not supported (arkts-no-enum-merging)" - }, - { - "line": 20, - "column": 1, - "problem": "EnumMerging", - "suggest": "", - "rule": "\"enum\" declaration merging is not supported (arkts-no-enum-merging)" - }, - { - "line": 23, - "column": 1, - "problem": "EnumMerging", - "suggest": "", - "rule": "\"enum\" declaration merging is not supported (arkts-no-enum-merging)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule114.ts.relax.json b/ets2panda/linter/test_rules/rule114.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule114.ts.relax.json rename to ets2panda/linter/test_rules/rule114.ts.json index 7ed1a16873..a4a46c2547 100644 --- a/ets2panda/linter/test_rules/rule114.ts.relax.json +++ b/ets2panda/linter/test_rules/rule114.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule116.ts.relax.json b/ets2panda/linter/test_rules/rule116.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule116.ts.relax.json rename to ets2panda/linter/test_rules/rule116.ts.json index 47874cd20a..f743f1b37a 100644 --- a/ets2panda/linter/test_rules/rule116.ts.relax.json +++ b/ets2panda/linter/test_rules/rule116.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule116.ts.strict.json b/ets2panda/linter/test_rules/rule116.ts.strict.json deleted file mode 100644 index 47874cd20a..0000000000 --- a/ets2panda/linter/test_rules/rule116.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 18, - "column": 5, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule120.ts.autofix.json b/ets2panda/linter/test_rules/rule120.ts.autofix.json index 846f7a6663..b4c2fba633 100644 --- a/ets2panda/linter/test_rules/rule120.ts.autofix.json +++ b/ets2panda/linter/test_rules/rule120.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule120.ts.strict.json b/ets2panda/linter/test_rules/rule120.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule120.ts.strict.json rename to ets2panda/linter/test_rules/rule120.ts.json index bbd6d72568..bc27fc48b6 100644 --- a/ets2panda/linter/test_rules/rule120.ts.strict.json +++ b/ets2panda/linter/test_rules/rule120.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule120.ts.relax.json b/ets2panda/linter/test_rules/rule120.ts.relax.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule120.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule121.ts.relax.json b/ets2panda/linter/test_rules/rule121.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule121.ts.relax.json rename to ets2panda/linter/test_rules/rule121.ts.json index ab906c1817..4399e2cc75 100644 --- a/ets2panda/linter/test_rules/rule121.ts.relax.json +++ b/ets2panda/linter/test_rules/rule121.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule121.ts.strict.json b/ets2panda/linter/test_rules/rule121.ts.strict.json deleted file mode 100644 index ab906c1817..0000000000 --- a/ets2panda/linter/test_rules/rule121.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 1, - "problem": "ImportAssignment", - "suggest": "", - "rule": "\"require\" and \"import\" assignment are not supported (arkts-no-require)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule126.ts.relax.json b/ets2panda/linter/test_rules/rule126.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule126.ts.relax.json rename to ets2panda/linter/test_rules/rule126.ts.json index 655712b06d..269824ea74 100644 --- a/ets2panda/linter/test_rules/rule126.ts.relax.json +++ b/ets2panda/linter/test_rules/rule126.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule126.ts.strict.json b/ets2panda/linter/test_rules/rule126.ts.strict.json deleted file mode 100644 index 655712b06d..0000000000 --- a/ets2panda/linter/test_rules/rule126.ts.strict.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 5, - "problem": "ExportAssignment", - "suggest": "", - "rule": "\"export = ...\" assignment is not supported (arkts-no-export-assignment)" - }, - { - "line": 25, - "column": 5, - "problem": "ImportAssignment", - "suggest": "", - "rule": "\"require\" and \"import\" assignment are not supported (arkts-no-require)" - }, - { - "line": 27, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule128.ts.strict.json b/ets2panda/linter/test_rules/rule128.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule128.ts.strict.json rename to ets2panda/linter/test_rules/rule128.ts.json index 8dc4436802..0ccbff35da 100644 --- a/ets2panda/linter/test_rules/rule128.ts.strict.json +++ b/ets2panda/linter/test_rules/rule128.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule128.ts.relax.json b/ets2panda/linter/test_rules/rule128.ts.relax.json deleted file mode 100644 index 8dc4436802..0000000000 --- a/ets2panda/linter/test_rules/rule128.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 1, - "problem": "ShorthandAmbientModuleDecl", - "suggest": "", - "rule": "Ambient module declaration is not supported (arkts-no-ambient-decls)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule129.ts.relax.json b/ets2panda/linter/test_rules/rule129.ts.json similarity index 96% rename from ets2panda/linter/test_rules/rule129.ts.relax.json rename to ets2panda/linter/test_rules/rule129.ts.json index 6139a0168a..329894278a 100644 --- a/ets2panda/linter/test_rules/rule129.ts.relax.json +++ b/ets2panda/linter/test_rules/rule129.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule129.ts.strict.json b/ets2panda/linter/test_rules/rule129.ts.strict.json deleted file mode 100644 index 6139a0168a..0000000000 --- a/ets2panda/linter/test_rules/rule129.ts.strict.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 19, - "column": 9, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)" - }, - { - "line": 17, - "column": 5, - "problem": "ShorthandAmbientModuleDecl", - "suggest": "", - "rule": "Ambient module declaration is not supported (arkts-no-ambient-decls)" - }, - { - "line": 17, - "column": 5, - "problem": "WildcardsInModuleName", - "suggest": "", - "rule": "Wildcards in module names are not supported (arkts-no-module-wildcards)" - }, - { - "line": 23, - "column": 5, - "problem": "ImportAfterStatement", - "suggest": "", - "rule": "\"import\" statements after other statements are not allowed (arkts-no-misplaced-imports)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule130.ts.relax.json b/ets2panda/linter/test_rules/rule130.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule130.ts.relax.json rename to ets2panda/linter/test_rules/rule130.ts.json index c64d59909c..190ce38332 100644 --- a/ets2panda/linter/test_rules/rule130.ts.relax.json +++ b/ets2panda/linter/test_rules/rule130.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule130.ts.strict.json b/ets2panda/linter/test_rules/rule130.ts.strict.json deleted file mode 100644 index c64d59909c..0000000000 --- a/ets2panda/linter/test_rules/rule130.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 14, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 18, - "column": 1, - "problem": "UMDModuleDefinition", - "suggest": "", - "rule": "Universal module definitions (UMD) are not supported (arkts-no-umd)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule132.ts.relax.json b/ets2panda/linter/test_rules/rule132.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule132.ts.relax.json rename to ets2panda/linter/test_rules/rule132.ts.json index ff45ff9f28..7407b0be96 100644 --- a/ets2panda/linter/test_rules/rule132.ts.relax.json +++ b/ets2panda/linter/test_rules/rule132.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule132.ts.strict.json b/ets2panda/linter/test_rules/rule132.ts.strict.json deleted file mode 100644 index ff45ff9f28..0000000000 --- a/ets2panda/linter/test_rules/rule132.ts.strict.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 16, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 22, - "column": 48, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 22, - "column": 37, - "problem": "NewTarget", - "suggest": "", - "rule": "\"new.target\" is not supported (arkts-no-new-target)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule134.ts.relax.json b/ets2panda/linter/test_rules/rule134.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule134.ts.relax.json rename to ets2panda/linter/test_rules/rule134.ts.json index 87e4d6d23f..9a04a4e6fd 100644 --- a/ets2panda/linter/test_rules/rule134.ts.relax.json +++ b/ets2panda/linter/test_rules/rule134.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule136.ts.strict.json b/ets2panda/linter/test_rules/rule136.ts.json similarity index 97% rename from ets2panda/linter/test_rules/rule136.ts.strict.json rename to ets2panda/linter/test_rules/rule136.ts.json index 6d11baeb2f..4d7df973f0 100644 --- a/ets2panda/linter/test_rules/rule136.ts.strict.json +++ b/ets2panda/linter/test_rules/rule136.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule136.ts.relax.json b/ets2panda/linter/test_rules/rule136.ts.relax.json deleted file mode 100644 index 27801ce2f1..0000000000 --- a/ets2panda/linter/test_rules/rule136.ts.relax.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 5, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 20, - "column": 3, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 26, - "column": 3, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 27, - "column": 12, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule137.ts.strict.json b/ets2panda/linter/test_rules/rule137.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule137.ts.strict.json rename to ets2panda/linter/test_rules/rule137.ts.json index ae76a6f5a6..cae134c3d6 100644 --- a/ets2panda/linter/test_rules/rule137.ts.strict.json +++ b/ets2panda/linter/test_rules/rule137.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule137.ts.relax.json b/ets2panda/linter/test_rules/rule137.ts.relax.json deleted file mode 100644 index 7b32678bbe..0000000000 --- a/ets2panda/linter/test_rules/rule137.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 20, - "column": 5, - "problem": "GlobalThis", - "suggest": "", - "rule": "\"globalThis\" is not supported (arkts-no-globalthis)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule138.ts.relax.json b/ets2panda/linter/test_rules/rule138.ts.json similarity index 96% rename from ets2panda/linter/test_rules/rule138.ts.relax.json rename to ets2panda/linter/test_rules/rule138.ts.json index babfb35215..c5fdf55db5 100644 --- a/ets2panda/linter/test_rules/rule138.ts.relax.json +++ b/ets2panda/linter/test_rules/rule138.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule138.ts.strict.json b/ets2panda/linter/test_rules/rule138.ts.strict.json deleted file mode 100644 index babfb35215..0000000000 --- a/ets2panda/linter/test_rules/rule138.ts.strict.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 15, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 22, - "column": 22, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 25, - "column": 14, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 30, - "column": 12, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule140.ts.strict.json b/ets2panda/linter/test_rules/rule139.ts.json similarity index 96% rename from ets2panda/linter/test_rules/rule140.ts.strict.json rename to ets2panda/linter/test_rules/rule139.ts.json index 837f6f4256..f0add014bf 100644 --- a/ets2panda/linter/test_rules/rule140.ts.strict.json +++ b/ets2panda/linter/test_rules/rule139.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule139.ts.relax.json b/ets2panda/linter/test_rules/rule139.ts.relax.json deleted file mode 100644 index 74bf30228c..0000000000 --- a/ets2panda/linter/test_rules/rule139.ts.relax.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 21, - "column": 35, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 35, - "column": 1, - "problem": "MethodReassignment", - "suggest": "", - "rule": "Reassigning object methods is not supported (arkts-no-method-reassignment)" - }, - { - "line": 35, - "column": 1, - "problem": "PropertyDeclOnFunction", - "suggest": "", - "rule": "Declaring properties on functions is not supported (arkts-no-func-props)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule14.ts.relax.json b/ets2panda/linter/test_rules/rule14.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule14.ts.relax.json rename to ets2panda/linter/test_rules/rule14.ts.json index 0c64ee2b8c..ec4469b701 100644 --- a/ets2panda/linter/test_rules/rule14.ts.relax.json +++ b/ets2panda/linter/test_rules/rule14.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule14.ts.strict.json b/ets2panda/linter/test_rules/rule14.ts.strict.json deleted file mode 100644 index 0c64ee2b8c..0000000000 --- a/ets2panda/linter/test_rules/rule14.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 28, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 18, - "column": 5, - "problem": "CallSignature", - "suggest": "", - "rule": "Use \"class\" instead of a type with call signature (arkts-no-call-signatures)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule139.ts.strict.json b/ets2panda/linter/test_rules/rule140.ts.json similarity index 96% rename from ets2panda/linter/test_rules/rule139.ts.strict.json rename to ets2panda/linter/test_rules/rule140.ts.json index 837f6f4256..f0add014bf 100644 --- a/ets2panda/linter/test_rules/rule139.ts.strict.json +++ b/ets2panda/linter/test_rules/rule140.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule140.ts.relax.json b/ets2panda/linter/test_rules/rule140.ts.relax.json deleted file mode 100644 index 74bf30228c..0000000000 --- a/ets2panda/linter/test_rules/rule140.ts.relax.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 21, - "column": 35, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 35, - "column": 1, - "problem": "MethodReassignment", - "suggest": "", - "rule": "Reassigning object methods is not supported (arkts-no-method-reassignment)" - }, - { - "line": 35, - "column": 1, - "problem": "PropertyDeclOnFunction", - "suggest": "", - "rule": "Declaring properties on functions is not supported (arkts-no-func-props)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule142.ts.relax.json b/ets2panda/linter/test_rules/rule142.ts.json similarity index 96% rename from ets2panda/linter/test_rules/rule142.ts.relax.json rename to ets2panda/linter/test_rules/rule142.ts.json index 99f1066aec..677f8a9167 100644 --- a/ets2panda/linter/test_rules/rule142.ts.relax.json +++ b/ets2panda/linter/test_rules/rule142.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule142.ts.strict.json b/ets2panda/linter/test_rules/rule142.ts.strict.json deleted file mode 100644 index 99f1066aec..0000000000 --- a/ets2panda/linter/test_rules/rule142.ts.strict.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 21, - "problem": "ConstAssertion", - "suggest": "", - "rule": "\"as const\" assertions are not supported (arkts-no-as-const)" - }, - { - "line": 20, - "column": 22, - "problem": "ConstAssertion", - "suggest": "", - "rule": "\"as const\" assertions are not supported (arkts-no-as-const)" - }, - { - "line": 23, - "column": 31, - "problem": "ConstAssertion", - "suggest": "", - "rule": "\"as const\" assertions are not supported (arkts-no-as-const)" - }, - { - "line": 23, - "column": 13, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule143.ts.strict.json b/ets2panda/linter/test_rules/rule143.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule143.ts.strict.json rename to ets2panda/linter/test_rules/rule143.ts.json index 8e0993c908..b6fe800d90 100644 --- a/ets2panda/linter/test_rules/rule143.ts.strict.json +++ b/ets2panda/linter/test_rules/rule143.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule143.ts.relax.json b/ets2panda/linter/test_rules/rule143.ts.relax.json deleted file mode 100644 index 8e0993c908..0000000000 --- a/ets2panda/linter/test_rules/rule143.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 38, - "problem": "ImportAssertion", - "suggest": "", - "rule": "Import assertions are not supported (arkts-no-import-assertions)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule144.ts.strict.json b/ets2panda/linter/test_rules/rule144.ts.json similarity index 99% rename from ets2panda/linter/test_rules/rule144.ts.strict.json rename to ets2panda/linter/test_rules/rule144.ts.json index 55e798673c..1c9d6a1dc8 100644 --- a/ets2panda/linter/test_rules/rule144.ts.strict.json +++ b/ets2panda/linter/test_rules/rule144.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -463,4 +463,4 @@ "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" } ] -} +} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule144.ts.relax.json b/ets2panda/linter/test_rules/rule144.ts.relax.json deleted file mode 100644 index 55e798673c..0000000000 --- a/ets2panda/linter/test_rules/rule144.ts.relax.json +++ /dev/null @@ -1,466 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 1, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 31, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 32, - "column": 1, - "problem": "GlobalThis", - "suggest": "", - "rule": "\"globalThis\" is not supported (arkts-no-globalthis)" - }, - { - "line": 32, - "column": 12, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 56, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 57, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 58, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 58, - "column": 31, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 59, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 61, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 62, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 63, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 64, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 65, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 66, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 67, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 68, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 69, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 70, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 71, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 72, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 73, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 74, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 75, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 76, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 85, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 86, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 86, - "column": 32, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 87, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 87, - "column": 32, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 88, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 90, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 91, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 92, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 93, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 94, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 104, - "column": 32, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 105, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 105, - "column": 28, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 106, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 106, - "column": 32, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 107, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 107, - "column": 37, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 107, - "column": 63, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 108, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 108, - "column": 37, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 109, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 109, - "column": 26, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 110, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 110, - "column": 47, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 111, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 111, - "column": 37, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 112, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 112, - "column": 26, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 113, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 113, - "column": 35, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 114, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 114, - "column": 30, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 115, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 115, - "column": 40, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 116, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 116, - "column": 26, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 117, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 117, - "column": 37, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - } - ] -} diff --git a/ets2panda/linter/test_rules/rule145.ts.strict.json b/ets2panda/linter/test_rules/rule145.ts.json similarity index 98% rename from ets2panda/linter/test_rules/rule145.ts.strict.json rename to ets2panda/linter/test_rules/rule145.ts.json index d6d511999e..d8fdeeeed2 100644 --- a/ets2panda/linter/test_rules/rule145.ts.strict.json +++ b/ets2panda/linter/test_rules/rule145.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule145.ts.relax.json b/ets2panda/linter/test_rules/rule145.ts.relax.json deleted file mode 100644 index d6d511999e..0000000000 --- a/ets2panda/linter/test_rules/rule145.ts.relax.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Property 'n' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'n' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 18, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Property 's' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 's' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 22, - "column": 26, - "problem": "StrictDiagnostic", - "suggest": "Function lacks ending return statement and return type does not include 'undefined'.", - "rule": "Function lacks ending return statement and return type does not include 'undefined'." - }, - { - "line": 31, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Type 'null' is not assignable to type 'number'.", - "rule": "Type 'null' is not assignable to type 'number'." - }, - { - "line": 43, - "column": 19, - "problem": "StrictDiagnostic", - "suggest": "Function lacks ending return statement and return type does not include 'undefined'.", - "rule": "Function lacks ending return statement and return type does not include 'undefined'." - }, - { - "line": 54, - "column": 14, - "problem": "StrictDiagnostic", - "suggest": "Function lacks ending return statement and return type does not include 'undefined'.", - "rule": "Function lacks ending return statement and return type does not include 'undefined'." - }, - { - "line": 57, - "column": 32, - "problem": "StrictDiagnostic", - "suggest": "Function lacks ending return statement and return type does not include 'undefined'.", - "rule": "Function lacks ending return statement and return type does not include 'undefined'." - }, - { - "line": 59, - "column": 14, - "problem": "StrictDiagnostic", - "suggest": "Function lacks ending return statement and return type does not include 'undefined'.", - "rule": "Function lacks ending return statement and return type does not include 'undefined'." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule146.ts.relax.json b/ets2panda/linter/test_rules/rule146.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule146.ts.relax.json rename to ets2panda/linter/test_rules/rule146.ts.json index 1d5753d5c6..188f2d9e2d 100644 --- a/ets2panda/linter/test_rules/rule146.ts.relax.json +++ b/ets2panda/linter/test_rules/rule146.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule146.ts.strict.json b/ets2panda/linter/test_rules/rule146.ts.strict.json deleted file mode 100644 index 1d5753d5c6..0000000000 --- a/ets2panda/linter/test_rules/rule146.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 5, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 23, - "column": 5, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule147.ts.strict.json b/ets2panda/linter/test_rules/rule147.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule147.ts.strict.json rename to ets2panda/linter/test_rules/rule147.ts.json index b24d58aa8a..fde6aea2e9 100644 --- a/ets2panda/linter/test_rules/rule147.ts.strict.json +++ b/ets2panda/linter/test_rules/rule147.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule147.ts.relax.json b/ets2panda/linter/test_rules/rule147.ts.relax.json deleted file mode 100644 index ef8d5232ac..0000000000 --- a/ets2panda/linter/test_rules/rule147.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 5, - "problem": "ImportAfterStatement", - "suggest": "", - "rule": "\"import\" statements after other statements are not allowed (arkts-no-misplaced-imports)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule149.ts.relax.json b/ets2panda/linter/test_rules/rule149.ts.json similarity index 99% rename from ets2panda/linter/test_rules/rule149.ts.relax.json rename to ets2panda/linter/test_rules/rule149.ts.json index 28bc1d6d87..5e2285390e 100644 --- a/ets2panda/linter/test_rules/rule149.ts.relax.json +++ b/ets2panda/linter/test_rules/rule149.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule149.ts.strict.json b/ets2panda/linter/test_rules/rule149.ts.strict.json deleted file mode 100644 index 28bc1d6d87..0000000000 --- a/ets2panda/linter/test_rules/rule149.ts.strict.json +++ /dev/null @@ -1,205 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "http://www.apache.org/licenses/LICENSE-2.0", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 27, - "column": 9, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 28, - "column": 5, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 29, - "column": 11, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 30, - "column": 7, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 38, - "column": 20, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 39, - "column": 6, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 42, - "column": 12, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 45, - "column": 20, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 46, - "column": 8, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 49, - "column": 14, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 58, - "column": 22, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 60, - "column": 7, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 68, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 70, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 71, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 72, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 74, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 75, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 76, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 78, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 79, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 81, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 87, - "column": 39, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 91, - "column": 12, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 96, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 98, - "column": 8, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 116, - "column": 42, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_regression/15497.ts.strict.json b/ets2panda/linter/test_rules/rule14_1.ts.json similarity index 100% rename from ets2panda/linter/test_regression/15497.ts.strict.json rename to ets2panda/linter/test_rules/rule14_1.ts.json diff --git a/ets2panda/linter/test_rules/rule14_1.ts.relax.json b/ets2panda/linter/test_rules/rule14_1.ts.relax.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule14_1.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule14_1.ts.strict.json b/ets2panda/linter/test_rules/rule14_1.ts.strict.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule14_1.ts.strict.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule15.ts.relax.json b/ets2panda/linter/test_rules/rule15.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule15.ts.relax.json rename to ets2panda/linter/test_rules/rule15.ts.json index 025a3ea194..9566b2e4fa 100644 --- a/ets2panda/linter/test_rules/rule15.ts.relax.json +++ b/ets2panda/linter/test_rules/rule15.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule15.ts.strict.json b/ets2panda/linter/test_rules/rule15.ts.strict.json deleted file mode 100644 index 025a3ea194..0000000000 --- a/ets2panda/linter/test_rules/rule15.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 18, - "column": 24, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 19, - "column": 5, - "problem": "ConstructorType", - "suggest": "", - "rule": "Use \"class\" instead of a type with constructor signature (arkts-no-ctor-signatures-type)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule150.ts.relax.json b/ets2panda/linter/test_rules/rule150.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule150.ts.relax.json rename to ets2panda/linter/test_rules/rule150.ts.json index 2521bd90f3..aa085f4c22 100644 --- a/ets2panda/linter/test_rules/rule150.ts.relax.json +++ b/ets2panda/linter/test_rules/rule150.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule150.ts.strict.json b/ets2panda/linter/test_rules/rule150.ts.strict.json deleted file mode 100644 index 2521bd90f3..0000000000 --- a/ets2panda/linter/test_rules/rule150.ts.strict.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 1, - "problem": "ImportAfterStatement" - }, - { - "line": 23, - "column": 1, - "problem": "ImportAfterStatement" - }, - { - "line": 24, - "column": 1, - "problem": "ImportAfterStatement" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule151.ts.relax.json b/ets2panda/linter/test_rules/rule151.ts.json similarity index 99% rename from ets2panda/linter/test_rules/rule151.ts.relax.json rename to ets2panda/linter/test_rules/rule151.ts.json index 5bab1a3eee..0dac4afe26 100644 --- a/ets2panda/linter/test_rules/rule151.ts.relax.json +++ b/ets2panda/linter/test_rules/rule151.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule151.ts.strict.json b/ets2panda/linter/test_rules/rule151.ts.strict.json deleted file mode 100644 index 86c0f49acf..0000000000 --- a/ets2panda/linter/test_rules/rule151.ts.strict.json +++ /dev/null @@ -1,683 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 17, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 20, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 21, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 22, - "column": 11, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 25, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 26, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 27, - "column": 11, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 29, - "column": 21, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 29, - "column": 35, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 29, - "column": 53, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 35, - "column": 14, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 35, - "column": 28, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 35, - "column": 46, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 35, - "column": 58, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 39, - "column": 14, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 39, - "column": 28, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 39, - "column": 46, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 39, - "column": 58, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 43, - "column": 14, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 43, - "column": 28, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 43, - "column": 46, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 43, - "column": 60, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 48, - "column": 19, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 48, - "column": 33, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 48, - "column": 51, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 48, - "column": 63, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 52, - "column": 19, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 52, - "column": 33, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 52, - "column": 51, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 52, - "column": 63, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 56, - "column": 19, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 56, - "column": 33, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 56, - "column": 51, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 56, - "column": 65, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 60, - "column": 16, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 61, - "column": 12, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 64, - "column": 18, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 64, - "column": 32, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 64, - "column": 50, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 66, - "column": 15, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 67, - "column": 17, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 70, - "column": 13, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 71, - "column": 15, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 77, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 78, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 79, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 80, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 82, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 83, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 85, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 86, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 87, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 88, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 90, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 91, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 93, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 94, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 95, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 96, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 98, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 99, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 103, - "column": 12, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 105, - "column": 11, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 106, - "column": 11, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 108, - "column": 18, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 109, - "column": 18, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 114, - "column": 25, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 115, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 119, - "column": 25, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 119, - "column": 36, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 136, - "column": 25, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 136, - "column": 38, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 148, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 149, - "column": 1, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 154, - "column": 32, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 154, - "column": 45, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 154, - "column": 58, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 162, - "column": 32, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 162, - "column": 47, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 162, - "column": 60, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 170, - "column": 28, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 172, - "column": 22, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 174, - "column": 30, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 176, - "column": 19, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 177, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 178, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 179, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 181, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 182, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 183, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 184, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 185, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 188, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 189, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 190, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule152.ts.strict.json b/ets2panda/linter/test_rules/rule152.ts.json similarity index 64% rename from ets2panda/linter/test_rules/rule152.ts.strict.json rename to ets2panda/linter/test_rules/rule152.ts.json index 4710c9dfe1..611fe51064 100644 --- a/ets2panda/linter/test_rules/rule152.ts.strict.json +++ b/ets2panda/linter/test_rules/rule152.ts.json @@ -1,4 +1,18 @@ { + "copyright": [ + "Copyright (c) 2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], "nodes": [ { "line": 23, diff --git a/ets2panda/linter/test_rules/rule152.ts.relax.json b/ets2panda/linter/test_rules/rule152.ts.relax.json deleted file mode 100644 index ba0504709d..0000000000 --- a/ets2panda/linter/test_rules/rule152.ts.relax.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "nodes": [ - { - "line": 31, - "column": 23, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 32, - "column": 23, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 17, - "column": 4, - "problem": "StrictDiagnostic", - "suggest": "Property 'getName' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'getName' has no initializer and is not definitely assigned in the constructor." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule16.ts.relax.json b/ets2panda/linter/test_rules/rule16.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule16.ts.relax.json rename to ets2panda/linter/test_rules/rule16.ts.json index 1e376b4960..11bad3ff43 100644 --- a/ets2panda/linter/test_rules/rule16.ts.relax.json +++ b/ets2panda/linter/test_rules/rule16.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule16.ts.strict.json b/ets2panda/linter/test_rules/rule16.ts.strict.json deleted file mode 100644 index 1e376b4960..0000000000 --- a/ets2panda/linter/test_rules/rule16.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 5, - "problem": "MultipleStaticBlocks", - "suggest": "", - "rule": "Only one static block is supported (arkts-no-multiple-static-blocks)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule17.ts.strict.json b/ets2panda/linter/test_rules/rule17.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule17.ts.strict.json rename to ets2panda/linter/test_rules/rule17.ts.json index 0394329541..a41a66c745 100644 --- a/ets2panda/linter/test_rules/rule17.ts.strict.json +++ b/ets2panda/linter/test_rules/rule17.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule17.ts.relax.json b/ets2panda/linter/test_rules/rule17.ts.relax.json deleted file mode 100644 index 507c7ed6a9..0000000000 --- a/ets2panda/linter/test_rules/rule17.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 5, - "problem": "IndexMember", - "suggest": "", - "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule19.ts.relax.json b/ets2panda/linter/test_rules/rule19.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule19.ts.relax.json rename to ets2panda/linter/test_rules/rule19.ts.json index 68a4df9459..00e75d55db 100644 --- a/ets2panda/linter/test_rules/rule19.ts.relax.json +++ b/ets2panda/linter/test_rules/rule19.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule19.ts.strict.json b/ets2panda/linter/test_rules/rule19.ts.strict.json deleted file mode 100644 index 68a4df9459..0000000000 --- a/ets2panda/linter/test_rules/rule19.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 26, - "column": 17, - "problem": "IntersectionType", - "suggest": "", - "rule": "Use inheritance instead of intersection types (arkts-no-intersection-types)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule2.ts.relax.json b/ets2panda/linter/test_rules/rule2.ts.json similarity index 96% rename from ets2panda/linter/test_rules/rule2.ts.relax.json rename to ets2panda/linter/test_rules/rule2.ts.json index d33b09d2df..47b6eb103f 100644 --- a/ets2panda/linter/test_rules/rule2.ts.relax.json +++ b/ets2panda/linter/test_rules/rule2.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule2.ts.strict.json b/ets2panda/linter/test_rules/rule2.ts.strict.json deleted file mode 100644 index d33b09d2df..0000000000 --- a/ets2panda/linter/test_rules/rule2.ts.strict.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 13, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 19, - "column": 9, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 20, - "column": 4, - "problem": "ComputedPropertyName", - "suggest": "", - "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule21.ts.strict.json b/ets2panda/linter/test_rules/rule21.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule21.ts.strict.json rename to ets2panda/linter/test_rules/rule21.ts.json index c676a821b1..cf5e9e32f4 100644 --- a/ets2panda/linter/test_rules/rule21.ts.strict.json +++ b/ets2panda/linter/test_rules/rule21.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule21.ts.relax.json b/ets2panda/linter/test_rules/rule21.ts.relax.json deleted file mode 100644 index c676a821b1..0000000000 --- a/ets2panda/linter/test_rules/rule21.ts.relax.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 16, - "problem": "ThisType", - "suggest": "", - "rule": "Type notation using \"this\" is not supported (arkts-no-typing-with-this)" - }, - { - "line": 23, - "column": 10, - "problem": "ThisType", - "suggest": "", - "rule": "Type notation using \"this\" is not supported (arkts-no-typing-with-this)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule21_1.ts.relax.json b/ets2panda/linter/test_rules/rule21_1.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule21_1.ts.relax.json rename to ets2panda/linter/test_rules/rule21_1.ts.json index 15d6bd493a..4e9bd7bbaf 100644 --- a/ets2panda/linter/test_rules/rule21_1.ts.relax.json +++ b/ets2panda/linter/test_rules/rule21_1.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule21_1.ts.strict.json b/ets2panda/linter/test_rules/rule21_1.ts.strict.json deleted file mode 100644 index 15d6bd493a..0000000000 --- a/ets2panda/linter/test_rules/rule21_1.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 23, - "column": 16, - "problem": "ThisType", - "suggest": "", - "rule": "Type notation using \"this\" is not supported (arkts-no-typing-with-this)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule21_2.ts.relax.json b/ets2panda/linter/test_rules/rule21_2.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule21_2.ts.relax.json rename to ets2panda/linter/test_rules/rule21_2.ts.json index f192c53f94..1c2880ab1b 100644 --- a/ets2panda/linter/test_rules/rule21_2.ts.relax.json +++ b/ets2panda/linter/test_rules/rule21_2.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule21_2.ts.strict.json b/ets2panda/linter/test_rules/rule21_2.ts.strict.json deleted file mode 100644 index f192c53f94..0000000000 --- a/ets2panda/linter/test_rules/rule21_2.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 19, - "column": 16, - "problem": "ThisType", - "suggest": "", - "rule": "Type notation using \"this\" is not supported (arkts-no-typing-with-this)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule21_3.ts.relax.json b/ets2panda/linter/test_rules/rule21_3.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule21_3.ts.relax.json rename to ets2panda/linter/test_rules/rule21_3.ts.json index 9738fc8ff4..6a6e360abb 100644 --- a/ets2panda/linter/test_rules/rule21_3.ts.relax.json +++ b/ets2panda/linter/test_rules/rule21_3.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule21_3.ts.strict.json b/ets2panda/linter/test_rules/rule21_3.ts.strict.json deleted file mode 100644 index 9738fc8ff4..0000000000 --- a/ets2panda/linter/test_rules/rule21_3.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 19, - "column": 16, - "problem": "ThisType", - "suggest": "", - "rule": "Type notation using \"this\" is not supported (arkts-no-typing-with-this)" - }, - { - "line": 26, - "column": 16, - "problem": "ThisType", - "suggest": "", - "rule": "Type notation using \"this\" is not supported (arkts-no-typing-with-this)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule22.ts.relax.json b/ets2panda/linter/test_rules/rule22.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule22.ts.relax.json rename to ets2panda/linter/test_rules/rule22.ts.json index e031fd84ac..814e0599a6 100644 --- a/ets2panda/linter/test_rules/rule22.ts.relax.json +++ b/ets2panda/linter/test_rules/rule22.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule22.ts.strict.json b/ets2panda/linter/test_rules/rule22.ts.strict.json deleted file mode 100644 index e031fd84ac..0000000000 --- a/ets2panda/linter/test_rules/rule22.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 13, - "problem": "ConditionalType", - "suggest": "", - "rule": "Conditional types are not supported (arkts-no-conditional-types)" - }, - { - "line": 18, - "column": 13, - "problem": "ConditionalType", - "suggest": "", - "rule": "Conditional types are not supported (arkts-no-conditional-types)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/dynamic_import.ts.relax.json b/ets2panda/linter/test_rules/rule25.ts.autofix.json old mode 100755 new mode 100644 similarity index 37% rename from ets2panda/linter/test/dynamic_import.ts.relax.json rename to ets2panda/linter/test_rules/rule25.ts.autofix.json index e361de54ca..e5a1aaa842 --- a/ets2panda/linter/test/dynamic_import.ts.relax.json +++ b/ets2panda/linter/test_rules/rule25.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -14,19 +14,40 @@ "limitations under the License." ], "nodes": [ - { - "line": 17, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, { "line": 18, "column": 9, - "problem": "AnyType", + "problem": "ParameterProperties", + "autofixable": true, + "autofix": [ + { + "start": 624, + "end": 624, + "replacementText": "protected ssn: string;\nprivate firstName: string;\nprivate lastName: string;\n" + }, + { + "start": 645, + "end": 666, + "replacementText": "ssn: string" + }, + { + "start": 676, + "end": 701, + "replacementText": "firstName: string" + }, + { + "start": 711, + "end": 735, + "replacementText": "lastName: string" + }, + { + "start": 742, + "end": 840, + "replacementText": "{\n this.ssn = ssn;\n this.firstName = firstName;\n this.lastName = lastName;\n this.ssn = ssn;\n this.firstName = firstName;\n this.lastName = lastName;\n}" + } + ], "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" + "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" } ] } \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule114.ts.strict.json b/ets2panda/linter/test_rules/rule25.ts.json similarity index 76% rename from ets2panda/linter/test_rules/rule114.ts.strict.json rename to ets2panda/linter/test_rules/rule25.ts.json index 7ed1a16873..fa30edb0f6 100644 --- a/ets2panda/linter/test_rules/rule114.ts.strict.json +++ b/ets2panda/linter/test_rules/rule25.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -15,11 +15,11 @@ ], "nodes": [ { - "line": 20, + "line": 18, "column": 9, - "problem": "NamespaceAsObject", + "problem": "ParameterProperties", "suggest": "", - "rule": "Namespaces cannot be used as objects (arkts-no-ns-as-obj)" + "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" } ] } \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule25.ts.relax.json b/ets2panda/linter/test_rules/rule25.ts.relax.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule25.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule27.ts.relax.json b/ets2panda/linter/test_rules/rule27.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule27.ts.relax.json rename to ets2panda/linter/test_rules/rule27.ts.json index 94c448a4bd..cdbd4c2cf0 100644 --- a/ets2panda/linter/test_rules/rule27.ts.relax.json +++ b/ets2panda/linter/test_rules/rule27.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule27.ts.strict.json b/ets2panda/linter/test_rules/rule27.ts.strict.json deleted file mode 100644 index 94c448a4bd..0000000000 --- a/ets2panda/linter/test_rules/rule27.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 5, - "problem": "ConstructorIface", - "suggest": "", - "rule": "Construct signatures are not supported in interfaces (arkts-no-ctor-signatures-iface)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule28.ts.relax.json b/ets2panda/linter/test_rules/rule28.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule28.ts.relax.json rename to ets2panda/linter/test_rules/rule28.ts.json index 7b39f5caf2..c14d1f08ce 100644 --- a/ets2panda/linter/test_rules/rule28.ts.relax.json +++ b/ets2panda/linter/test_rules/rule28.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule28.ts.strict.json b/ets2panda/linter/test_rules/rule28.ts.strict.json deleted file mode 100644 index 7b39f5caf2..0000000000 --- a/ets2panda/linter/test_rules/rule28.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 14, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 17, - "column": 10, - "problem": "IndexedAccessType", - "suggest": "", - "rule": "Indexed access types are not supported (arkts-no-aliases-by-index)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule29.ts.autofix.json b/ets2panda/linter/test_rules/rule29.ts.autofix.json index d7a662d664..bda7cae238 100644 --- a/ets2panda/linter/test_rules/rule29.ts.autofix.json +++ b/ets2panda/linter/test_rules/rule29.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule29.ts.strict.json b/ets2panda/linter/test_rules/rule29.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule29.ts.strict.json rename to ets2panda/linter/test_rules/rule29.ts.json index 94aef882f1..dbf74bebef 100644 --- a/ets2panda/linter/test_rules/rule29.ts.strict.json +++ b/ets2panda/linter/test_rules/rule29.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule29.ts.relax.json b/ets2panda/linter/test_rules/rule29.ts.relax.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule29.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule134.ts.strict.json b/ets2panda/linter/test_rules/rule3.ts.autofix.json similarity index 75% rename from ets2panda/linter/test_rules/rule134.ts.strict.json rename to ets2panda/linter/test_rules/rule3.ts.autofix.json index 87e4d6d23f..af257bbddb 100644 --- a/ets2panda/linter/test_rules/rule134.ts.strict.json +++ b/ets2panda/linter/test_rules/rule3.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -15,11 +15,12 @@ ], "nodes": [ { - "line": 16, + "line": 18, "column": 5, - "problem": "DefiniteAssignment", + "problem": "PrivateIdentifier", + "autofixable": true, "suggest": "", - "rule": "Definite assignment assertions are not supported (arkts-no-definite-assignment)" + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" } ] } \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule3.ts.strict.json b/ets2panda/linter/test_rules/rule3.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule3.ts.strict.json rename to ets2panda/linter/test_rules/rule3.ts.json index f0c88d9365..fec56a39b6 100644 --- a/ets2panda/linter/test_rules/rule3.ts.strict.json +++ b/ets2panda/linter/test_rules/rule3.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule3.ts.relax.json b/ets2panda/linter/test_rules/rule3.ts.relax.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule3.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule30.ts.json b/ets2panda/linter/test_rules/rule30.ts.json new file mode 100644 index 0000000000..0f0ef2c3a3 --- /dev/null +++ b/ets2panda/linter/test_rules/rule30.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule30.ts.relax.json b/ets2panda/linter/test_rules/rule30.ts.relax.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule30.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule30.ts.strict.json b/ets2panda/linter/test_rules/rule30.ts.strict.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule30.ts.strict.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule30_1.ts.relax.json b/ets2panda/linter/test_rules/rule30_1.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule30_1.ts.relax.json rename to ets2panda/linter/test_rules/rule30_1.ts.json index a8fca7288c..bcd49303b3 100644 --- a/ets2panda/linter/test_rules/rule30_1.ts.relax.json +++ b/ets2panda/linter/test_rules/rule30_1.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule30_1.ts.strict.json b/ets2panda/linter/test_rules/rule30_1.ts.strict.json deleted file mode 100644 index a8fca7288c..0000000000 --- a/ets2panda/linter/test_rules/rule30_1.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 36, - "column": 1, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 39, - "column": 1, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule30_2.ts.relax.json b/ets2panda/linter/test_rules/rule30_2.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule30_2.ts.relax.json rename to ets2panda/linter/test_rules/rule30_2.ts.json index 9c67fbb9f5..12f011ffad 100644 --- a/ets2panda/linter/test_rules/rule30_2.ts.relax.json +++ b/ets2panda/linter/test_rules/rule30_2.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule30_2.ts.strict.json b/ets2panda/linter/test_rules/rule30_2.ts.strict.json deleted file mode 100644 index 9c67fbb9f5..0000000000 --- a/ets2panda/linter/test_rules/rule30_2.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 35, - "column": 1, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 38, - "column": 1, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule30_3.ts.json b/ets2panda/linter/test_rules/rule30_3.ts.json new file mode 100644 index 0000000000..ad85bf6b84 --- /dev/null +++ b/ets2panda/linter/test_rules/rule30_3.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule30_3.ts.relax.json b/ets2panda/linter/test_rules/rule30_3.ts.relax.json deleted file mode 100644 index e7d2d6779b..0000000000 --- a/ets2panda/linter/test_rules/rule30_3.ts.relax.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule30_3.ts.strict.json b/ets2panda/linter/test_rules/rule30_3.ts.strict.json deleted file mode 100644 index e7d2d6779b..0000000000 --- a/ets2panda/linter/test_rules/rule30_3.ts.strict.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule30_4.ts.relax.json b/ets2panda/linter/test_rules/rule30_4.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule30_4.ts.relax.json rename to ets2panda/linter/test_rules/rule30_4.ts.json index 30e8277c42..7503d3c562 100644 --- a/ets2panda/linter/test_rules/rule30_4.ts.relax.json +++ b/ets2panda/linter/test_rules/rule30_4.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule30_4.ts.strict.json b/ets2panda/linter/test_rules/rule30_4.ts.strict.json deleted file mode 100644 index 30e8277c42..0000000000 --- a/ets2panda/linter/test_rules/rule30_4.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 50, - "column": 1, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 53, - "column": 1, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule30_5.ts.relax.json b/ets2panda/linter/test_rules/rule30_5.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule30_5.ts.relax.json rename to ets2panda/linter/test_rules/rule30_5.ts.json index 70bc29af7d..b288dda7fd 100644 --- a/ets2panda/linter/test_rules/rule30_5.ts.relax.json +++ b/ets2panda/linter/test_rules/rule30_5.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule30_5.ts.strict.json b/ets2panda/linter/test_rules/rule30_5.ts.strict.json deleted file mode 100644 index 70bc29af7d..0000000000 --- a/ets2panda/linter/test_rules/rule30_5.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 49, - "column": 1, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule30_6.ts.relax.json b/ets2panda/linter/test_rules/rule30_6.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule30_6.ts.relax.json rename to ets2panda/linter/test_rules/rule30_6.ts.json index dc7649d15b..3514c51b0e 100644 --- a/ets2panda/linter/test_rules/rule30_6.ts.relax.json +++ b/ets2panda/linter/test_rules/rule30_6.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule30_6.ts.strict.json b/ets2panda/linter/test_rules/rule30_6.ts.strict.json deleted file mode 100644 index dc7649d15b..0000000000 --- a/ets2panda/linter/test_rules/rule30_6.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 51, - "column": 1, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 54, - "column": 1, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule34.ts.relax.json b/ets2panda/linter/test_rules/rule34.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule34.ts.relax.json rename to ets2panda/linter/test_rules/rule34.ts.json index f642fe073a..b94792c9aa 100644 --- a/ets2panda/linter/test_rules/rule34.ts.relax.json +++ b/ets2panda/linter/test_rules/rule34.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule34.ts.strict.json b/ets2panda/linter/test_rules/rule34.ts.strict.json deleted file mode 100644 index f642fe073a..0000000000 --- a/ets2panda/linter/test_rules/rule34.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 26, - "column": 5, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 26, - "column": 9, - "problem": "GenericCallNoTypeArgs", - "suggest": "", - "rule": "Type inference in case of generic function calls is limited (arkts-no-inferred-generic-params)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule38.ts.json b/ets2panda/linter/test_rules/rule38.ts.json new file mode 100644 index 0000000000..0f0ef2c3a3 --- /dev/null +++ b/ets2panda/linter/test_rules/rule38.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule38.ts.relax.json b/ets2panda/linter/test_rules/rule38.ts.relax.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule38.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule38.ts.strict.json b/ets2panda/linter/test_rules/rule38.ts.strict.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule38.ts.strict.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule4.ts.strict.json b/ets2panda/linter/test_rules/rule4.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule4.ts.strict.json rename to ets2panda/linter/test_rules/rule4.ts.json index 154c06a491..cbbb6a56cd 100644 --- a/ets2panda/linter/test_rules/rule4.ts.strict.json +++ b/ets2panda/linter/test_rules/rule4.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule4.ts.relax.json b/ets2panda/linter/test_rules/rule4.ts.relax.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule4.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule40.ts.relax.json b/ets2panda/linter/test_rules/rule40.ts.json similarity index 96% rename from ets2panda/linter/test_rules/rule40.ts.relax.json rename to ets2panda/linter/test_rules/rule40.ts.json index 0d67744ac5..c3ada16420 100644 --- a/ets2panda/linter/test_rules/rule40.ts.relax.json +++ b/ets2panda/linter/test_rules/rule40.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule40.ts.strict.json b/ets2panda/linter/test_rules/rule40.ts.strict.json deleted file mode 100644 index 0d67744ac5..0000000000 --- a/ets2panda/linter/test_rules/rule40.ts.strict.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 8, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 16, - "column": 33, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 21, - "column": 14, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule43.ts.strict.json b/ets2panda/linter/test_rules/rule43.ts.json similarity index 96% rename from ets2panda/linter/test_rules/rule43.ts.strict.json rename to ets2panda/linter/test_rules/rule43.ts.json index 9b490ce675..fe93427b6e 100644 --- a/ets2panda/linter/test_rules/rule43.ts.strict.json +++ b/ets2panda/linter/test_rules/rule43.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule43.ts.relax.json b/ets2panda/linter/test_rules/rule43.ts.relax.json deleted file mode 100644 index 9b490ce675..0000000000 --- a/ets2panda/linter/test_rules/rule43.ts.relax.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 9, - "problem": "ArrayLiteralNoContextType", - "suggest": "", - "rule": "Array literals must contain elements of only inferrable types (arkts-no-noninferrable-arr-literals)" - }, - { - "line": 16, - "column": 10, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 16, - "column": 26, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule46.ts.autofix.json b/ets2panda/linter/test_rules/rule46.ts.autofix.json index ff2bfe4f07..158df69f1e 100644 --- a/ets2panda/linter/test_rules/rule46.ts.autofix.json +++ b/ets2panda/linter/test_rules/rule46.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule46.ts.strict.json b/ets2panda/linter/test_rules/rule46.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule46.ts.strict.json rename to ets2panda/linter/test_rules/rule46.ts.json index 481697b8bc..2efd9330b3 100644 --- a/ets2panda/linter/test_rules/rule46.ts.strict.json +++ b/ets2panda/linter/test_rules/rule46.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule46.ts.relax.json b/ets2panda/linter/test_rules/rule46.ts.relax.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule46.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule49.ts.strict.json b/ets2panda/linter/test_rules/rule49.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule49.ts.strict.json rename to ets2panda/linter/test_rules/rule49.ts.json index 9e7ad0c44b..191a80284c 100644 --- a/ets2panda/linter/test_rules/rule49.ts.strict.json +++ b/ets2panda/linter/test_rules/rule49.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule49.ts.relax.json b/ets2panda/linter/test_rules/rule49.ts.relax.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule49.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule5.ts.strict.json b/ets2panda/linter/test_rules/rule5.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule5.ts.strict.json rename to ets2panda/linter/test_rules/rule5.ts.json index 431bb92ee9..f5d20ea2a5 100644 --- a/ets2panda/linter/test_rules/rule5.ts.strict.json +++ b/ets2panda/linter/test_rules/rule5.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule5.ts.relax.json b/ets2panda/linter/test_rules/rule5.ts.relax.json deleted file mode 100644 index 786d2345d5..0000000000 --- a/ets2panda/linter/test_rules/rule5.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 21, - "column": 12, - "problem": "StrictDiagnostic", - "suggest": "Variable 'x' is used before being assigned.", - "rule": "Variable 'x' is used before being assigned." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule50.ts.strict.json b/ets2panda/linter/test_rules/rule50.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule50.ts.strict.json rename to ets2panda/linter/test_rules/rule50.ts.json index 2d751b7bd6..92c1a6d8af 100644 --- a/ets2panda/linter/test_rules/rule50.ts.strict.json +++ b/ets2panda/linter/test_rules/rule50.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule50.ts.relax.json b/ets2panda/linter/test_rules/rule50.ts.relax.json deleted file mode 100644 index f8cc3bfc24..0000000000 --- a/ets2panda/linter/test_rules/rule50.ts.relax.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 23, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule51.ts.relax.json b/ets2panda/linter/test_rules/rule51.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule51.ts.relax.json rename to ets2panda/linter/test_rules/rule51.ts.json index 2225694613..ebbf7f979d 100644 --- a/ets2panda/linter/test_rules/rule51.ts.relax.json +++ b/ets2panda/linter/test_rules/rule51.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule51.ts.strict.json b/ets2panda/linter/test_rules/rule51.ts.strict.json deleted file mode 100644 index 2225694613..0000000000 --- a/ets2panda/linter/test_rules/rule51.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 20, - "column": 23, - "problem": "ImplementsClass", - "suggest": "", - "rule": "Classes cannot be specified in \"implements\" clause (arkts-implements-only-iface)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule52.ts.relax.json b/ets2panda/linter/test_rules/rule52.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule52.ts.relax.json rename to ets2panda/linter/test_rules/rule52.ts.json index 7be6dbb33f..0b1806f6e0 100644 --- a/ets2panda/linter/test_rules/rule52.ts.relax.json +++ b/ets2panda/linter/test_rules/rule52.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule52.ts.strict.json b/ets2panda/linter/test_rules/rule52.ts.strict.json deleted file mode 100644 index 7be6dbb33f..0000000000 --- a/ets2panda/linter/test_rules/rule52.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 30, - "column": 1, - "problem": "MethodReassignment", - "suggest": "", - "rule": "Reassigning object methods is not supported (arkts-no-method-reassignment)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_regression/15431.ts.strict.json b/ets2panda/linter/test_rules/rule53.ts.autofix.json similarity index 57% rename from ets2panda/linter/test_regression/15431.ts.strict.json rename to ets2panda/linter/test_rules/rule53.ts.autofix.json index cbbe46e47a..3570923d6b 100644 --- a/ets2panda/linter/test_regression/15431.ts.strict.json +++ b/ets2panda/linter/test_rules/rule53.ts.autofix.json @@ -15,25 +15,27 @@ ], "nodes": [ { - "line": 22, - "column": 3, - "problem": "MultipleStaticBlocks", + "line": 24, + "column": 10, + "problem": "TypeAssertion", + "autofixable": true, + "autofix": [ + { + "start": 782, + "end": 804, + "replacementText": "createShape() as Circle" + } + ], "suggest": "", - "rule": "Only one static block is supported (arkts-no-multiple-static-blocks)" + "rule": "Only \"as T\" syntax is supported for type casts (arkts-as-casts)" }, { - "line": 30, - "column": 5, - "problem": "FunctionContainsThis", + "line": 36, + "column": 11, + "problem": "TypeAssertion", + "autofixable": false, "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 42, - "column": 3, - "problem": "MultipleStaticBlocks", - "suggest": "", - "rule": "Only one static block is supported (arkts-no-multiple-static-blocks)" + "rule": "Only \"as T\" syntax is supported for type casts (arkts-as-casts)" } ] } \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule53.ts.autofix.skip b/ets2panda/linter/test_rules/rule53.ts.autofix.skip deleted file mode 100644 index 13982e9c91..0000000000 --- a/ets2panda/linter/test_rules/rule53.ts.autofix.skip +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ diff --git a/ets2panda/linter/test_rules/rule53.ts.strict.json b/ets2panda/linter/test_rules/rule53.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule53.ts.strict.json rename to ets2panda/linter/test_rules/rule53.ts.json index e02beaaf38..b4175d37bf 100644 --- a/ets2panda/linter/test_rules/rule53.ts.strict.json +++ b/ets2panda/linter/test_rules/rule53.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule53.ts.relax.json b/ets2panda/linter/test_rules/rule53.ts.relax.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule53.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule54.tsx.strict.json b/ets2panda/linter/test_rules/rule54.tsx.json similarity index 96% rename from ets2panda/linter/test_rules/rule54.tsx.strict.json rename to ets2panda/linter/test_rules/rule54.tsx.json index c8561e293d..edc9ec7508 100644 --- a/ets2panda/linter/test_rules/rule54.tsx.strict.json +++ b/ets2panda/linter/test_rules/rule54.tsx.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule54.tsx.relax.json b/ets2panda/linter/test_rules/rule54.tsx.relax.json deleted file mode 100644 index 835896f99d..0000000000 --- a/ets2panda/linter/test_rules/rule54.tsx.relax.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 33, - "problem": "JsxElement" - }, - { - "line": 19, - "column": 27, - "problem": "JsxElement" - }, - { - "line": 21, - "column": 7, - "problem": "AnyType" - }, - { - "line": 22, - "column": 5, - "problem": "JsxElement" - }, - { - "line": 23, - "column": 38, - "problem": "JsxElement" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule55.ts.relax.json b/ets2panda/linter/test_rules/rule55.ts.json similarity index 97% rename from ets2panda/linter/test_rules/rule55.ts.relax.json rename to ets2panda/linter/test_rules/rule55.ts.json index 82dd3e3b9d..a09fbc1d25 100644 --- a/ets2panda/linter/test_rules/rule55.ts.relax.json +++ b/ets2panda/linter/test_rules/rule55.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule55.ts.strict.json b/ets2panda/linter/test_rules/rule55.ts.strict.json deleted file mode 100644 index 82dd3e3b9d..0000000000 --- a/ets2panda/linter/test_rules/rule55.ts.strict.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 9, - "problem": "UnaryArithmNotNumber", - "suggest": "", - "rule": "Unary operators \"+\", \"-\" and \"~\" work only on numbers (arkts-no-polymorphic-unops)" - }, - { - "line": 19, - "column": 9, - "problem": "UnaryArithmNotNumber", - "suggest": "", - "rule": "Unary operators \"+\", \"-\" and \"~\" work only on numbers (arkts-no-polymorphic-unops)" - }, - { - "line": 21, - "column": 9, - "problem": "UnaryArithmNotNumber", - "suggest": "", - "rule": "Unary operators \"+\", \"-\" and \"~\" work only on numbers (arkts-no-polymorphic-unops)" - }, - { - "line": 22, - "column": 9, - "problem": "UnaryArithmNotNumber", - "suggest": "", - "rule": "Unary operators \"+\", \"-\" and \"~\" work only on numbers (arkts-no-polymorphic-unops)" - }, - { - "line": 32, - "column": 9, - "problem": "UnaryArithmNotNumber", - "suggest": "", - "rule": "Unary operators \"+\", \"-\" and \"~\" work only on numbers (arkts-no-polymorphic-unops)" - }, - { - "line": 33, - "column": 9, - "problem": "UnaryArithmNotNumber", - "suggest": "", - "rule": "Unary operators \"+\", \"-\" and \"~\" work only on numbers (arkts-no-polymorphic-unops)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule59.ts.relax.json b/ets2panda/linter/test_rules/rule59.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule59.ts.relax.json rename to ets2panda/linter/test_rules/rule59.ts.json index 619c7a5b2d..1e79b2f492 100644 --- a/ets2panda/linter/test_rules/rule59.ts.relax.json +++ b/ets2panda/linter/test_rules/rule59.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule59.ts.strict.json b/ets2panda/linter/test_rules/rule59.ts.strict.json deleted file mode 100644 index 619c7a5b2d..0000000000 --- a/ets2panda/linter/test_rules/rule59.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 1, - "problem": "DeleteOperator", - "suggest": "", - "rule": "\"delete\" operator is not supported (arkts-no-delete)" - }, - { - "line": 30, - "column": 1, - "problem": "StrictDiagnostic", - "suggest": "Type 'null' is not assignable to type 'number | undefined'.", - "rule": "Type 'null' is not assignable to type 'number | undefined'." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule60.ts.strict.json b/ets2panda/linter/test_rules/rule60.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule60.ts.strict.json rename to ets2panda/linter/test_rules/rule60.ts.json index 1b92403578..066d1bf16a 100644 --- a/ets2panda/linter/test_rules/rule60.ts.strict.json +++ b/ets2panda/linter/test_rules/rule60.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule60.ts.relax.json b/ets2panda/linter/test_rules/rule60.ts.relax.json deleted file mode 100644 index 1b92403578..0000000000 --- a/ets2panda/linter/test_rules/rule60.ts.relax.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 20, - "column": 9, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 21, - "column": 9, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule65.ts.relax.json b/ets2panda/linter/test_rules/rule65.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule65.ts.relax.json rename to ets2panda/linter/test_rules/rule65.ts.json index e91066270e..5135a5850e 100644 --- a/ets2panda/linter/test_rules/rule65.ts.relax.json +++ b/ets2panda/linter/test_rules/rule65.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule65.ts.strict.json b/ets2panda/linter/test_rules/rule65.ts.strict.json deleted file mode 100644 index e91066270e..0000000000 --- a/ets2panda/linter/test_rules/rule65.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 23, - "column": 11, - "problem": "InstanceofUnsupported", - "suggest": "", - "rule": "\"instanceof\" operator is partially supported (arkts-instanceof-ref-types)" - }, - { - "line": 24, - "column": 11, - "problem": "InstanceofUnsupported", - "suggest": "", - "rule": "\"instanceof\" operator is partially supported (arkts-instanceof-ref-types)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule66.ts.relax.json b/ets2panda/linter/test_rules/rule66.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule66.ts.relax.json rename to ets2panda/linter/test_rules/rule66.ts.json index 70c6adc91c..8a4fee252e 100644 --- a/ets2panda/linter/test_rules/rule66.ts.relax.json +++ b/ets2panda/linter/test_rules/rule66.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule66.ts.strict.json b/ets2panda/linter/test_rules/rule66.ts.strict.json deleted file mode 100644 index 70c6adc91c..0000000000 --- a/ets2panda/linter/test_rules/rule66.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 21, - "column": 16, - "problem": "InOperator", - "suggest": "", - "rule": "\"in\" operator is not supported (arkts-no-in)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule69.ts.strict.json b/ets2panda/linter/test_rules/rule69.ts.json similarity index 97% rename from ets2panda/linter/test_rules/rule69.ts.strict.json rename to ets2panda/linter/test_rules/rule69.ts.json index 9a46485db4..0a738d38fe 100644 --- a/ets2panda/linter/test_rules/rule69.ts.strict.json +++ b/ets2panda/linter/test_rules/rule69.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule69.ts.relax.json b/ets2panda/linter/test_rules/rule69.ts.relax.json deleted file mode 100644 index e084b3bb8e..0000000000 --- a/ets2panda/linter/test_rules/rule69.ts.relax.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 19, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 19, - "column": 11, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 20, - "column": 8, - "problem": "SpreadOperator", - "suggest": "", - "rule": "It is possible to spread only arrays or classes derived from arrays into the rest parameter or array literals (arkts-no-spread)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule71.ts.strict.json b/ets2panda/linter/test_rules/rule71.ts.json similarity index 98% rename from ets2panda/linter/test_rules/rule71.ts.strict.json rename to ets2panda/linter/test_rules/rule71.ts.json index b25cacf904..bd5e2d016b 100644 --- a/ets2panda/linter/test_rules/rule71.ts.strict.json +++ b/ets2panda/linter/test_rules/rule71.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule71.ts.relax.json b/ets2panda/linter/test_rules/rule71.ts.relax.json deleted file mode 100644 index b25cacf904..0000000000 --- a/ets2panda/linter/test_rules/rule71.ts.relax.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 6, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 34, - "column": 12, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 34, - "column": 12, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 35, - "column": 12, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 35, - "column": 12, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 38, - "column": 27, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 38, - "column": 27, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 39, - "column": 15, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 39, - "column": 15, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 42, - "column": 24, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 42, - "column": 24, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule74.ts.strict.json b/ets2panda/linter/test_rules/rule74.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule74.ts.strict.json rename to ets2panda/linter/test_rules/rule74.ts.json index 4fdf1639a4..02ed759259 100644 --- a/ets2panda/linter/test_rules/rule74.ts.strict.json +++ b/ets2panda/linter/test_rules/rule74.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule74.ts.relax.json b/ets2panda/linter/test_rules/rule74.ts.relax.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule74.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule79.ts.autofix.json b/ets2panda/linter/test_rules/rule79.ts.autofix.json index 7fe76d4fe9..f80b592d2a 100644 --- a/ets2panda/linter/test_rules/rule79.ts.autofix.json +++ b/ets2panda/linter/test_rules/rule79.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule79.ts.strict.json b/ets2panda/linter/test_rules/rule79.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule79.ts.strict.json rename to ets2panda/linter/test_rules/rule79.ts.json index 329eca0690..4886e10961 100644 --- a/ets2panda/linter/test_rules/rule79.ts.strict.json +++ b/ets2panda/linter/test_rules/rule79.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule79.ts.relax.json b/ets2panda/linter/test_rules/rule79.ts.relax.json deleted file mode 100644 index 48f095ed63..0000000000 --- a/ets2panda/linter/test_rules/rule79.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 19, - "column": 11, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule8.ts.strict.json b/ets2panda/linter/test_rules/rule8.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule8.ts.strict.json rename to ets2panda/linter/test_rules/rule8.ts.json index 0adf234ca3..7b0b5d4ff5 100644 --- a/ets2panda/linter/test_rules/rule8.ts.strict.json +++ b/ets2panda/linter/test_rules/rule8.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule8.ts.relax.json b/ets2panda/linter/test_rules/rule8.ts.relax.json deleted file mode 100644 index 0adf234ca3..0000000000 --- a/ets2panda/linter/test_rules/rule8.ts.relax.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 14, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 21, - "column": 14, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule80.ts.relax.json b/ets2panda/linter/test_rules/rule80.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule80.ts.relax.json rename to ets2panda/linter/test_rules/rule80.ts.json index 8cd03efd43..34292a44b6 100644 --- a/ets2panda/linter/test_rules/rule80.ts.relax.json +++ b/ets2panda/linter/test_rules/rule80.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule80.ts.strict.json b/ets2panda/linter/test_rules/rule80.ts.strict.json deleted file mode 100644 index 8cd03efd43..0000000000 --- a/ets2panda/linter/test_rules/rule80.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 12, - "problem": "ForInStatement", - "suggest": "", - "rule": "\"for .. in\" is not supported (arkts-no-for-in)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule83.ts.strict.json b/ets2panda/linter/test_rules/rule83.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule83.ts.strict.json rename to ets2panda/linter/test_rules/rule83.ts.json index da7e2cb6a4..7fec85dccf 100644 --- a/ets2panda/linter/test_rules/rule83.ts.strict.json +++ b/ets2panda/linter/test_rules/rule83.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule83.ts.relax.json b/ets2panda/linter/test_rules/rule83.ts.relax.json deleted file mode 100644 index da7e2cb6a4..0000000000 --- a/ets2panda/linter/test_rules/rule83.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 27, - "problem": "MappedType", - "suggest": "", - "rule": "Mapped type expression is not supported (arkts-no-mapped-types)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule84.ts.relax.json b/ets2panda/linter/test_rules/rule84.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule84.ts.relax.json rename to ets2panda/linter/test_rules/rule84.ts.json index 180291ed79..5b13f82788 100644 --- a/ets2panda/linter/test_rules/rule84.ts.relax.json +++ b/ets2panda/linter/test_rules/rule84.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule84.ts.strict.json b/ets2panda/linter/test_rules/rule84.ts.strict.json deleted file mode 100644 index 180291ed79..0000000000 --- a/ets2panda/linter/test_rules/rule84.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 1, - "problem": "WithStatement", - "suggest": "", - "rule": "\"with\" statement is not supported (arkts-no-with)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule87.ts.strict.json b/ets2panda/linter/test_rules/rule87.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule87.ts.strict.json rename to ets2panda/linter/test_rules/rule87.ts.json index a8ae812be8..7a0c9b43d5 100644 --- a/ets2panda/linter/test_rules/rule87.ts.strict.json +++ b/ets2panda/linter/test_rules/rule87.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule87.ts.relax.json b/ets2panda/linter/test_rules/rule87.ts.relax.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule87.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule8_1.ts.relax.json b/ets2panda/linter/test_rules/rule8_1.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule8_1.ts.relax.json rename to ets2panda/linter/test_rules/rule8_1.ts.json index 73554b9f98..6d2f3986e3 100644 --- a/ets2panda/linter/test_rules/rule8_1.ts.relax.json +++ b/ets2panda/linter/test_rules/rule8_1.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule8_1.ts.strict.json b/ets2panda/linter/test_rules/rule8_1.ts.strict.json deleted file mode 100644 index 73554b9f98..0000000000 --- a/ets2panda/linter/test_rules/rule8_1.ts.strict.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 20, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 27, - "column": 23, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 37, - "column": 21, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule8_2.ts.strict.json b/ets2panda/linter/test_rules/rule8_2.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule8_2.ts.strict.json rename to ets2panda/linter/test_rules/rule8_2.ts.json index 6f8d50c818..72f9728710 100644 --- a/ets2panda/linter/test_rules/rule8_2.ts.strict.json +++ b/ets2panda/linter/test_rules/rule8_2.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule8_2.ts.relax.json b/ets2panda/linter/test_rules/rule8_2.ts.relax.json deleted file mode 100644 index 6f8d50c818..0000000000 --- a/ets2panda/linter/test_rules/rule8_2.ts.relax.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 18, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 21, - "column": 15, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule8_3.ts.strict.json b/ets2panda/linter/test_rules/rule8_3.ts.json similarity index 97% rename from ets2panda/linter/test_rules/rule8_3.ts.strict.json rename to ets2panda/linter/test_rules/rule8_3.ts.json index 16a2e5bd3f..8d8f3a84e4 100644 --- a/ets2panda/linter/test_rules/rule8_3.ts.strict.json +++ b/ets2panda/linter/test_rules/rule8_3.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule8_3.ts.relax.json b/ets2panda/linter/test_rules/rule8_3.ts.relax.json deleted file mode 100644 index 16a2e5bd3f..0000000000 --- a/ets2panda/linter/test_rules/rule8_3.ts.relax.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 20, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 24, - "column": 27, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 25, - "column": 16, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 32, - "column": 23, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 39, - "column": 27, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 40, - "column": 16, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 47, - "column": 21, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 54, - "column": 27, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 55, - "column": 16, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule8_4.ts.strict.json b/ets2panda/linter/test_rules/rule8_4.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule8_4.ts.strict.json rename to ets2panda/linter/test_rules/rule8_4.ts.json index 75c18f2944..3547d0a014 100644 --- a/ets2panda/linter/test_rules/rule8_4.ts.strict.json +++ b/ets2panda/linter/test_rules/rule8_4.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule8_4.ts.relax.json b/ets2panda/linter/test_rules/rule8_4.ts.relax.json deleted file mode 100644 index 75c18f2944..0000000000 --- a/ets2panda/linter/test_rules/rule8_4.ts.relax.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 20, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 27, - "column": 23, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 37, - "column": 21, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule8_5.ts.relax.json b/ets2panda/linter/test_rules/rule8_5.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule8_5.ts.relax.json rename to ets2panda/linter/test_rules/rule8_5.ts.json index 9c264e4bc3..3002f452e7 100644 --- a/ets2panda/linter/test_rules/rule8_5.ts.relax.json +++ b/ets2panda/linter/test_rules/rule8_5.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule8_5.ts.strict.json b/ets2panda/linter/test_rules/rule8_5.ts.strict.json deleted file mode 100644 index 9c264e4bc3..0000000000 --- a/ets2panda/linter/test_rules/rule8_5.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 18, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 21, - "column": 15, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule8_6.ts.relax.json b/ets2panda/linter/test_rules/rule8_6.ts.json similarity index 97% rename from ets2panda/linter/test_rules/rule8_6.ts.relax.json rename to ets2panda/linter/test_rules/rule8_6.ts.json index 7800c1e302..dcefa43f98 100644 --- a/ets2panda/linter/test_rules/rule8_6.ts.relax.json +++ b/ets2panda/linter/test_rules/rule8_6.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule8_6.ts.strict.json b/ets2panda/linter/test_rules/rule8_6.ts.strict.json deleted file mode 100644 index 7800c1e302..0000000000 --- a/ets2panda/linter/test_rules/rule8_6.ts.strict.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 20, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 24, - "column": 27, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 25, - "column": 16, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 32, - "column": 23, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 39, - "column": 27, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 40, - "column": 16, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 47, - "column": 21, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 54, - "column": 27, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 55, - "column": 16, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90.ts.autofix.json b/ets2panda/linter/test_rules/rule90.ts.autofix.json index e32f941477..4617884a33 100644 --- a/ets2panda/linter/test_rules/rule90.ts.autofix.json +++ b/ets2panda/linter/test_rules/rule90.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule90.ts.strict.json b/ets2panda/linter/test_rules/rule90.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule90.ts.strict.json rename to ets2panda/linter/test_rules/rule90.ts.json index b58b245e48..96b2907d4e 100644 --- a/ets2panda/linter/test_rules/rule90.ts.strict.json +++ b/ets2panda/linter/test_rules/rule90.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule90.ts.relax.json b/ets2panda/linter/test_rules/rule90.ts.relax.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule90.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_1.ts.autofix.json b/ets2panda/linter/test_rules/rule90_1.ts.autofix.json index 13f13363f5..0f0ef2c3a3 100644 --- a/ets2panda/linter/test_rules/rule90_1.ts.autofix.json +++ b/ets2panda/linter/test_rules/rule90_1.ts.autofix.json @@ -1,3 +1,17 @@ { + "copyright": [ + "Copyright (c) 2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], "nodes": [] } \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_1.ts.json b/ets2panda/linter/test_rules/rule90_1.ts.json new file mode 100644 index 0000000000..0f0ef2c3a3 --- /dev/null +++ b/ets2panda/linter/test_rules/rule90_1.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_1.ts.relax.json b/ets2panda/linter/test_rules/rule90_1.ts.relax.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule90_1.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_1.ts.strict.json b/ets2panda/linter/test_rules/rule90_1.ts.strict.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule90_1.ts.strict.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_2.ts.autofix.json b/ets2panda/linter/test_rules/rule90_2.ts.autofix.json index 13f13363f5..0f0ef2c3a3 100644 --- a/ets2panda/linter/test_rules/rule90_2.ts.autofix.json +++ b/ets2panda/linter/test_rules/rule90_2.ts.autofix.json @@ -1,3 +1,17 @@ { + "copyright": [ + "Copyright (c) 2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], "nodes": [] } \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_2.ts.json b/ets2panda/linter/test_rules/rule90_2.ts.json new file mode 100644 index 0000000000..0f0ef2c3a3 --- /dev/null +++ b/ets2panda/linter/test_rules/rule90_2.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_2.ts.relax.json b/ets2panda/linter/test_rules/rule90_2.ts.relax.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule90_2.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_2.ts.strict.json b/ets2panda/linter/test_rules/rule90_2.ts.strict.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule90_2.ts.strict.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_3.ts.autofix.json b/ets2panda/linter/test_rules/rule90_3.ts.autofix.json index 69d9246f1d..1ce242c94a 100644 --- a/ets2panda/linter/test_rules/rule90_3.ts.autofix.json +++ b/ets2panda/linter/test_rules/rule90_3.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule90_3.ts.strict.json b/ets2panda/linter/test_rules/rule90_3.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule90_3.ts.strict.json rename to ets2panda/linter/test_rules/rule90_3.ts.json index fae5347eff..10c9bf7927 100644 --- a/ets2panda/linter/test_rules/rule90_3.ts.strict.json +++ b/ets2panda/linter/test_rules/rule90_3.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule90_3.ts.relax.json b/ets2panda/linter/test_rules/rule90_3.ts.relax.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule90_3.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_4.ts.autofix.json b/ets2panda/linter/test_rules/rule90_4.ts.autofix.json index 13f13363f5..0f0ef2c3a3 100644 --- a/ets2panda/linter/test_rules/rule90_4.ts.autofix.json +++ b/ets2panda/linter/test_rules/rule90_4.ts.autofix.json @@ -1,3 +1,17 @@ { + "copyright": [ + "Copyright (c) 2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], "nodes": [] } \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_4.ts.json b/ets2panda/linter/test_rules/rule90_4.ts.json new file mode 100644 index 0000000000..0f0ef2c3a3 --- /dev/null +++ b/ets2panda/linter/test_rules/rule90_4.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_4.ts.relax.json b/ets2panda/linter/test_rules/rule90_4.ts.relax.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule90_4.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_4.ts.strict.json b/ets2panda/linter/test_rules/rule90_4.ts.strict.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule90_4.ts.strict.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_5.ts.autofix.json b/ets2panda/linter/test_rules/rule90_5.ts.autofix.json index 13f13363f5..0f0ef2c3a3 100644 --- a/ets2panda/linter/test_rules/rule90_5.ts.autofix.json +++ b/ets2panda/linter/test_rules/rule90_5.ts.autofix.json @@ -1,3 +1,17 @@ { + "copyright": [ + "Copyright (c) 2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], "nodes": [] } \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_5.ts.json b/ets2panda/linter/test_rules/rule90_5.ts.json new file mode 100644 index 0000000000..0f0ef2c3a3 --- /dev/null +++ b/ets2panda/linter/test_rules/rule90_5.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_5.ts.relax.json b/ets2panda/linter/test_rules/rule90_5.ts.relax.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule90_5.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_5.ts.strict.json b/ets2panda/linter/test_rules/rule90_5.ts.strict.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule90_5.ts.strict.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule91.ts.relax.json b/ets2panda/linter/test_rules/rule91.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule91.ts.relax.json rename to ets2panda/linter/test_rules/rule91.ts.json index b972622ba7..427d0f6c49 100644 --- a/ets2panda/linter/test_rules/rule91.ts.relax.json +++ b/ets2panda/linter/test_rules/rule91.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule91.ts.strict.json b/ets2panda/linter/test_rules/rule91.ts.strict.json deleted file mode 100644 index b972622ba7..0000000000 --- a/ets2panda/linter/test_rules/rule91.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 19, - "problem": "DestructuringParameter", - "suggest": "", - "rule": "Destructuring parameter declarations are not supported (arkts-no-destruct-params)" - }, - { - "line": 23, - "column": 10, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule92.ts.strict.json b/ets2panda/linter/test_rules/rule92.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule92.ts.strict.json rename to ets2panda/linter/test_rules/rule92.ts.json index a4db68ca08..a12c23f16a 100644 --- a/ets2panda/linter/test_rules/rule92.ts.strict.json +++ b/ets2panda/linter/test_rules/rule92.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule92.ts.relax.json b/ets2panda/linter/test_rules/rule92.ts.relax.json deleted file mode 100644 index 13f13363f5..0000000000 --- a/ets2panda/linter/test_rules/rule92.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule93.ts.relax.json b/ets2panda/linter/test_rules/rule93.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule93.ts.relax.json rename to ets2panda/linter/test_rules/rule93.ts.json index 160f413784..393f44525f 100644 --- a/ets2panda/linter/test_rules/rule93.ts.relax.json +++ b/ets2panda/linter/test_rules/rule93.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule94.ts.relax.json b/ets2panda/linter/test_rules/rule94.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule94.ts.relax.json rename to ets2panda/linter/test_rules/rule94.ts.json index a673ba8745..a991166fa6 100644 --- a/ets2panda/linter/test_rules/rule94.ts.relax.json +++ b/ets2panda/linter/test_rules/rule94.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule94.ts.strict.json b/ets2panda/linter/test_rules/rule94.ts.strict.json deleted file mode 100644 index a673ba8745..0000000000 --- a/ets2panda/linter/test_rules/rule94.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 1, - "problem": "GeneratorFunction", - "suggest": "", - "rule": "Generator functions are not supported (arkts-no-generators)" - }, - { - "line": 18, - "column": 9, - "problem": "YieldExpression", - "suggest": "", - "rule": "Generator functions are not supported (arkts-no-generators)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule96.ts.relax.json b/ets2panda/linter/test_rules/rule96.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule96.ts.relax.json rename to ets2panda/linter/test_rules/rule96.ts.json index 88ffa6dbd6..a3753d4f5d 100644 --- a/ets2panda/linter/test_rules/rule96.ts.relax.json +++ b/ets2panda/linter/test_rules/rule96.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule96.ts.strict.json b/ets2panda/linter/test_rules/rule96.ts.strict.json deleted file mode 100644 index 88ffa6dbd6..0000000000 --- a/ets2panda/linter/test_rules/rule96.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 26, - "column": 21, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 26, - "column": 27, - "problem": "IsOperator", - "suggest": "", - "rule": "Type guarding is supported with \"instanceof\" and \"as\" (arkts-no-is)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule99.ts.strict.json b/ets2panda/linter/test_rules/rule99.ts.json similarity index 96% rename from ets2panda/linter/test_rules/rule99.ts.strict.json rename to ets2panda/linter/test_rules/rule99.ts.json index 768fdbf301..0b7e8b0669 100644 --- a/ets2panda/linter/test_rules/rule99.ts.strict.json +++ b/ets2panda/linter/test_rules/rule99.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule99.ts.relax.json b/ets2panda/linter/test_rules/rule99.ts.relax.json deleted file mode 100644 index 768fdbf301..0000000000 --- a/ets2panda/linter/test_rules/rule99.ts.relax.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 21, - "column": 5, - "problem": "SpreadOperator", - "suggest": "", - "rule": "It is possible to spread only arrays or classes derived from arrays into the rest parameter or array literals (arkts-no-spread)" - }, - { - "line": 26, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 27, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 27, - "column": 16, - "problem": "SpreadOperator", - "suggest": "", - "rule": "It is possible to spread only arrays or classes derived from arrays into the rest parameter or array literals (arkts-no-spread)" - } - ] -} \ No newline at end of file -- Gitee