GithubHelp home page GithubHelp logo

isabella232 / eslint-plugin-underscore-lodash-compatibility Goto Github PK

View Code? Open in Web Editor NEW

This project forked from unitytech/eslint-plugin-underscore-lodash-compatibility

0.0 0.0 0.0 24 KB

Make sure your code can use underscore and lodash interchangeably.

License: MIT License

JavaScript 100.00%

eslint-plugin-underscore-lodash-compatibility's Introduction

Build Status NPM version

eslint-plugin-underscore-lodash-compatibility

Ensures your javascript can use underscore or lodash interchangeably as a dependency.

If you maintain a codebase and are thinking of moving over to lodash, this plugin can help. It can ensure your code uses only the subset of underscore that is compatible with lodash. Once you get to that point, you can replace your underscore dependency with lodash and complete the migration.

Note: This plugin is under development, and a few more rules should be coming up (contributions welcome!). Also, due to the limitations of static analysis, this plugin can only do a best effort, and doesn't absolutely guarantee that your code will be fully compatible with both libraries.

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-underscore-lodash-compatibility:

$ npm install eslint-plugin-underscore-lodash-compatibility --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-underscore-lodash-compatibility globally.

Usage

Add underscore-lodash-compatibility to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "underscore-lodash-compatibility"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "underscore-lodash-compatibility/rule-name": 2
    }
}

Supported Rules

Contributing

$ git clone https://github.com/afahim/eslint-plugin-underscore-lodash-compatibility.git
$ cd eslint-plugin-underscore-lodash-compatibility
$ npm test

This project follows the ESLint contribution guidelines.

License and Copyright

Copyright 2016 Afnan Fahim. All rights reserved.

MIT License

eslint-plugin-underscore-lodash-compatibility's People

Contributors

afahim avatar timt-unity3d avatar

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.