@wordpress/eslint-plugin
Version:
ESLint plugin for WordPress development.
19 lines (18 loc) • 324 B
JavaScript
module.exports = {
meta: {
type: 'problem',
schema: [],
},
create( context ) {
return {
'CallExpression[callee.object.callee.property.name="getSelection"][callee.property.name="getRangeAt"]'(
node
) {
context.report( {
node,
message: 'Avoid unguarded getRangeAt',
} );
},
};
},
};