Skip to content

Commit b27d441

Browse files
ljharbaduh95
andauthored
fixup: Update tools/eslint-rules/prefer-proto.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent b37bda2 commit b27d441

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tools/eslint-rules/prefer-proto.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ module.exports = {
2727
},
2828
create(context) {
2929
return {
30-
/* eslint max-len: 0 */
31-
'CallExpression[callee.type="Identifier"][callee.name="ObjectCreate"][arguments.0.type="Literal"][arguments.0.value=null][arguments.length=1],\
32-
CallExpression[callee.type="MemberExpression"][callee.object.name="Object"][callee.property.name="create"][arguments.0.type="Literal"][arguments.0.value=null][arguments.length=1]\
33-
'(node) {
30+
'CallExpression[arguments.length=1][arguments.0.type="Literal"][arguments.0.value=null]:matches(\
31+
[callee.type="Identifier"][callee.name="ObjectCreate"],\
32+
[callee.type="MemberExpression"][callee.object.name="Object"][callee.property.name="create"]\
33+
)'(node) {
3434
if (node.callee.type === 'MemberExpression') {
3535
const scope = declaredScope(context, node.callee.object);
3636
if (scope !== 'module' && scope !== 'global') {

0 commit comments

Comments
 (0)