|
| 1 | +module.exports = { |
| 2 | + parser: 'babel-eslint', |
| 3 | + plugins: ['flowtype'], |
| 4 | + extends: ['plugin:flowtype/recommended', 'prettier/flowtype'], |
| 5 | + rules: { |
| 6 | + 'flowtype/array-style-complex-type': ['error', 'verbose'], |
| 7 | + 'flowtype/array-style-simple-type': ['error', 'shorthand'], |
| 8 | + 'flowtype/arrow-parens': ['error', 'as-needed'], |
| 9 | + 'flowtype/define-flow-type': 'error', |
| 10 | + 'flowtype/newline-after-flow-annotation': 'error', |
| 11 | + 'flowtype/no-dupe-keys': 'error', |
| 12 | + 'flowtype/no-existential-type': 'error', |
| 13 | + 'flowtype/no-flow-fix-me-comments': 'error', |
| 14 | + 'flowtype/no-mixed': 'warn', |
| 15 | + 'flowtype/no-primitive-constructor-types': 'error', |
| 16 | + 'flowtype/no-unused-expressions': 'error', |
| 17 | + 'flowtype/no-weak-types': 'error', |
| 18 | + 'flowtype/require-compound-type-alias': 'warn', |
| 19 | + 'flowtype/require-exact-type': 'warn', |
| 20 | + 'flowtype/require-indexer-name': ['error', 'always'], |
| 21 | + 'flowtype/require-inexact-type': 'error', |
| 22 | + 'flowtype/require-parameter-type': 'error', |
| 23 | + 'flowtype/require-readonly-react-props': 'error', |
| 24 | + 'flowtype/require-return-type': [ |
| 25 | + 'warn', |
| 26 | + 'always', |
| 27 | + { excludeArrowFunctions: true } |
| 28 | + ], |
| 29 | + 'flowtype/require-types-at-top': 'warn', |
| 30 | + 'flowtype/require-valid-file-annotation': [ |
| 31 | + 'error', |
| 32 | + 'always', |
| 33 | + { annotationStyle: 'line', strict: true } |
| 34 | + ], |
| 35 | + 'flowtype/spread-exact-type': 'error', |
| 36 | + 'flowtype/type-import-style': ['error', 'declaration'] |
| 37 | + } |
| 38 | +}; |
0 commit comments