question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Discussion] Deactivating new-cap rule (Immutable.js user)

See original GitHub issue

Hello!

I just tried out create-react app and it’s pretty cool! However, I’m an heavy user of Immutable and the eslint new-cap rule does not behave well with it (activated by default).

For now, I’m deactivating the rule on a per-file basis so that’s not such a big issue! But I can’t seem to be able to deactivate it project-wide in the package.json (it actually works on my editor, but not on the dev server …).

To tackle this issue, I see two possibilities:

  • Find a way to get the dev server reading the project’s eslint configuration in package.json (that would be cool to have that working anyway! => I’ll try to take a look myself 😉 if it’s possible)
  • Have a discussion around the new-cap rule that isn’t universally liked (and discouraged when used with immutable, I’ll point to you one comment from @leebyron on this: https://github.com/eslint/eslint/issues/2023#issuecomment-80255655, not saying we should get rid of it because he said so but I’d like to see what others think about it too!)

Thank you again for this project, hope this discussion will help make it even better!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
gaearoncommented, Aug 20, 2016

We should disable that rule. It shouldn’t have been in our config in the first place.

0reactions
gaearoncommented, Nov 21, 2016

We don’t want to special-case Immutable here, IMO it would just be more confusing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation v4.2.1 — Immutable.js
The hash() function is an important part of how Immutable determines if two values are equivalent and is used to determine how to...
Read more >
Collection - Immutable.js
Computes and returns the hashed identity for this Iterable. hashCode(): number. Inherited from. Iterable#hashCode(). Discussion.
Read more >
Immutable.js
Immutable.js provides many Persistent Immutable data structures ... All examples throughout the documentation will assume use of this kind of tool.
Read more >
Stack - Immutable.js
Check the documentation for each method to see if it mentions being safe to use in withMutations . withMutations(mutator: (mutable: this) => unknown):...
Read more >
Repeat — Immutable.js
Repeat(). Returns a Seq.Indexed of value repeated times times. When times is not defined, returns an infinite Seq ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found