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
understanding asynchrony in JS is critical tho
there's no way around it
Mile Mijatović
@mijatovicmile
do you understand Callbacks @ljharb ?
Jordan Harband
@ljharb
yes
Mile Mijatović
@mijatovicmile
what's your opinion, is it hard to understand generally ?
Jordan Harband
@ljharb
i think once you get the general concept of async, it all falls into place
Mile Mijatović
@mijatovicmile
maybe, I don't know
Kristóf Poduszló
@kripod
Hello!
May I ask whether '/' could be added as a marker for the spaced-comment rule? (https://eslint.org/docs/rules/spaced-comment)
Jordan Harband
@ljharb
like for TS-style /// comments?
Kristóf Poduszló
@kripod
':' and '::' were added as exceptions for Flow in https://github.com/airbnb/javascript/pull/1966/files, and adding / would also solve it for TypeScript
yes
image.png
Kristóf Poduszló
@kripod
Sorry, I didn't know it was already merged to the master branch
I was using the latest version published on npm
Thank you for answering!
Also, eslint-plugin-react-hooks@3 has been released recently. May I open a pull request to relax the peer dependency requirements?
Jordan Harband
@ljharb
sure! please also help me out by explaining the breaking changes
(in the PR)
Kristóf Poduszló
@kripod
I'll try my best
Kristóf Poduszló
@kripod
Hopefully, I provided enough details
Jordan Harband
@ljharb
thanks! may take me a day or three to get to it, but it'll make it into the next release whenever that is
Kristóf Poduszló
@kripod
Awesome, thanks!
Mile Mijatović
@mijatovicmile
Hello
What's the proper way to select the <head><title>Title</title></head> ?
querySelector or getElementByTagName or document.title ?
Mile Mijatović
@mijatovicmile
Hello
Mile Mijatović
@mijatovicmile
is there any way to access local file with JavaScript?
I have static website, and one of the folders is "img" folder
where I have a lot subfolders , and in each of that subfolder I have images
Is there any way to loop through that folders and display images on webpage ?
@ljharb ?
Jordan Harband
@ljharb
@mijatovicmile not in a browser. you can do it in node, but i'd suggest not doing that.
Jacob L
@jcklama

Hi, I ran
npm i -g eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks
but am getting this error when I try to use eslint on my file (in terminal):

Oops! Something went wrong! :(

ESLint: 6.8.0.

ESLint couldn't find the config "airbnb" to extend from. Please check that the name of the config is correct.

Would appreciate any help. Thanks!

Jordan Harband
@ljharb
@jcklama don't install anything globally, especially eslint things
@mijatovicmile do you have a more specific question
Mile Mijatović
@mijatovicmile
Yes, I bought JavaScript - The Complete Guide (Beginner to Advanced) Tutorial on Udemy, from Maximilian Schwarzmuller
image.png
one of the questions from the Promise - section quiz

if I replace this line of code

    .then((text) => { throw new Error('Failed!') })
    .catch(err => console.log(err))
    .then(() => console.log('Does that execute?'));

with this

    .then((text) => { console.log(text) ) })
    .then(() => console.log('Does that execute?'));
in your opinion @ljharb what will be output here ?
The promise is async code as I learned, but in this case the first output will be Timer completed and second Does this execute
Mile Mijatović
@mijatovicmile
what in the case when a timer duration is 10 minutes ? In that case , Does this execute will not be output until the timer is done
But in this basic example from MDN ,
let myFirstPromise = new Promise((resolve, reject) => {
  // We call resolve(...) when what we were doing asynchronously was successful, and reject(...) when it failed.
  // In this example, we use setTimeout(...) to simulate async code. 
  // In reality, you will probably be using something like XHR or an HTML5 API.
  setTimeout( function() {
    resolve("Success!")  // Yay! Everything went well!
  }, 250) 
}) 

myFirstPromise.then((successMessage) => {
  // successMessage is whatever we passed in the resolve(...) function above.
  // It doesn't have to be a string, but if it is only a succeed message, it probably will be.
  console.log("Yay! " + successMessage) 
});
output is
Yay! Success Success
Two identical examples , output console.log in different order
Why ?
Mile Mijatović
@mijatovicmile
@ljharb you read my questions, and you don't want to write an answer