@@ -13,14 +13,27 @@ import (
1313 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/adjacent_overload_signatures"
1414 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/array_type"
1515 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/await_thenable"
16+ "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/ban_ts_comment"
17+ "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/ban_types"
1618 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/class_literal_property_style"
19+ "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/consistent_generic_constructors"
20+ "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/consistent_indexed_object_style"
21+ "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/consistent_return"
22+ "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/consistent_type_assertions"
23+ "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/consistent_type_definitions"
24+ "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/consistent_type_exports"
25+ "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/consistent_type_imports"
26+ "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/default_param_last"
1727 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/no_array_delete"
1828 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/no_base_to_string"
1929 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/no_confusing_void_expression"
30+ "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/no_duplicate_enum_values"
2031 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/no_duplicate_type_constituents"
2132 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/no_empty_function"
2233 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/no_empty_interface"
2334 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/no_explicit_any"
35+ "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/no_extraneous_class"
36+ "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/no_invalid_void_type"
2437 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/no_floating_promises"
2538 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/no_for_in_array"
2639 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/no_implied_eval"
@@ -30,6 +43,7 @@ import (
3043 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/no_mixed_enums"
3144 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/no_namespace"
3245 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/no_redundant_type_constituents"
46+ "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/no_this_alias"
3347 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/no_require_imports"
3448 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/no_unnecessary_boolean_literal_compare"
3549 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/no_unnecessary_template_expression"
@@ -50,6 +64,7 @@ import (
5064 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/only_throw_error"
5165 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/prefer_as_const"
5266 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/prefer_promise_reject_errors"
67+ // "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/prefer_readonly_parameter_types" // Temporarily disabled - incomplete implementation
5368 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/prefer_reduce_type_parameter"
5469 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/prefer_return_this_type"
5570 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/promise_function_async"
@@ -60,10 +75,25 @@ import (
6075 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/restrict_template_expressions"
6176 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/return_await"
6277 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/switch_exhaustiveness_check"
78+ "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/triple_slash_reference"
6379 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/unbound_method"
80+ "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/unified_signatures"
6481 "github.com/web-infra-dev/rslint/internal/plugins/typescript/rules/use_unknown_in_catch_callback_variable"
6582 "github.com/web-infra-dev/rslint/internal/rule"
83+ "github.com/web-infra-dev/rslint/internal/rules/array_callback_return"
84+ "github.com/web-infra-dev/rslint/internal/rules/constructor_super"
6685 "github.com/web-infra-dev/rslint/internal/rules/dot_notation"
86+ "github.com/web-infra-dev/rslint/internal/rules/for_direction"
87+ "github.com/web-infra-dev/rslint/internal/rules/getter_return"
88+ "github.com/web-infra-dev/rslint/internal/rules/no_async_promise_executor"
89+ "github.com/web-infra-dev/rslint/internal/rules/no_await_in_loop"
90+ "github.com/web-infra-dev/rslint/internal/rules/no_class_assign"
91+ "github.com/web-infra-dev/rslint/internal/rules/no_compare_neg_zero"
92+ "github.com/web-infra-dev/rslint/internal/rules/no_cond_assign"
93+ "github.com/web-infra-dev/rslint/internal/rules/no_const_assign"
94+ "github.com/web-infra-dev/rslint/internal/rules/no_constant_binary_expression"
95+ "github.com/web-infra-dev/rslint/internal/rules/no_constant_condition"
96+ "github.com/web-infra-dev/rslint/internal/rules/no_constructor_return"
6797)
6898
6999// RslintConfig represents the top-level configuration array
@@ -326,22 +356,36 @@ func (config RslintConfig) GetRulesForFile(filePath string) map[string]*RuleConf
326356func RegisterAllRules () {
327357 registerAllTypeScriptEslintPluginRules ()
328358 registerAllEslintImportPluginRules ()
359+ registerAllCoreEslintRules ()
329360}
330361
331362// registerAllTypeScriptEslintPluginRules registers all available rules in the global registry
332363func registerAllTypeScriptEslintPluginRules () {
333364 GlobalRuleRegistry .Register ("@typescript-eslint/adjacent-overload-signatures" , adjacent_overload_signatures .AdjacentOverloadSignaturesRule )
334365 GlobalRuleRegistry .Register ("@typescript-eslint/array-type" , array_type .ArrayTypeRule )
335366 GlobalRuleRegistry .Register ("@typescript-eslint/await-thenable" , await_thenable .AwaitThenableRule )
367+ GlobalRuleRegistry .Register ("@typescript-eslint/ban-ts-comment" , ban_ts_comment .BanTsCommentRule )
368+ GlobalRuleRegistry .Register ("@typescript-eslint/ban-types" , ban_types .BanTypesRule )
336369 GlobalRuleRegistry .Register ("@typescript-eslint/class-literal-property-style" , class_literal_property_style .ClassLiteralPropertyStyleRule )
370+ GlobalRuleRegistry .Register ("@typescript-eslint/consistent-generic-constructors" , consistent_generic_constructors .ConsistentGenericConstructorsRule )
371+ GlobalRuleRegistry .Register ("@typescript-eslint/consistent-indexed-object-style" , consistent_indexed_object_style .ConsistentIndexedObjectStyleRule )
372+ GlobalRuleRegistry .Register ("@typescript-eslint/consistent-return" , consistent_return .ConsistentReturnRule )
373+ GlobalRuleRegistry .Register ("@typescript-eslint/consistent-type-assertions" , consistent_type_assertions .ConsistentTypeAssertionsRule )
374+ GlobalRuleRegistry .Register ("@typescript-eslint/consistent-type-definitions" , consistent_type_definitions .ConsistentTypeDefinitionsRule )
375+ GlobalRuleRegistry .Register ("@typescript-eslint/consistent-type-exports" , consistent_type_exports .ConsistentTypeExportsRule )
376+ GlobalRuleRegistry .Register ("@typescript-eslint/consistent-type-imports" , consistent_type_imports .ConsistentTypeImportsRule )
377+ GlobalRuleRegistry .Register ("@typescript-eslint/default-param-last" , default_param_last .DefaultParamLastRule )
337378 GlobalRuleRegistry .Register ("@typescript-eslint/dot-notation" , dot_notation .DotNotationRule )
338379 GlobalRuleRegistry .Register ("@typescript-eslint/no-array-delete" , no_array_delete .NoArrayDeleteRule )
339380 GlobalRuleRegistry .Register ("@typescript-eslint/no-base-to-string" , no_base_to_string .NoBaseToStringRule )
340381 GlobalRuleRegistry .Register ("@typescript-eslint/no-confusing-void-expression" , no_confusing_void_expression .NoConfusingVoidExpressionRule )
382+ GlobalRuleRegistry .Register ("@typescript-eslint/no-duplicate-enum-values" , no_duplicate_enum_values .NoDuplicateEnumValuesRule )
341383 GlobalRuleRegistry .Register ("@typescript-eslint/no-duplicate-type-constituents" , no_duplicate_type_constituents .NoDuplicateTypeConstituentsRule )
342384 GlobalRuleRegistry .Register ("@typescript-eslint/no-explicit-any" , no_explicit_any .NoExplicitAnyRule )
343385 GlobalRuleRegistry .Register ("@typescript-eslint/no-empty-function" , no_empty_function .NoEmptyFunctionRule )
344386 GlobalRuleRegistry .Register ("@typescript-eslint/no-empty-interface" , no_empty_interface .NoEmptyInterfaceRule )
387+ GlobalRuleRegistry .Register ("@typescript-eslint/no-extraneous-class" , no_extraneous_class .NoExtraneousClassRule )
388+ GlobalRuleRegistry .Register ("@typescript-eslint/no-invalid-void-type" , no_invalid_void_type .NoInvalidVoidTypeRule )
345389 GlobalRuleRegistry .Register ("@typescript-eslint/no-floating-promises" , no_floating_promises .NoFloatingPromisesRule )
346390 GlobalRuleRegistry .Register ("@typescript-eslint/no-for-in-array" , no_for_in_array .NoForInArrayRule )
347391 GlobalRuleRegistry .Register ("@typescript-eslint/no-implied-eval" , no_implied_eval .NoImpliedEvalRule )
@@ -351,6 +395,7 @@ func registerAllTypeScriptEslintPluginRules() {
351395 GlobalRuleRegistry .Register ("@typescript-eslint/no-mixed-enums" , no_mixed_enums .NoMixedEnumsRule )
352396 GlobalRuleRegistry .Register ("@typescript-eslint/no-namespace" , no_namespace .NoNamespaceRule )
353397 GlobalRuleRegistry .Register ("@typescript-eslint/no-redundant-type-constituents" , no_redundant_type_constituents .NoRedundantTypeConstituentsRule )
398+ GlobalRuleRegistry .Register ("@typescript-eslint/no-this-alias" , no_this_alias .NoThisAliasRule )
354399 GlobalRuleRegistry .Register ("@typescript-eslint/no-require-imports" , no_require_imports .NoRequireImportsRule )
355400 GlobalRuleRegistry .Register ("@typescript-eslint/no-unnecessary-boolean-literal-compare" , no_unnecessary_boolean_literal_compare .NoUnnecessaryBooleanLiteralCompareRule )
356401 GlobalRuleRegistry .Register ("@typescript-eslint/no-unnecessary-template-expression" , no_unnecessary_template_expression .NoUnnecessaryTemplateExpressionRule )
@@ -371,6 +416,10 @@ func registerAllTypeScriptEslintPluginRules() {
371416 GlobalRuleRegistry .Register ("@typescript-eslint/only-throw-error" , only_throw_error .OnlyThrowErrorRule )
372417 GlobalRuleRegistry .Register ("@typescript-eslint/prefer-as-const" , prefer_as_const .PreferAsConstRule )
373418 GlobalRuleRegistry .Register ("@typescript-eslint/prefer-promise-reject-errors" , prefer_promise_reject_errors .PreferPromiseRejectErrorsRule )
419+ // TODO: prefer-readonly-parameter-types needs complete implementation for proper type checking
420+ // Temporarily disabled until the isReadonlyType function is fully implemented with proper
421+ // detection of readonly arrays, readonly objects, function types, and other edge cases
422+ // GlobalRuleRegistry.Register("@typescript-eslint/prefer-readonly-parameter-types", prefer_readonly_parameter_types.PreferReadonlyParameterTypesRule)
374423 GlobalRuleRegistry .Register ("@typescript-eslint/prefer-reduce-type-parameter" , prefer_reduce_type_parameter .PreferReduceTypeParameterRule )
375424 GlobalRuleRegistry .Register ("@typescript-eslint/prefer-return-this-type" , prefer_return_this_type .PreferReturnThisTypeRule )
376425 GlobalRuleRegistry .Register ("@typescript-eslint/promise-function-async" , promise_function_async .PromiseFunctionAsyncRule )
@@ -381,7 +430,9 @@ func registerAllTypeScriptEslintPluginRules() {
381430 GlobalRuleRegistry .Register ("@typescript-eslint/restrict-template-expressions" , restrict_template_expressions .RestrictTemplateExpressionsRule )
382431 GlobalRuleRegistry .Register ("@typescript-eslint/return-await" , return_await .ReturnAwaitRule )
383432 GlobalRuleRegistry .Register ("@typescript-eslint/switch-exhaustiveness-check" , switch_exhaustiveness_check .SwitchExhaustivenessCheckRule )
433+ GlobalRuleRegistry .Register ("@typescript-eslint/triple-slash-reference" , triple_slash_reference .TripleSlashReferenceRule )
384434 GlobalRuleRegistry .Register ("@typescript-eslint/unbound-method" , unbound_method .UnboundMethodRule )
435+ GlobalRuleRegistry .Register ("@typescript-eslint/unified-signatures" , unified_signatures .UnifiedSignaturesRule )
385436 GlobalRuleRegistry .Register ("@typescript-eslint/use-unknown-in-catch-callback-variable" , use_unknown_in_catch_callback_variable .UseUnknownInCatchCallbackVariableRule )
386437}
387438
@@ -391,6 +442,23 @@ func registerAllEslintImportPluginRules() {
391442 }
392443}
393444
445+ // registerAllCoreEslintRules registers core ESLint rules
446+ func registerAllCoreEslintRules () {
447+ GlobalRuleRegistry .Register ("array-callback-return" , array_callback_return .ArrayCallbackReturnRule )
448+ GlobalRuleRegistry .Register ("constructor-super" , constructor_super .ConstructorSuperRule )
449+ GlobalRuleRegistry .Register ("for-direction" , for_direction .ForDirectionRule )
450+ GlobalRuleRegistry .Register ("getter-return" , getter_return .GetterReturnRule )
451+ GlobalRuleRegistry .Register ("no-async-promise-executor" , no_async_promise_executor .NoAsyncPromiseExecutorRule )
452+ GlobalRuleRegistry .Register ("no-await-in-loop" , no_await_in_loop .NoAwaitInLoopRule )
453+ GlobalRuleRegistry .Register ("no-class-assign" , no_class_assign .NoClassAssignRule )
454+ GlobalRuleRegistry .Register ("no-compare-neg-zero" , no_compare_neg_zero .NoCompareNegZeroRule )
455+ GlobalRuleRegistry .Register ("no-cond-assign" , no_cond_assign .NoCondAssignRule )
456+ GlobalRuleRegistry .Register ("no-const-assign" , no_const_assign .NoConstAssignRule )
457+ GlobalRuleRegistry .Register ("no-constant-binary-expression" , no_constant_binary_expression .NoConstantBinaryExpressionRule )
458+ GlobalRuleRegistry .Register ("no-constant-condition" , no_constant_condition .NoConstantConditionRule )
459+ GlobalRuleRegistry .Register ("no-constructor-return" , no_constructor_return .NoConstructorReturnRule )
460+ }
461+
394462// getAllTypeScriptEslintPluginRules returns all registered rules (for backward compatibility when no config is provided)
395463func getAllTypeScriptEslintPluginRules () []rule.Rule {
396464 allRules := GlobalRuleRegistry .GetAllRules ()
0 commit comments