Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 05:41
    ljharb commented #14721
  • 05:36
    boris-petrov commented #14721
  • 04:38
    chenxsan commented #14743
  • 03:56
    hsiaosiyuan0 commented #3565
  • 03:46
    hsiaosiyuan0 commented #3565
  • 03:46
    hsiaosiyuan0 commented #3565
  • 03:46
    hsiaosiyuan0 commented #3565
  • 03:43
    hsiaosiyuan0 commented #3565
  • 03:33
    hsiaosiyuan0 commented #3565
  • 03:32
    hsiaosiyuan0 commented #3565
  • 01:44
    aladdin-add synchronize #14720
  • 01:30
    aladdin-add synchronize #14720
  • 01:24
    nzakas closed #14685
  • 01:24
    nzakas commented #14685
  • 01:22
    nzakas commented #14686
  • 01:20
    aladdin-add closed #14651
  • 01:20
    aladdin-add commented #14651
  • 01:20
    nzakas commented #14742
  • 01:18
    aladdin-add labeled #14651
  • 01:18
    aladdin-add unlabeled #14651
薛定谔的猫
@aladdin-add
"." means linting all the project! :smile:
Adam Klepacz
@adamklepacz
still gives me the same message
no such as file or directory
薛定谔的猫
@aladdin-add
how did you install eslint?
global?
Adam Klepacz
@adamklepacz
globally
yeah
薛定谔的猫
@aladdin-add
ESLint can be globally or locally installed. If you install ESLint globally, your plugins must also be installed globally; if you install ESLint locally, your plugins must also be installed locally.
Adam Klepacz
@adamklepacz
i have installed it all globally
in my node_modules i see there is eslint_plugin_html folder
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