mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
25 lines
526 B
JavaScript
25 lines
526 B
JavaScript
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)
|
|
}
|
|
}
|
|
}
|
|
}
|