0.0.0 • Published 1 year ago

eslint-plugin-import-public-api v0.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

eslint-plugin-import-public-api

Allow import only from public api file

Installation

You'll first need to install ESLint:

npm i eslint --save-dev
yarn add eslint -D

Next, install eslint-plugin-import-public-api:

npm install eslint-plugin-import-public-api --save-dev
yarn add eslint-plugin-import-public-api -D

Usage

Add import-public-api to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "import-public-api"
    ]
}

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

{
    "rules": {
        "import-public-api/import-only-from-public-api": [ "error", [ "directoryName" ] ]
    }
}

Rules

TODO: Run eslint-doc-generator to generate the rules list.

0.0.0

1 year ago