Skip to content

Commit

Permalink
refactor: move useImportRestrictions into noRestrictedImports (#4509
Browse files Browse the repository at this point in the history
)
  • Loading branch information
arendjr authored and ematipico committed Nov 27, 2024
1 parent 0d75b28 commit 39edbf2
Show file tree
Hide file tree
Showing 14 changed files with 323 additions and 255 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
cli: major
---

# The rule `useImportRestrictions` has been removed and replaced with an option in `noRestrictedImports`

To avoid confusion between the two similarly named rules, `useImportRestrictions` has been removed
and replaced with the option `restrictPackagePrivate` in the `noRestrictedImports` rule:

```jsonc
// biome.json
{
"linter": {
"rules": {
"nursury": {
"noRestrictedImports": {
"level": "error",
"options": {
"restrictPackagePrivate": "all"
}
}
}
}
}
}
```

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions crates/biome_js_analyze/src/lint/nursery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ pub mod use_explicit_type;
pub mod use_google_font_display;
pub mod use_google_font_preconnect;
pub mod use_guard_for_in;
pub mod use_import_restrictions;
pub mod use_sorted_classes;
pub mod use_strict_mode;
pub mod use_trim_start_end;
Expand Down Expand Up @@ -82,7 +81,6 @@ declare_lint_group! {
self :: use_google_font_display :: UseGoogleFontDisplay ,
self :: use_google_font_preconnect :: UseGoogleFontPreconnect ,
self :: use_guard_for_in :: UseGuardForIn ,
self :: use_import_restrictions :: UseImportRestrictions ,
self :: use_sorted_classes :: UseSortedClasses ,
self :: use_strict_mode :: UseStrictMode ,
self :: use_trim_start_end :: UseTrimStartEnd ,
Expand Down
Loading

0 comments on commit 39edbf2

Please sign in to comment.