eslint-plugin-restrict-import-statements

1.0.0 • Public • Published

Restrict imports, keeping your codebase clean and tailored. Test case: Avoid mistakenly using of useTranslation hook when you have useCustomTranslation.

Installation and usage:

"plugins": [

"restricts"

]

rules: {

'restricts/imports-of': [
    'error',
    {
        // To disallow multiple imports, add them to the list, like ['useTranslation', 'useDispatch', 'anotherImport'].
        disallowedImports: ['useTranslation'],
    },
],

}

Readme

Keywords

none

Package Sidebar

Install

npm i eslint-plugin-restrict-import-statements

Weekly Downloads

94

Version

1.0.0

License

MIT

Unpacked Size

2.46 kB

Total Files

4

Last publish

Collaborators

  • artur1337