gajus / gajus/eslint-plugin-flowtype
Add rule to enforce error codes on flow suppressions
- 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
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