Skip to content
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

feat(linter): noRestrictedImports add patterns option #4302

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nekocode
Copy link

@nekocode nekocode commented Oct 15, 2024

Summary

This PR add an option patterns similar to no-restricted-imports#patterns :

"noRestrictedImports": {
    "options": {
        "paths": {
             "import-foo": "Using import-foo is not encouraged"
        },
        "patterns": [{
             "group": ["import-foo/*", "!import-foo/a"],
             "message": "Using import-foo is not encouraged"
        }]
    }
}

Test Plan

Changed snapshots

@github-actions github-actions bot added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages labels Oct 15, 2024
Copy link

codspeed-hq bot commented Oct 15, 2024

CodSpeed Performance Report

Merging #4302 will not alter performance

Comparing nekocode:feat/no-restricted-imports-patterns-option (4bcffbe) with main (561b54c)

Summary

✅ 97 untouched benchmarks

Copy link
Member

@Conaclos Conaclos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution. I am holding this PR because we are in the process of merging it with useImportRestrictions. This needs some design work.

@nekocode nekocode force-pushed the feat/no-restricted-imports-patterns-option branch from 4bcffbe to 0dd2210 Compare October 15, 2024 15:27
@github-actions github-actions bot added the A-Changelog Area: changelog label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-Linter Area: linter L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants