eslint-plugin-import icon indicating copy to clipboard operation
eslint-plugin-import copied to clipboard

Add setting to `import/named` to disabled error on specific identifiers

Open taylor1791 opened this issue 7 years ago • 4 comments

It is not uncommon to import something that is provided by a babel-plugin. One such example is babel-plugin-rewire. It provides __Rewire__ and __ResetDependency__ to "override" local variables.

I purpose adding options to import/named to disable the the error on specific identifiers. Here is an example.

rules: {
  'named/import': [2, {allowedNames: ["__Rewire__", "__RestDependency__"]}]
}

If approved, I can make an MR.

taylor1791 avatar Oct 18 '18 23:10 taylor1791