mirror of
https://github.com/joelwmale/webhook-action.git
synced 2024-08-25 08:08:00 +00:00
20 lines
482 B
JavaScript
20 lines
482 B
JavaScript
module.exports = {
|
|
meta: {
|
|
type: 'problem',
|
|
docs: {
|
|
description: 'disallow usage of `Element.prototype.blur()`',
|
|
url: require('../url')(module)
|
|
},
|
|
schema: []
|
|
},
|
|
create(context) {
|
|
return {
|
|
CallExpression(node) {
|
|
if (node.callee.property && node.callee.property.name === 'blur') {
|
|
context.report({node, message: 'Do not use element.blur(), instead restore the focus of a previous element.'})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|