►
Description
In this pairing session we create an eslint rule to detect that `off(...)` and `$off(...)` are never called with less than 2 arguments.
https://gitlab.com/gitlab-org/frontend/eslint-plugin/-/merge_requests/19
A
B
A
B
B
A
Well,
basically,
so
what
we're
gonna
do
is
gonna
check
out
this
project.
What
do
you
think,
I
think
that's
a
good
idea.
Let's
bring
a
terminal
on
this
screen
yeah.
You
can
definitely
leave.
B
A
B
I
don't
know
no,
no
global
off.
A
A
B
B
A
B
How
about
yeah,
how
about
we
find
all
of
these
seem
like
they're,
really
complicated
bulls?
How
about
we
find?
How
can
we
find
a
rule
that
exists
on
like
that's
much
simpler
in
the
wild
yeah
in
the
estate
called.
A
A
A
No,
maybe
we
go
for
like
semicolon
at
the
end.
A
B
The
from
jquery,
the
ones
on
jquery
and
and
the
the
end
view
as
well,
the
off
the
dollar
off
and
off
yeah.
But,
yes,
lynch
rules
run
on
view
files
like
without
any
help,
because
I
notice,
if
you
go
back
to
our
project,
we
have
like
view
versions
of
some
of
these
rules.
B
Oh
jesus,
oh,
it
is
review
template,
I
think
it
says,
detect
non-externalized
screens
and
view
template
attributes.
I
think
this
is
just
for
view.
Template
stuff.
B
B
B
Yes,
yes,
you
see
what
they
return
here.
This
is
a
visitor
pattern
of
how
so
eslint
works.
With
this
visitor,
padding,
you
kind
of
say
hey
when
you
hit
this
kind
of
node
call
back
this
function,
and
so
this
is
how
they're,
whenever
you
hit
a
function
expression,
I
don't
know
what
the
dollar
exit
is,
but
or
not
the
dollar
but
the
colon
exit.
B
But
whenever
you
hit
a
function,
expression,
here's
how
we're
going
to
handle
it,
and
then
we
can
use
ast
explorer
to
really
help
out
with
what
all
of
that.
What
are
we
actually
looking
for.
B
Identifier
well
yeah,
but
I
was
thinking
if
we
look
for
all
identifiers
like
we're
going
to
get
everything.
So
I
was
thinking
looking
for
the
call
expression
we
want
to
get.
A
The
so
called
expression
is
what
you're
calling
a
function
right.
Basically,.
A
Is
there
is
there
any
yes
and
rule
that
come
to
your
mind
that
examine
now
you're
calling
functions.
B
A
A
B
A
But
this
is
not
a
test
file.
A
lot.
A
A
B
So
you
see
there
we
go,
we
have
so
check
that
out
call
expression,
yeah
and
check
out
there.
Here's
call
expression
takes
a
note
or
check
hey.
Is
it
a
promise,
reject
call
and
the
way
they
do?
That
is
what's
the
callee?
Is
it
a
member
expression?
Is
the
identifier
yeah.
B
A
So
this
is
basically
like
this
right
and
it
takes
a
note,
yep
yep
correct.
Do
you
think,
should
we
just
go
like
step
by
step,
I'm
good
with
that
yeah
we
can
abstract
later
and
I
suppose
we
will
need
to
have
a
test
now
right,
yeah.
That
makes
sense.
A
A
B
B
A
Yeah,
okay,
so
this
should
have
failed.
They
didn't
no,
but
my
question
is:
can
we
run
only
the
tests
so
because
this
is
our
console
log
right?
Oh.
B
A
Let
me
maybe
I
can
try
like
you,
can
just
pass
in.
A
B
Me,
let
me
see
if
the
rule
tester
thing
is
from
it's
an
island
thing.
Let
me
see
if
there's
a
force.
A
A
B
B
A
B
So
before
we
go
down,
I
want
to
show
one
other
part
that
we're
going
to
run
into
here.
Yeah
we
can
actually,
we
can
actually
go
to
our.
We
can
write
a
test
case
for
this
first,
so
on
yeah
here
so
there's
there,
when
we
have
code
off
like
that,
but
there's
also
going
to
be
off
when
it's
part
of
a
property.
B
So
if
we
do
code
and
then
like
event,
dot
off
or
something
yeah
and
then
with
dollar
signs,
our
or
the
other
is
the
other
state
is
those
both
of
those
states.
But
then,
with
dollar
signs
is
what
we're
concerned
about
as
well.
B
B
Oh
you're,
good,
I'm
getting
that
I'm
getting
a
headache.
I
think
I
need
to
get
some
more
coffee.
I
think
my
body's
gonna
tell
me
something.
A
A
Okay,
so
if
we
go
back
to
this
right,
it's
probably
reject
call.
So
this
is
basically
what
identified
the
function.
We
should
have
something
similar
to
this
right
yep.
So
what?
If?
What
do
you
think
if
I
just
take
this
all
right,
I
love
it.
Can
I
do
it
outside
of
the
context
now,
let's
do
in
the
context.
Just
I
don't
know.
B
A
A
B
Yeah-
and
I
don't
know
if
we
want
to
also
check
the
property
type
or
I
don't
know
if
that's
important
to
us,
like
that
example,
checked
both
the
type
that
it
was
an
identifier.
I
don't
know
if
that's
something
we're
interested
in
also
doing
or
just
the
name.
A
A
B
The
more
the
more
conditions
we
add,
the
less
of
a
chance
of
a
false,
positive,
positive
yeah,
that's
also
true,
so
I'm
I'm
kind
of
fine.
If
we
add
more.
Oh
nice,
oh
you're,
already
engineering.
B
A
B
A
So
it's
either
this
right,
yeah
or
or
no
dot.
Identifier.
B
B
B
B
I'm
a
fan
that
makes
sense
that
that
sounds
good
to
me.
Can
we
do
one
more?
Can
we
add
one
more
case
to
our.
B
Yes,
I
think
so
yeah
good
idea.
The
other
thing
I
want
to
do
is
if
we
have
like
three
dots,
if
we're
doing
a
long
member
expression,
wanna
double
check
that
that
would
do
it
as
well
like
if
I
do
yeah
this
dot
event,
dot
off
or
something
or
yeah.
That's
good
cool.
B
A
B
B
A
B
B
A
B
B
B
B
B
A
A
A
B
Maybe,
oh,
maybe,
though,
we're
not
specifying
our
report
correctly,
like
maybe
it's
reporting
it
as
a
warning
or
something.
So
if
we
do
less
than
two.
A
B
A
A
We
can
remove
category,
I
guess
I
don't
know
it's
a
bit
weird
yeah.
That
is
weird.
B
Can
we
can
we?
I
know
you
gotta
hop
off
if
you
need
to
hop.
B
Go
ahead
for
it,
can
we
compare
our
invalid
ones?
What
so
it's
saying
did
not
specify?
Can
we
just
compare
art
spec
to
one
of
the
pre-existing
ones
make.
B
A
B
A
A
B
Held
of
the
type
of
know
that
it
got
it
right,
cool
yeah,
that's
great,
hey
again!
This
was
this
was
wasn't
a
whole
lot
of
effort
and
it's
green
nice.
Yes,
thanks
so
much
nico,
yeah
and
yeah.
Please
push
too
and
yeah
for
like
an
initial
review.
I
can.
I
could
do
some
cleanup
stuff
if
you
feel
like,
and
then
we
can
pass
it
to
another
maintainer
yeah.