Skip to content

mellis481/eslint-plugin-no-restricted-imports-clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-plugin-no-restricted-imports-clone

ESLint rule to allow for multiple severities to be used for no-restricted-imports.

Background

Discussed in this issue: eslint/eslint#14061

Getting started

In your .eslintrc.js file:

  • add 'no-restricted-imports-clone to the plugins array.
  • add the following the rules object:
    'no-restricted-imports': [
      'error',
      {
        name: 'someDependency',
        message: "Don't import someDependency.",
      },
    ],
    'no-restricted-imports-clone/no-restricted-imports-clone': [
      'warn',
      {
        name: 'anotherDependency',
        message: "You are encouraged to not import anotherDependency.",
      },
    ],

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published