gajus / gajus/eslint-plugin-flowtype

Add rule to enforce error codes on flow suppressions

Open
#453 2 comments 2 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
JavaScript
Stars
1.1k
Forks
151
PR merge metrics
No merged PRs in 30d

Description

Flow version 0.121.0 allows for more specific error suppressions:
https://medium.com/flow-type/making-flow-error-suppressions-more-specific-280aa4e3c95c

It would be wonderful if we could have a rule which requires these specific error suppressions:

* `// $FlowFixMe` would fail since it has no valid error code specified
* `// $FlowFixMe[incompatible-type]` would pass since it does have a valid error code

Contributor guide

Open the contributing guide

Research direction

Start by locating the existing Flow suppression handling and related ESLint rule tests. Verify how comments such as $FlowFixMe are parsed, then define the rule behavior from the examples: unsuffixed suppressions fail, while suppressions with an error code pass. Done means the behavior is covered by tests and the rule is available through the plugin.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.