eslint-plugin-forbidden-package

0.0.1 • Public • Published

eslint-plugin-forbidden-package

DO NOT IMPORT THAT WHICH IS... FORBIDDEN.

An eslint plugin (really, just a rule) for explicitly yelling when someone imports blacklisted libraries/packages directly. Now when people import xDate directly, instead of a wrapped/abstracted library, you can yell at 'em. This is hacky. It's set up to not do anything without settings.

Usage like so: (pretend you're in an .eslintrc)

{
    "plugins": ["forbidden-package"],
    "rules": {
        "forbidden-package/no-forbidden-package":["error", ["moment", "immutable", "xDate", "styled-components"]]
    }
}

On the future todo list -- get this ready to warn/error separately.

Package Sidebar

Install

npm i eslint-plugin-forbidden-package

Weekly Downloads

718

Version

0.0.1

License

MIT

Unpacked Size

3.57 kB

Total Files

7

Last publish

Collaborators

  • krosantos