We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c57cea commit 647807fCopy full SHA for 647807f
src/rules/noFlowFixMeComments.js
@@ -31,16 +31,24 @@ const create = (context) => {
31
};
32
33
return {
34
- BlockComment: handleComment,
35
- GenericTypeAnnotation: (node) => {
+ GenericTypeAnnotation (node) {
36
if (isIdentifier(node.id, /\$FlowFixMe/)) {
37
context.report({
38
message,
39
node: node.id
40
});
41
}
42
},
43
- LineComment: handleComment
+
+ Program () {
44
+ context
45
+ .getSourceCode()
46
+ .getAllComments()
47
+ .filter((comment) => {
48
+ return comment.type === 'Block' || comment.type === 'Line';
49
+ })
50
+ .forEach(handleComment);
51
+ }
52
53
54
0 commit comments