Skip to content

Add make_assignment_local rule#346

Merged
jeparlefrancais merged 8 commits into
seaofvoices:mainfrom
notpoiu:support-const-keword
May 19, 2026
Merged

Add make_assignment_local rule#346
jeparlefrancais merged 8 commits into
seaofvoices:mainfrom
notpoiu:support-const-keword

Conversation

@notpoiu

@notpoiu notpoiu commented May 16, 2026

Copy link
Copy Markdown
Contributor

Closes #343

Adds support for Luau’s new const keyword and introduces a convert_const_to_local rule for lowering const declarations back to regular locals.

  • add entry to the changelog

@official-notfishvr

Copy link
Copy Markdown

nice

@Just3itx

Copy link
Copy Markdown

very trust worthy guy and quite useful for the lazy folks :D

- rename `LocalAssignStatement` to `VariableAssignment` (but keep a
  deprecated alias)
- rename `LocalFunctionStatement` to `FunctionAssignment` (but keep a
  deprecated alias)
- refactor the `const` boolean for a enum based `AssignmentKind`
- adjust generators to auto-fix missing values in const
- make the `remove_nil_declaration` rule skip const assignments
- add a few more test cases in a few different rules
@jeparlefrancais jeparlefrancais changed the title Add convert_const_to_local rule Add make_assignment_local rule May 19, 2026
@jeparlefrancais jeparlefrancais merged commit 2ac303f into seaofvoices:main May 19, 2026
7 of 10 checks passed
@notpoiu notpoiu deleted the support-const-keword branch May 19, 2026 20:37
@jeparlefrancais jeparlefrancais mentioned this pull request Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support const

4 participants