Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 14:26
    yeonjuan edited #13156
  • 14:22
    yeonjuan labeled #13156
  • 14:21
    yeonjuan labeled #13156
  • 14:21
    yeonjuan labeled #13156
  • 14:21
    yeonjuan opened #13156
  • 14:20
    lukenofurther commented #12018
  • 13:58
    aladdin-add synchronize #13155
  • 13:58

    aladdin-add on deps

    Chore: update eslint-config-esl… (compare)

  • 13:53
    aladdin-add synchronize #13155
  • 13:53

    aladdin-add on deps

    Upgrade: some (dev) deps 1. af… (compare)

  • 13:35
    yeonjuan commented #12738
  • 12:36
    aladdin-add edited #13155
  • 12:35
    aladdin-add labeled #13155
  • 12:35
    aladdin-add labeled #13155
  • 12:35
    aladdin-add unlabeled #13155
  • 12:35
    aladdin-add edited #13155
  • 12:35
    aladdin-add edited #13155
  • 12:35
    eslint[bot] labeled #13155
  • 12:35
    aladdin-add opened #13155
  • 12:34

    aladdin-add on deps

    Upgrade: some (dev) deps 1. af… (compare)

Tanya Marych
@TMarych_twitter
I installed @babel/plugin-proposal-optional-chaining
eyelidlessness
@eyelidlessness
it appears to be looking for the plugin named eslint-plugin-optional-chaining
Tanya Marych
@TMarych_twitter
Okay
lets start from beginning
I want to use @babel/plugin-proposal-optional-chaining in my project
But with it I can not use eslint anymore because of this error
So how can I add this plugin to eslint config to make it work?
eyelidlessness
@eyelidlessness
did you add eslint-plugin-optional-chaining to the plugin section of your config? or did eslint just infer that it should be there when you installed the babel plugin? (i don't use babel so just feeling around in the dark here to try to understand why it's looking for the plugin)
Tanya Marych
@TMarych_twitter
eslint-plugin-optional-chaining this one does not exist.
the second suggestion is correct
It looks for eslint-plugin-optional-chaining when have to @babel/plugin-proposal-optional-chaining
I know that it works by the rule that every plugin should have eslint-plugin-[name of plugin], but @babel/plugin-proposal-optional-chaining does not
So is it any way to use babel and eslint together?
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?