Skip to content

Commit 7b67b2e

Browse files
kdy1delino[bot]github-actions[bot]claude
authored
feat: Implement many new rules (#386)
Co-authored-by: delino[bot] <235003666+delino[bot]@users.noreply.github.com> Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Claude <[email protected]>
1 parent b9463bf commit 7b67b2e

File tree

77 files changed

+17006
-3902
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+17006
-3902
lines changed

.github/workflows/devbird.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: 'DevBird'
2+
run-name: 'DevBird: ${{ inputs.task_title }}'
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
devbird_api_url:
8+
description: 'The URL of the DevBird instance'
9+
type: string
10+
required: false
11+
default: 'https://devbird.api.delino.io'
12+
13+
prompt:
14+
description: 'Instructions for DevBird. Can be a direct prompt or custom template.'
15+
type: string
16+
required: true
17+
18+
base_branch:
19+
description: 'The branch to use as the base/source when creating new branches (defaults to repository default branch)'
20+
type: string
21+
required: false
22+
default: 'main'
23+
24+
agent:
25+
description: "The agent to use for the action. Can be 'claude_code', 'gemini_cli', 'codex_cli' or 'opencode'"
26+
type: choice
27+
default: 'claude_code'
28+
options:
29+
- claude_code
30+
- gemini_cli
31+
- codex_cli
32+
- opencode
33+
- crush_cli
34+
- github_copilot_cli
35+
36+
agent_model:
37+
description: 'The (optional) model to use for the agent'
38+
type: string
39+
required: false
40+
default: ''
41+
42+
devbird_workflow_execution_token:
43+
description: 'The token to use for the DevBird task'
44+
type: string
45+
required: false
46+
default: ''
47+
48+
devbird_mode:
49+
description: "The DevBird execution mode. Can be 'develop' (default) or 'plan' (for task graph planning)"
50+
type: choice
51+
default: 'develop'
52+
options:
53+
- develop
54+
- plan
55+
56+
task_title:
57+
description: 'The title of the DevBird task'
58+
type: string
59+
required: false
60+
default: ''
61+
62+
jobs:
63+
devbird:
64+
runs-on: 'ubuntu-latest'
65+
permissions:
66+
contents: write
67+
pull-requests: write
68+
issues: write
69+
id-token: write
70+
actions: read # Required for Claude to read CI results on PRs
71+
steps:
72+
- name: Checkout code
73+
uses: actions/checkout@v5
74+
75+
- name: Setup Node
76+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
77+
with:
78+
node-version: '24'
79+
- name: Setup Go
80+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
81+
with:
82+
go-version: 1.25.0
83+
- name: Install pnpm
84+
run: corepack enable
85+
- name: Install JavaScript dependencies
86+
run: pnpm install
87+
- name: Run DevBird
88+
uses: delinoio/devbird-action@main
89+
with:
90+
agent: ${{ inputs.agent }}
91+
agent_model: ${{ inputs.agent_model }}
92+
devbird_mode: ${{ inputs.devbird_mode }}
93+
devbird_workflow_execution_token: ${{ inputs.devbird_workflow_execution_token }}
94+
prompt: ${{ inputs.prompt }}
95+
base_branch: ${{ inputs.base_branch }}
96+
delino_access_token: ${{ secrets.DELINO_ACCESS_TOKEN }}
97+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
98+
env:
99+
DEVBIRD_API_URL: ${{ inputs.devbird_api_url }}

internal/config/config.go

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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
326356
func RegisterAllRules() {
327357
registerAllTypeScriptEslintPluginRules()
328358
registerAllEslintImportPluginRules()
359+
registerAllCoreEslintRules()
329360
}
330361

331362
// registerAllTypeScriptEslintPluginRules registers all available rules in the global registry
332363
func 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)
395463
func getAllTypeScriptEslintPluginRules() []rule.Rule {
396464
allRules := GlobalRuleRegistry.GetAllRules()

0 commit comments

Comments
 (0)