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
Jordan Harband
@ljharb
@isubhokarma that's not possible. you can have an array or an object that holds two values, but that's still a single value in a variable. i'm not aware of any programming language where that's possible.
also, this isn't a general help channel, it's specifically to discuss airbnb's javascript styleguide
SPBST
@SPBST
Hi, I’m new to JavaScript web development. Could you please tell me steps and require softwares to run Airbnb JavaScript for Windod
*windows machine
Jordan Harband
@ljharb
you need node, is all.
Louis Law
@louiscklaw

Hi everyone,
I would like to know meaning of three dots expression in front of this line
[...Array(5).keys()];

where can i find the information about this ? or any keywords/hints for me such that i can search google this ?

thanks in advance
Jordan Harband
@ljharb
@louiscklaw it’s spread syntax (altho in this case it’s bad, don’t use Array() ever)
this one should be Array.from({ length: 5 }, (, i) => i)
you can google it or read on mdn.
SPBST
@SPBST
@ljharb I will try with Node, Thanks!
Louis Law
@louiscklaw
@ijharb many thanks
@ijharb i got it on MDN, thank you so much
Muhammad
@MuhammadJamaluddin
I am having weird Parsing error: Unexpected token / & Parsing error: Unexpected token =eslint errors in my components... why is that?
import React from 'React';

const App = () => (
  <div>
    <Statistics />   -------> Parsing error: Unexpected token /
    <Deck />
  </div>
);

export default App;
Jordan Harband
@ljharb
looks like jsx isn’t enabled for you.
Muhammad
@MuhammadJamaluddin
What might be the culprit or how to fix that?
Jordan Harband
@ljharb
are you using the airbnb eslint config and babel preset?
Muhammad
@MuhammadJamaluddin
Yes, I've installed it using the npx install-peerdeps --dev eslint-config-airbnb command
Jordan Harband
@ljharb
ah
Muhammad
@MuhammadJamaluddin
and I have babel integrated within the webpack configuration
Jordan Harband
@ljharb
so, that's an eslint/npm bug. are you using latest eslint? if you have a lockfile, have you fully updated it?
Muhammad
@MuhammadJamaluddin
This is the version that got installed by the command eslint": "^6.1.0"
Jordan Harband
@ljharb
try rerunning the install command
Muhammad
@MuhammadJamaluddin
Will do
Muhammad
@MuhammadJamaluddin
same :(
BTW, I am using the VSCode ESlint extension
Jordan Harband
@ljharb
ahhh that's a different thing
run it on the command line
if it only breaks in vscode, it's a vscode bug.
Muhammad
@MuhammadJamaluddin
That makes sense
It does show up in the command line
$ /node_modules/.bin/eslint client/src/index.jsx

C:\Users\Muhammad\Desktop\clash royale\client\src\index.jsx
  11:18  error  Parsing error: Unexpected token =

✖ 1 problem (1 error, 0 warnings)
Jordan Harband
@ljharb
ok, then it's that npm eslint thing
do you have a lockfile?
you could try deleting the lockfile and rerunning npm install
Muhammad
@MuhammadJamaluddin
I do have a package-lock.josn file
Alright, will do...
same...
Jordan Harband
@ljharb
in that case i'm not sure. i've seen that bug occur on some repos but not others
you could try downgrading eslint to v5
Muhammad
@MuhammadJamaluddin
I see, how can I do that?
Jordan Harband
@ljharb
npm install --save-dev eslint@5
Muhammad
@MuhammadJamaluddin
Thanks, Jordan ❤️
I really appreciate your help...
Muhammad
@MuhammadJamaluddin
Oh, just solved it :D
Jordan Harband
@ljharb
what was it?
I did exactly what he said & it worked
Jordan Harband
@ljharb
that's a hack tho