Skip to content

Commit

Permalink
Enable new rules for eslint-plugin-flowtype
Browse files Browse the repository at this point in the history
- no-primitive-constructor-types
- require-variable-type
  • Loading branch information
wyze committed Jan 10, 2017
1 parent 0d0f092 commit dd039a1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rules/flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ module.exports = {
// disallow duplicate keys in types
// https://github.com/gajus/eslint-plugin-flowtype#no-dupe-keys
'flowtype/no-dupe-keys': 'error',
// disallow use of primitive constructor types (e.g., Boolean, String)
// https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-no-primitive-constructor-types
'flowtype/no-primitive-constructor-types': 'error',
// better to be specific, but only warn
// https://github.com/gajus/eslint-plugin-flowtype#no-weak-types
'flowtype/no-weak-types': 'warn',
Expand All @@ -21,6 +24,9 @@ module.exports = {
// warn when a file isn't typed
// https://github.com/gajus/eslint-plugin-flowtype#require-valid-file-annotation
'flowtype/require-valid-file-annotation': 'warn',
// warn when variable isn't type annotated
// https://github.com/gajus/eslint-plugin-flowtype/tree/v2.29.2#eslint-plugin-flowtype-rules-require-variable-type
'flowtype/require-variable-type': 'warn',
// ew, semicolons
// https://github.com/gajus/eslint-plugin-flowtype#semi
'flowtype/semi': [ 'error', 'never' ],
Expand Down

0 comments on commit dd039a1

Please sign in to comment.