Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 18:49
    kaicataldo reopened #12507
  • 18:49
    kaicataldo commented #12507
  • 17:00
    thewalla07 commented #12507
  • 10:10
    manuth commented #12631
  • 09:59
    matteodisabatino commented #11914
  • 09:42
    stof commented #12649
  • 09:11
    lwr edited #12654
  • 09:11
    lwr edited #12654
  • 08:41
    lwr labeled #12654
  • 08:41
    lwr labeled #12654
  • 08:41
    lwr opened #12654
  • 04:14
    yeonjuan commented #12632
  • 04:11

    eslintbot on master

    Sponsors: Sync README with webs… (compare)

  • 03:49
    yeonjuan edited #12632
  • 00:39
    mdjermanovic commented #12632
  • Dec 08 22:43
    eslint[bot] labeled #11604
  • Dec 08 22:43
    eslint[bot] locked #11604
  • Dec 08 22:43
    eslint[bot] labeled #11701
  • Dec 08 22:43
    eslint[bot] locked #11701
  • Dec 08 22:43
    eslint[bot] labeled #11824
Jordan Harband
@ljharb
ah, i see you added it to eslintignore, good
Daniel K.
@FredyC
@ljharb In my opinion eslint config should not be published to NPM, what is the gain in that?
Jordan Harband
@ljharb
so you can npm explore foo && npm install && npm test for any package.
the real problem is that you shouldn’t lint or transpile third party code :-)
Daniel K.
@FredyC
fair enough, but it shouldn't be by default, such a common trap :)
Polla A. Fattah
@pollaeng
Hi Is there a way to disable semicolon error for all my linting
Jordan Harband
@ljharb
you can turn off the semi rule, but definitely don't do that
Polla A. Fattah
@pollaeng
but the vuetify eslint https://github.com/vuetifyjs/eslint-plugin-vuetify forces me to remove all semicolons
and they are alot
Jordan Harband
@ljharb
you can override it
set semi to "always" https://eslint.org/docs/rules/semi
Polla A. Fattah
@pollaeng
Thanks my respect
Kevin Partington
@platinumazure
I'm happy that we love discussing JS and offshoot languages here, but I would appreciate it if we could try to keep the chat on-topic (ESLint). It's a bit harder for me to see where people need help and it's much easier to miss things when there are entire long conversations that are off-topic. Thanks!
Jordan Harband
@ljharb
sorry about that :-)
Daniel K.
@FredyC
@ljharb definitely do not disable semis? why? is there some latest discovery why are semis a good thing?
Jordan Harband
@ljharb
@fredyc so, while there's tons of reasons you should use semicolons, my comment was to never disable the rule. whether you are using them or omitting them, you must have a linter enforcing correct usage.
Daniel K.
@FredyC
and / or prettier to place add them where they are necessary :)
sorry for misunderstanding
Jordan Harband
@ljharb
prettier is fine to use via eslint, but it's not going to handle semicolons in particular any better or worse than eslint's semis rule
(they're always necessary, so much so that the language tries to add them in for you when you forget :-p )
Daniel K.
@FredyC
always necessary is a bit overboard imo, there is fair amount of limited cases where they are needed, otherwise it's just a noise
Jordan Harband
@ljharb
let's not have this debate tho
Daniel K.
@FredyC
besides, most compilators add semis to compiled code anyway, no need to have those in source ... right :)
Jordan Harband
@ljharb
based on that argument, i assume you don't bother adding whitespace or comments either
Daniel K.
@FredyC
yea, wrong place for such discussion :) you are mixing two different things imo
AmirMustefa
@AmiMu123
hello i'm facing a problem while typing npm run lint . how can i fix that?
Daniel K.
@FredyC
fix what? you haven't said anything about your problem
AmirMustefa
@AmiMu123
i put my eslint in script saying "lint" : "eslint " and i wrote a .js file and then , on visual studio terminal typed npm run lint , to check my js file ? and got an error saying
ESLint couldn't find the plugin "eslint-plugin-node"
how can i fix that?
YeonJuan
@yeonjuan
@AmiMu123
Maybe you should install "eslint-plugin-node"
Try it :)
$ npm install --save-dev eslint-plugin-node
AmirMustefa
@AmiMu123
@yeonjuan
Thanks
Thomas Reggi
@reggi

Hey all, I am creating a plugin trying to get the identifier for any named export:

const names = []

        return {
          ExportNamedDeclaration(node) {
                names.push(getNodeName(node))
                console.log(names)
            }
        };

is there some way to get variables, class, and function at once?

Thomas Reggi
@reggi
I did this, but I'd love to know a better way, I don't even know what other dec types exist.
function getName (node) {
  if (node.declaration.type === 'VariableDeclaration') return node.declaration.declarations[0].id.name
  if (node.declaration.type === 'ClassDeclaration') return node.declaration.id.name
  if (node.declaration.type === 'FunctionDeclaration') return node.declaration.id.name
}
Milos Djermanovic
@mdjermanovic
@reggi There is a pending rule to restrict given named exports, you can check the code and test cases in PR eslint/eslint#12546
Not Not Michael
@NotNotMichael_twitter
hey guys
where should i start debugging thins from here?
I'm sure I installed it right
Roy Sutton
@webOS101
How are you running eslint?
Not Not Michael
@NotNotMichael_twitter
vs code
hang on i just started a meeting ill respond in like 3 minutes
Roy Sutton
@webOS101
Ah. You don’t have an eslintrc file in that directory
Or, you’re linting subdirectories and don’t have the dependencies installed in your user directory.
It’s probably not a good idea to try to lint everything in your user directory at once.
Roy Sutton
@webOS101
Given you’re running it in VS Code, you probably want to adjust it to set the current directory to your project’s root.
Not Not Michael
@NotNotMichael_twitter
@webOS101
how do I do that?
Roy Sutton
@webOS101
Not sure!
Not Not Michael
@NotNotMichael_twitter
lmao