diff --git a/src/rules/requireValidFileAnnotation.js b/src/rules/requireValidFileAnnotation.js index 0a2427a3..911d59ef 100644 --- a/src/rules/requireValidFileAnnotation.js +++ b/src/rules/requireValidFileAnnotation.js @@ -9,7 +9,7 @@ const defaults = { }; const looksLikeFlowFileAnnotation = (comment) => { - return /@(?:no)?f/i.test(comment); + return /@(?:no)?flo/i.test(comment); }; const isValidAnnotationStyle = (node, style) => { diff --git a/tests/rules/assertions/requireValidFileAnnotation.js b/tests/rules/assertions/requireValidFileAnnotation.js index 394cfd68..98c804b9 100644 --- a/tests/rules/assertions/requireValidFileAnnotation.js +++ b/tests/rules/assertions/requireValidFileAnnotation.js @@ -167,6 +167,19 @@ export default { } ] }, + { + code: '// @function', + options: [ + 'never', + { + annotationStyle: 'none' + } + ] + }, + { + code: '// @fixable', + options: [ 'error', 'never' ] + }, { code: '/* @flow */', options: [ @@ -178,5 +191,3 @@ export default { } ] }; - -