Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 10:59
    boutahlilsoufiane review_requested #14238
  • 08:55

    mysticatea on class-fields

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

  • 06:23
    aladdin-add labeled #14588
  • 06:23
    aladdin-add labeled #14588
  • 06:23
    aladdin-add unlabeled #14588
  • 06:16
    aladdin-add labeled #14588
  • 06:16
    aladdin-add labeled #14588
  • 06:16
    aladdin-add labeled #14588
  • 06:16
    aladdin-add opened #14588
  • 00:38
    eslint-github-bot[bot] labeled #13843
  • 00:38
    eslint-github-bot[bot] locked #13843
  • May 13 13:54
    snitin315 edited #14354
  • May 13 12:35
    snitin315 commented #14354
  • May 13 12:30
    snitin315 synchronize #14354
  • May 13 10:11

    mysticatea on class-fields

    update no-invalid-this update no-multi-assign update no-proto (test-only) and 14 more (compare)

  • May 13 09:08

    mdjermanovic on master

    Chore: add more test cases for … (compare)

  • May 13 09:08
    mdjermanovic closed #14579
  • May 13 03:12
    bmish edited #14573
  • May 13 00:38
    eslint-github-bot[bot] labeled #13750
  • May 13 00:38
    eslint-github-bot[bot] locked #13750
Adam Klepacz
@adamklepacz
should be there also eslint folder?
薛定谔的猫
@aladdin-add
you need install eslint-plugin-html globally
Adam Klepacz
@adamklepacz
using $ ls command i can't find eslint folder in node_modules
i did it @Aladdin-ADD
npm install eslint-plugin-html@latest -g
薛定谔的猫
@aladdin-add
so you can use global eslint:
$ eslint .
Adam Klepacz
@adamklepacz
I did just right now
and cursor went one line down ant nothing happend
??
薛定谔的猫
@aladdin-add
that means no error reported.
did you have a config file?
Adam Klepacz
@adamklepacz
where I can get it?
薛定谔的猫
@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