fix(linter): add option "allowTypeImports" for rule "no-restricted-imports"#7894
Merged
Sysix merged 46 commits intooxc-project:mainfrom Feb 23, 2025
Sysix:bugfix-linter-add-option-allow-type-imports-for-no-restricted-imports
Merged
fix(linter): add option "allowTypeImports" for rule "no-restricted-imports"#7894Sysix merged 46 commits intooxc-project:mainfrom Sysix:bugfix-linter-add-option-allow-type-imports-for-no-restricted-imports
Sysix merged 46 commits intooxc-project:mainfrom
Sysix:bugfix-linter-add-option-allow-type-imports-for-no-restricted-imports
Conversation
Contributor
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
Sysix
commented
Jan 3, 2025
Boshen
pushed a commit
that referenced
this pull request
Jan 18, 2025
) > 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)
…for-no-restricted-imports
…ricted-imports' of https://github.com/Sysix/oxc into bugfix-linter-add-option-allow-type-imports-for-no-restricted-imports
Sysix
commented
Feb 22, 2025
Sysix
commented
Feb 22, 2025
…for-no-restricted-imports
shulaoda
reviewed
Feb 23, 2025
…ricted-imports' of https://github.com/Sysix/oxc into bugfix-linter-add-option-allow-type-imports-for-no-restricted-imports
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #7810