Skip to content

🚀 Feature: Implement unnecessaryTypeAnnotations rule (TypeScript) #2239

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Feature Request Checklist

Overview

Per flint.fyi/rules, Flint is intended to have a unnecessaryTypeAnnotations rule in the TypeScript plugin (ts). It'll behave roughly equivalently to the existing implementations in other linters to start. This issue tracks adding that rule.

Adding this rule will entail creating the following new source files:

  • packages/ts/src/rules/unnecessaryTypeAnnotations.ts: implementation of the rule itself
  • packages/ts/src/rules/unnecessaryTypeAnnotations.test.ts: tests for the rule
  • packages/site/src/content/docs/rules/ts/unnecessaryTypeAnnotations.mdx: documentation of the rule

Additionally, the following files will need to be edited:

  • packages/comparisons/src/data.json: Comparisons data will need to mention the rule is now "status": "implemented"
  • packages/ts/src/plugin.ts: Included rules should have the new one inserted in alphabetical order

Additional Info

Existing rules in other linters:

❤️‍🔥

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai assignedA maintainer will resolve this issue with an AI agent.plugin: tsThe plugin for TypeScript, a typed superset of JavaScript.status: accepting prsPlease, send a pull request to resolve this! 🙏type: featureNew enhancement or request 🚀

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions