Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 06:06
    fishcharlie labeled #13158
  • 06:06
    fishcharlie labeled #13158
  • 06:06
    fishcharlie labeled #13158
  • 06:06
    fishcharlie opened #13158
  • 03:47
    aladdin-add synchronize #13155
  • 03:47

    aladdin-add on deps

    Chore: review suggestions (compare)

  • 03:41
    ljharb commented #12756
  • 03:40
    ljharb commented #12758
  • 03:39
    eslint[bot] commented #12970
  • 03:39
    eslint[bot] labeled #12970
  • 03:39
    eslint[bot] closed #12970
  • 03:39
    eslint[bot] commented #12992
  • 03:39
    eslint[bot] labeled #12992
  • 03:39
    eslint[bot] closed #12992
  • 03:39
    eslint[bot] commented #12756
  • 03:39
    eslint[bot] labeled #11965
  • 03:39
    eslint[bot] labeled #12756
  • 03:39
    eslint[bot] locked #11965
  • 03:39
    eslint[bot] closed #12756
  • 03:39
    eslint[bot] labeled #11987
Nikolay Babanov
@nbabanov
I have a problem with ESLint 6.7, which I did not have with 5.7: ESLint can no longer detect eslint-plugin-prettier. My setup is a monorepo with lerna. Can someone point the issue? How did ESLint changed the plugin resolve strategy?
Jakob Guddas
@jguddas

i'm looking for a rule that converts

if () {
  ...
} if () {
  ...
}

to

if () {
  ...
}
if () {
  ...
}
Jakob Guddas
@jguddas
is there something like padding-line-between-statements but for line breaks?
or like keyword-spacing but for line breaks instead of spaces?
Trevor Radcliffe
@t-rad679
It does not seem possible to configure the indent level for ConditionalExpression, other than to ignore it entirely. Is this true? If so, why?
Matej Rifelj
@matejrifelj
ESLint: 6.7.2.
ESLint couldn't find the plugin "eslint-plugin-react".
I have eslint installed globally.
And I did npm install eslint-plugin-react -g
Jordan Harband
@ljharb
don't install eslint globally, only install it locally, per project.
Matej Rifelj
@matejrifelj
but I have node_modules inside docker volume
and don't want it inside my project
Jordan Harband
@ljharb
if a project doesn't have eslint installed locally, it shouldn't be linted
imo
Matej Rifelj
@matejrifelj
to be honest, it works globally on my other machine, I just don't know what I did there diferently
Matej Rifelj
@matejrifelj
downgraded to ESLint 5 and now it works :/
Jordan Harband
@ljharb
right, eslint 6 made some changes that somewhat broke the use case of having a global eslint
Elirehema Paul
@elirehema
Hi
Am trying to configure eslint in nuxt project
when i added in extends: [@nuxtjs] i got this error ESLint couldn't find the config "@nuxtjs" to extend from. Please check that the name of the config is correct.
Kai Cataldo
@kaicataldo
It looks like you might be trying to use https://github.com/nuxt/eslint-config
Did you follow the instructions there? You’ll need to install the config in your project.
Roy Sutton
@webOS101
:paperclip: It looks like you might be trying to write a letter...
Kai Cataldo
@kaicataldo
I resent that comparison :laughing:
Carl Vitullo
@vcarl
hi hi. i'm updating deps, and am hitting a ton of cannot find module errors. we've got a shared eslint config (https://github.com/stellar/product-conventions/blob/master/packages/eslint-config/package.json) but unless i install those deps manually in the project that's using that config, eslint complains it can't find it
nothing is globally installed, so the upgrade guide doesn't really seem relevant?

it's not a monorepo or anything, i've just got

module.exports = {
  extends: ["@stellar/eslint-config"],
  rules: {
    "import/no-unresolved": 0,
  },
};

in .eslintrc.js locally. gatsby site

Roy Sutton
@webOS101
You can try passing the command line argument that sets where to find the plugins. Or, as you say, install the deps into the project.
I don’t believe it’s recommended for a config to have plugins as dependencies, but instead to have them as peer dependencies.
Carl Vitullo
@vcarl
they used to be peer deps, but it's annoying to have to install like 8 things to get a shared config working
any info about why that's recommended?
Roy Sutton
@webOS101
Because of the problems of having multiple different versions of plugins included from different configs and/or plugins.
Carl Vitullo
@vcarl

plugins will be loaded relative to the end user's project, so the end user is required to install the plugins they need

since they're being flattened (i see them in node_modules/<plugin name> i don't really understand why this would be breaking

ah, no, i guess that's only the ones that i installed while debugging
well that significantly diminishes the value of sharing a config for me, but i guess i have my fix
Roy Sutton
@webOS101
They might be flattened, but that behavior from npm isn’t guaranteed. What if I use your config and a config Joe made and you required v2 of eslint-plugin-baz and Joe required v1 of eslint-plugin-baz… Which version would be affected if I try to set a baz rule in my config?
Also, which version of that plugin gets put into the root of node_modules might vary (I’m not sure how it decides).
Carl Vitullo
@vcarl
i haven't thought that deeply, but for me half the value of sharing a config was to simplify new project setup. if i still have to gather together every plugin needed, then that's functionally the same as using a custom config in the first place and documenting what plugins i used last time
Roy Sutton
@webOS101
Can’t argue you with you about that.
Carl Vitullo
@vcarl
our workflow before setting up this package was to copy the list of deps needed + the .eslintrc.js. now, it's the same, but with 1 more package and slightly fewer items in the eslint config
just venting though. burned a bit of time hunting this down
Roy Sutton
@webOS101
The shared config does still make it easier to share updates to rules, but I hear you.
Robert Kieffer
@broofa
Hi all, quick ? about extends. I have a shareable config file "eslint-config-myconfig.js" inside a private module "@foo/common". I've npm linked the private module into my project, and am trying to include it with "extends": "@foo/common/eslint-config-myconfig". Sadly, eslint is saying it can't find the config file. So... what am I doing wrong?
Jordan Harband
@ljharb
a shared config in a package generally has to be the "main" of the package
(i believe)
i think if you want anything else to be a config you need to use a plugin as the vehicle, not a shared config
(i could be wrong here)
rouxfeur
@rouxfeur
Hi, I wanted to use “prettier-eslint”, but the eslint part doesn’t work. So I want to try doing it myself. What they seem to do is that they suppress all un-fixable rules and then run eslint. The closest command I could find was eslint —fix —quiet, which I think just suppresses (some) messages, not actual checking?
What do I do if all I want is for eslint to format my code?
What I am trying to do, is to run prettier on save and eslint —fix right after, to apply some styling that diverges from prettier.
Roy Sutton
@webOS101
I don’t use prettier myself, but can’t you just change prettier to apply the styling you want and just use eslint for non-stylistic warnings?
Having two tools fight over the formatting seems like a bad idea.
Kai Cataldo
@kaicataldo
Prettier has some excellent documentation around using Prettier and ESLint here https://prettier.io/docs/en/integrating-with-linters.html