Commit 41f2070
authored
fix(linter): rule
> The regex property is used to specify the regex patterns for
restricting modules.
> Note: regex cannot be used in combination with group.
_https://eslint.org/docs/latest/rules/no-restricted-imports#regex_
> This option allows you to use regex patterns to restrict import names:
_https://eslint.org/docs/latest/rules/no-restricted-imports#importnamepattern_
> This is a string option. Inverse of importNamePattern, this option
allows imports that matches the specified regex pattern. So it restricts
all imports from a module, except specified allowed patterns.
> Note: allowImportNamePattern cannot be used in combination with
importNames, importNamePattern or allowImportNames.
_https://eslint.org/docs/latest/rules/no-restricted-imports#allowimportnamepattern_
Needed to install `regress` to support JS Sntax like Lookaheads and
Lookbehinds
Next Goals:
- #7894
- Improve spans
- Error for wrong configurations
- update documentation
- Output messages like
[eslint](https://github.com/eslint/eslint/blob/main/lib/rules/no-restricted-imports.js#L140-L184)no-restricted-imports support missing options (#8076)1 parent 8c6e0a6 commit 41f2070
2 files changed
Lines changed: 659 additions & 367 deletions
File tree
- crates/oxc_linter/src
- rules/eslint
- snapshots
0 commit comments