Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 02:17
    eltociear synchronize #14589
  • 02:14
    eltociear edited #14589
  • 01:12

    eslintbot on master

    Sponsors: Sync README with webs… (compare)

  • 00:38
    eslint-github-bot[bot] labeled #13840
  • 00:38
    eslint-github-bot[bot] locked #13840
  • May 14 17:52
    eslint-github-bot[bot] labeled #14589
  • May 14 17:52
    eltociear opened #14589
  • May 14 14:48
    aladdin-add edited #14588
  • May 14 10:59
    boutahlilsoufiane review_requested #14238
  • May 14 08:55

    mysticatea on class-fields

    update no-eval update operator-assignment (tes… update operator-linebreak and 2 more (compare)

  • May 14 06:23
    aladdin-add labeled #14588
  • May 14 06:23
    aladdin-add labeled #14588
  • May 14 06:23
    aladdin-add unlabeled #14588
  • May 14 06:16
    aladdin-add labeled #14588
  • May 14 06:16
    aladdin-add labeled #14588
  • May 14 06:16
    aladdin-add labeled #14588
  • May 14 06:16
    aladdin-add opened #14588
  • May 14 00:38
    eslint-github-bot[bot] labeled #13843
  • May 14 00:38
    eslint-github-bot[bot] locked #13843
  • May 13 13:54
    snitin315 edited #14354
薛定谔的猫
@aladdin-add
serveral ways:
  1. eslint --init
Adam Klepacz
@adamklepacz
I did eslint --init
i choose airbnb rules
and STILL i get the same message
薛定谔的猫
@aladdin-add
what message?
Adam Klepacz
@adamklepacz
here you get the screenshot
and I did install this plugin globally also
I have no ideas what I'm doing wrong
薛定谔的猫
@aladdin-add
hmm..it's so strange!
what about using local installed eslint?
$ npm i eslint eslint-plugin-markdown -D
$ ./node_modules/.bin/eslint bad-code.js
if still not working, you can use --debug to see what happened.
Julián Herrera
@vidjuheffex

Hey, I'm looking for some config help. The project im working on has an eslint config, and a package-local installed eslint.
On my desktop all works fine, on my laptop... very different story.

Going into a dir with a file and typing _pathtoEslint.cmd_ --print-config . prints the same thing for both

It is a react project with decorators, and such. Each import that gets used by a decorator counts as not being used. propTypes says its never defined, stuff like that. I have removed the eslint config in my home dir, and my globally installed eslint just in case

note my editor covering the laptop in eslint errors, yet both are pointing to the same config and executable
also, same result on these files from the CLI, eslint spits out all sorts of errors, and on desktop its fine
Julián Herrera
@vidjuheffex
I've even diff the output from --print-config with no differences between them, anyone have any suggestions.
Is there an easier to configure linter I should be using/suggesting to the team? Identical configs yielding different results makes me nervous about the tool
lordkyzr
@lordkyzr
Anyone around to answer a quick question about brace-style?
lordkyzr
@lordkyzr

I got this odd scenario where someone on my team writes code that isnt the 1tbs style and is more akin to allman syntax.

if( foo ){
    let bar = 1;
}
else {
    let bar = 2;
}

and fix does a great job changing it to the 1tbs style.

When the code is indented however it is a completely different story. Here is the before:

    if( foo ){
        let bar = 1;
    }
    else {
        let bar = 2;
    }

it ends up keeping the full indentation when it fixes it which renders it like below

    if( foo ){
        let bar = 1;
    }    else {
        let bar = 2;
    }

I have been searching for the past hour or so and found in a previous version keyword-spacing let you specify the amount of spaces and the current rule no longer has that and it is 1 or more spaces but it doesnt check for consistency which rendered a bunch of my code in this ugly format.

Julián Herrera
@vidjuheffex
If anyone can solve my issue please PM PayPal detials
Teddy Katz
@not-an-aardvark
@lordkyzr You might be looking for no-multi-spaces
lordkyzr
@lordkyzr
@not-an-aardvark reading the docs real quick it does appear to be what I am looking for. I will test tomorrow when I get in. Thanks for the hint.
Epaminaidos
@Epaminaidos
@platinumazure I found a solution: The block-scoped-var rule included in this plugin: https://github.com/mysticatea/eslint-plugin#eslint-plugin-mysticatea
It does exactly, what I expect from a "block-scoped-var"-rule :)
Victor Hom
@VictorHom
is there a rule that can enforce a space before a ternary "?" and a space before and after the ":" ?
martskins
@martskins
space-infix-ops ?
Clément Pit-Claudel
@cpitclaudel
Hi eslint folks. Quick question about eslint --format=checkstyle: is this option expected to produce pure XML in all cases? Or is it by design that some messages are still printed as plaintext to stderr? We've been bitten by this multiple times in Flycheck, and we're not sure whether it's an eslint bug to be reported, or a design choice that we need to work around on our side (see flycheck/flycheck#1350 for a concrete example)
Victor Hom
@VictorHom
sweet @martskins thanks I knew it had to be a thing :tada:
Sam Ferrell
@samcf
Hello. New here. Wondering if it's feasible to write an ESLint plugin to detect "bad" imports, such as foo.js importing from bar.js where bar.js is not some place you would sensibly import from foo.js. It's technically a correct and working import, but considered bad design in our project. Does that make sense?
Teddy Katz
@not-an-aardvark
It seems like that would be possible as long as you can tell whether it's a "bad" import from the filename
Sam Ferrell
@samcf
@not-an-aardvark Sort of ... using a more specific use case, the "Users Page" should never import from the "Statistics Page" and vice versa, where the file org is like src/pages/users and src/pages/statistics
However files within the users page should obviously be allowed to import from its own page
Just trying to get a feel for whether thats feasible or not before I dive into it.. never written an ESLint plugin before
Teddy Katz
@not-an-aardvark
Yes, that seems like it should be feasible
Sam Ferrell
@samcf
Neat, thanks!
Kevin Partington
@platinumazure
@cpitclaudel I would expect stdout to be valid XML (though do please report an issue if you see otherwise), while stderr would not conform to any formatter. On a console, stdout and stderr are interleaved, but in a program that spawns a subprocess, it should track stdout and stderr separately. (I believe our lint formatter output should be to stdout.) So at first glance, it seems like a design issue on your end... But please let me know if I'm missing something.
Benjamin R Gibson
@brgibson
Hi all, I wanted to make sure I have gotten the process right for re-submitting after my first review eslint/eslint#9506. I realized a little late not to amend my commit. After the next round of feedback, I will leave it as a second commit.
Ilya Volodin
@ilyavolodin
@brgibson amending is fine, it's not necessary anymore, since we always squash commits before merging, but it doesn't hurt.
Btw, just so you'd be aware, we require 3 +1s from the core team, as well as one champion, so it might take a little while for this proposal to be accepted
Benjamin R Gibson
@brgibson
Thanks @ilyavolodin. Will those discussions happen in the pull request?
Ilya Volodin
@ilyavolodin
Yes, they usually happen either in PR directly, or if PR is fixing an existing issue, they will happen in the issue
Benjamin R Gibson
@brgibson
Sounds good. Thanks again.
Clément Pit-Claudel
@cpitclaudel
@platinumazure We currently handle stderr and stdout together, simply because we've not needed to separate them for any other linter. Some send error lists to stderr, and some to stdout, and others mix depending on the type of error. The real question is: what do you intend tools to do with eslint's stderr output? Ignore it, or somehow print it, or something else?
@platinumazure What other checkers tend to do is report issues that are not directly connected to the current file as happening on line 1, column 1 (of the current file). It ties in nicely with the existing interface between linters and UIs (the linter produces a list of issues, the UI displays them). The problem with eslint's stderr output at the moment is that we don't have any metadata associated with it: when we see a message, we don't know whether it's a bug to be reported (we had two such cases), or an informational message to report to the user (we had one such case), or something else (in fact, we don't even know how to separate consecutive messages on stderr)
yuta0801
@yuta0801
I can't use standard
ESLint couldn't find the plugin "eslint-plugin-standard".