gajus/eslint-plugin-flowtype

Rule for requiring types for fn definitions only

Open

#91 opened on Aug 27, 2016

View on GitHub
 (11 comments) (0 reactions) (0 assignees)JavaScript (1,078 stars) (167 forks)batch import
help wanted

Description

One of Flow's goals was to provide an 'incremental' model, where users could incrementally migrate their code. As a user of this module, I have faced an overwhelming number of issues with the current "flowtype/require-parameter-type" rule, which throws an error on every missing declaration. A rule that would complement flow's goal of 'incremental migration' would be a separate rule for requiring types for function definitions.

Ideally, it would do something like this:

function example(number) {  // <-- require types here
  return new Promise((resolve, reject) => { 
    resolve(someArray.map(each => each)) // <-- DO NOT require types here
  })
}

Contributor guide

Rule for requiring types for fn definitions only · gajus/eslint-plugin-flowtype#91 | Good First Issue