Skip to content

TINY-12772: Add new katamari type suggestion rule - #54

Open
ltrouton wants to merge 5 commits into
mainfrom
feature/TINY-12772
Open

TINY-12772: Add new katamari type suggestion rule#54
ltrouton wants to merge 5 commits into
mainfrom
feature/TINY-12772

Conversation

@ltrouton

Copy link
Copy Markdown
Contributor

Related Ticket: TINY-12772

Description of Changes:

  • Add a custom eslint rule that suggests to use the Type module from katamari instead of manualy 'typeof' and individual undefined and null checks

Pre-checks:

  • Changelog entry added
  • package.json version bumped (if first change of new major/minor)
  • Tests have been added (if applicable)

@ltrouton
ltrouton requested review from a team, MitchC1999, TheSpyder, jscasca and tiny-ben-tran and removed request for a team August 27, 2025 04:10
@ltrouton
ltrouton requested review from a team as code owners August 27, 2025 04:10
@ltrouton

Copy link
Copy Markdown
Contributor Author

Use of rule in tinymce repo: tinymce/tinymce#10558

@spocke spocke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also detect truthy checks I guess that needs type information? I assume this will create a lot of errors on the old tinymce code base. But we can just turn of the rule or make a monster PR to fix it.

Comment thread src/test/rules/PreferKatamariTypeTest.ts Outdated
@ltrouton

ltrouton commented Dec 9, 2025

Copy link
Copy Markdown
Contributor Author

I am thinking of handling falsy and truthy checks using native typescript eslint rules:

I need to look into this more again

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.

3 participants