Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 08:18
    FieryCod commented #1379
  • Jan 30 2019 10:01
    atif089 commented #1379
  • Jan 30 2019 10:01
    atif089 commented #1379
  • Jan 30 2019 10:01
    atif089 commented #1379
  • Jan 30 2019 04:11
    tclindner opened #1998
  • Jan 28 2019 05:21

    ljharb on master

    [eslint config] [base] [patch] … [eslint config] [patch] extend … Merge pull request #1996 from r… (compare)

  • Jan 28 2019 05:21
    ljharb closed #1996
  • Jan 28 2019 04:50
    ljharb synchronize #1996
  • Jan 27 2019 21:45
    ljharb closed #1997
  • Jan 27 2019 21:45

    ljharb on master

    [editorial] [react] fix typo [eslint config] [*] [deps] upda… (compare)

  • Jan 27 2019 21:39
    ljharb synchronize #1997
  • Jan 27 2019 21:39
    ljharb labeled #1997
  • Jan 27 2019 21:39
    ljharb labeled #1997
  • Jan 26 2019 18:14
    ljharb labeled #1996
  • Jan 26 2019 18:14
    ljharb labeled #1996
  • Jan 26 2019 18:13
    ljharb synchronize #1996
  • Jan 26 2019 18:05
    ljharb commented #1996
  • Jan 26 2019 08:55
    telmen opened #1997
  • Jan 24 2019 19:37
    peteclark3 commented #1689
  • Jan 24 2019 17:25
    ljharb commented #747
Muhammad
@MuhammadJamaluddin
  • Form label must have ALL of the following types of associated control: nesting, ideslint(jsx-a11y/label-has-for)
I am not sure why... or how to fix it
Jordan Harband
@ljharb
@muhammadjamaluddin you have to BOTH nest, and use for/ID
ie, give the input an id and give the label an htmlFor
there's some engines for which nesting isn't enough
Muhammad
@MuhammadJamaluddin
Yeah, that makes sense. Thanks @ljharb
Richard Sithole
@Sliqric7053
Hi there.
I'm trying to create a regex that will ensure that this string passes 50 000.00
I've tried this ^[0-9]{1,2}([,.][0-9]{1,2})?$ but does not seem to work.
Any ideas how I could achieve this?
1point7point4
@1point7point4
/[\d\s]*.[\d\d]/
Or better yet, /50 000.00/
More use cases, please
Actually you could just do /./ and match any non-empty string
That would definitely match "50 000.00"
Tbh you don’t even need a regex, just do x === "50 000.00"
Abhisek Pattnaik
@abhisekp

hi folks - this is not a general JS help channel. It's a channel for the airbnb/javascript repo - which is airbnb's javascript style guide.

:point_up: April 16, 2019 10:50 PM @Sliqric7053

jsx
@riverspirit
Hey, we're following airbnb styleguide for our project and I wanted to know if its ok to prefix $ sign when storing DOM references (I saw the jQuery section in the styleguide, but we aren't using jQuery)
eg: $body = document.querySelector('body')
I mean, is it acceptable, frowned up on or recommended to put $ sign in front of such variables storing DOM ref
1point7point4
@1point7point4
At a glance, it seems like there's nothing saying you should only prefix with $ for jQuery
I'm not particularly advanced at web development but I think it's a good idea since people go "oh! dom manipulation!" whenever they see a $
jsx
@riverspirit
Yeah, I thought the same but my colleague says he hates it :) So I wanted to get the opinion of others
1point7point4
@1point7point4
You could ask him about using domFoo instead of $foo
What naming conventions does your colleague have in mind?
jsx
@riverspirit
He's for domFoo
1point7point4
@1point7point4
Do you/other colleagues have any particular concerns with doing it that way?
jsx
@riverspirit
Not really
1point7point4
@1point7point4
okay
GOPINATH DURAISAMY
@gopisathya
Hai
1point7point4
@1point7point4
no
Jordan Harband
@ljharb
@riverspirit sure, it's fine to do that
@riverspirit i wouldn't prefix like that for anything else tho.
@riverspirit a prefix of "dom" makes no sense, primarily because literally nobody does that, and literally everybody uses the $ prefix/
jsx
@riverspirit
Thanks for your thoughts on it @ljharb :)
What did you have in mind when you said "i wouldn't prefix like that for anything else tho"?
Jordan Harband
@ljharb
like for things that aren’t jquery objects
1point7point4
@1point7point4
it's not a jquery object though, just a selected one
Jordan Harband
@ljharb
that’s a jquery Object
1point7point4
@1point7point4
no, it's just a dom reference
Jordan Harband
@ljharb
no, it’s not
the $ function produces a jquery object, with jquery methods
1point7point4
@1point7point4
But he says "Hey, we're following airbnb styleguide for our project and I wanted to know if its ok to prefix $ sign when storing DOM references (I saw the jQuery section in the styleguide, but we aren't using jQuery)"
Jordan Harband
@ljharb
Ohhh sorry
1point7point4
@1point7point4
i.e. he's not actually using jQuery but is wondering about using $ anyway
Jordan Harband
@ljharb
@riverspirit in that case no, don’t use a prefix for dom refs
$ means jquery, and nobody uses prefixes for anything else
jsx
@riverspirit
Thanks @1point7point4 for clarifying my point.
Thanks for your thoughts again @ljharb
1point7point4
@1point7point4
you're welcome
Danilo Santos
@DanStos
Hi all,
Does anyone know if exists an async/await for IE11?
1point7point4
@1point7point4
yes
it's called callbacks
they're pretty good, you should try them sometime
if you don't like those you can try promises or tasks