mirror of
https://github.com/joelwmale/webhook-action.git
synced 2024-12-11 08:24:31 +01:00
19 lines
482 B
JavaScript
19 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.'})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|