Skip to content

Commit

Permalink
feat: release no-import-namespace-destructure
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Nov 17, 2023
1 parent 030c408 commit 9e98fc3
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,31 @@ export * as foo from './foo';
</details>


<a name="user-content-eslint-plugin-canonical-rules-no-import-namespace-destructure"></a>
<a name="eslint-plugin-canonical-rules-no-import-namespace-destructure"></a>
### <code>no-import-namespace-destructure</code>

_The `--fix` option on the command line automatically fixes problems reported by this rule._

Disallows the practice of importing an entire module's namespace using import * as Namespace and then destructuring specific exports from it. Instead, it encourages direct importing of only the necessary named exports from a module.

<details><summary>📖 Examples</summary>
The following patterns are considered problems:

```js
import * as bar from 'bar'; const { foo } = bar;
// Message: undefined
```

The following patterns are not considered problems:

```js
import * as bar from 'bar'
```

</details>


<a name="user-content-eslint-plugin-canonical-rules-no-reassign-imports"></a>
<a name="eslint-plugin-canonical-rules-no-reassign-imports"></a>
### <code>no-reassign-imports</code>
Expand Down

0 comments on commit 9e98fc3

Please sign in to comment.