-
-
Notifications
You must be signed in to change notification settings - Fork 496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(linter): add option "allowTypeImports" for rule "no-restricted-imports" #7894
base: main
Are you sure you want to change the base?
fix(linter): add option "allowTypeImports" for rule "no-restricted-imports" #7894
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
CodSpeed Performance ReportMerging #7894 will not alter performanceComparing Summary
|
… option inside `patterns`
…ld regex in `from_configuration`
…-linter-no-restricted-imports-improve-diagnostics
…nto bugfix-linter-add-option-allow-type-imports-for-no-restricted-imports
) > 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)
waiting for #8113