Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 06:01
    Zamiell edited #13154
  • 05:59
    Zamiell edited #13154
  • 05:57
    Zamiell labeled #13154
  • 05:57
    Zamiell labeled #13154
  • 05:57
    Zamiell opened #13154
  • 05:27
    Zamiell edited #13153
  • 05:27
    Zamiell edited #13153
  • 05:26
    Zamiell edited #13153
  • 05:26
    Zamiell labeled #13153
  • 05:26
    Zamiell labeled #13153
  • 05:26
    Zamiell labeled #13153
  • 05:26
    Zamiell opened #13153
  • 03:39
    eslint[bot] labeled #11991
  • 03:39
    eslint[bot] locked #11991
  • 03:39
    eslint[bot] labeled #12021
  • 03:39
    eslint[bot] locked #12021
  • 03:39
    eslint[bot] labeled #12152
  • 03:39
    eslint[bot] locked #12152
  • 03:39
    eslint[bot] labeled #12358
  • 03:39
    eslint[bot] locked #12358
eyelidlessness
@eyelidlessness
it sounds like that plugin may need to exist to use eslint with that babel plugin?
rhpijnacker
@rhpijnacker
I'd like to do some code refactoring and am considering to create some fixable custom eslint rules for this. However, I have the feeling I'm fixing too much.
Are there alternative solutions for something like this I could explore?
Tanya Marych
@TMarych_twitter
I just feel like there are many devs who trying to use both great tools for making code better
And none of devs would like to choose between them
Nikolay Babanov
@nbabanov
Hello guys!
eyelidlessness
@eyelidlessness
for sure, i wouldn't encourage you to choose between them. it seems that if eslint needs additional plugins to support arbitrary babel plugins, that's a design limitation that unfortunately would cause this. presumably there will be such a plugin soon, as optional chaining is such a desirable feature
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?