blob: 4d8d35a388ccf5ee07e6a3d670a037bfda961818 [file] [log] [blame]
module.exports = {
meta: {
docs: {},
schema: []
},
create(context) {
function handleComment(comment) {
var value = comment.value.trim()
if (value.match(/@noflow/)) {
context.report(comment, 'Do not disable Flow type checker, use @flow instead.')
}
}
return {
LineComment: handleComment,
BlockComment: handleComment,
Program() {
const comments = context.getSourceCode().getAllComments()
comments.forEach(handleComment)
}
}
}
}