mirror of
https://github.com/joelwmale/webhook-action.git
synced 2024-12-11 08:24:31 +01:00
20 lines
503 B
JavaScript
20 lines
503 B
JavaScript
module.exports = {
|
|
meta: {
|
|
type: 'problem',
|
|
docs: {
|
|
description: 'enforce usage of `Element.prototype.getAttribute` instead of `Element.prototype.datalist`',
|
|
url: require('../url')(module)
|
|
},
|
|
schema: []
|
|
},
|
|
|
|
create(context) {
|
|
return {
|
|
MemberExpression(node) {
|
|
if (node.property && node.property.name === 'dataset') {
|
|
context.report({node, message: "Use getAttribute('data-your-attribute') instead of dataset."})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|