Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/krav4enkodm/eslint-plugin-dynamic-imports

Rules for dynamic imports validation
https://github.com/krav4enkodm/eslint-plugin-dynamic-imports

eslint eslint-plugin

Last synced: 3 days ago
JSON representation

Rules for dynamic imports validation

Awesome Lists containing this project

README

        

# eslint-plugin-dynamic-imports

Rules for dynamic imports validation

## Installation

```sh
npm install --save-dev eslint-plugin-dynamic-imports
```

All rules are off by default, and you are able to configure them in your `.eslintrc`

```json
{
"plugins": ["dynamic-imports"],
"rules": {
"dynamic-imports/no-literal-expressions": 2,
"dynamic-imports/no-restricted-paths": [2, "path/to/module", "**/foo/**"]
}
}
```

## Rules

Take a look at the rules documentation to adjust them more precisely for your needs:

- [no-restricted-paths](./src/rules/no-restricted-paths/no-restricted-paths.md)
- [no-literal-expressions](./src/rules/no-literal-expressions/no-literal-expressions.md)