Code Monkey home page Code Monkey logo

Comments (2)

ganimomer avatar ganimomer commented on June 7, 2024

Hi,
Let's start with a disclaimer: the plugin is not enough to migrate Lodash versions.
It won't catch the cases of lodash functions that have ceased to exist, like _.pluck. Also, with some of the breaking changes, there's no replacement for going over the release notes and going over your code. (e.g. _.rest is a method in both versions that does completely different things).

Having said that, here are the rules that are expected to alert you upon migration (if you make sure the plugin is not configured to work with v3)

  • callback-binding will report on all cases when you used thisArg for methods when it doesn't exist.
  • no-extra-args: will report for all the methods that have a fixed number of arguments, if you used superfluous arguments.
  • unwrap and no-double-unwrap will report on the cases where functions changed their chaining behaviour (e.g. forEach, that breaks the chain in v4 but not in v3).
  • preferred-alias makes sure you use the main alias for methods, and is version dependant, so, for instance it will report when you use first instead of head.

Besides that, I'd recommend you go through the rule descriptions in the README and see which ones you'd like to enforce.

from eslint-plugin-lodash.

ZuBB avatar ZuBB commented on June 7, 2024

Thanks for reply

from eslint-plugin-lodash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.