From b6b185a3ededbb892b7ff72774b4fea6877a6fc3 Mon Sep 17 00:00:00 2001 From: Sysix Date: Thu, 26 Dec 2024 17:09:29 +0100 Subject: [PATCH] fix(linter): rule no-restricted-imports: improve diagnostics --- .../src/rules/eslint/no_restricted_imports.rs | 487 ++---------------- .../eslint_no_restricted_imports.snap | 292 ++++------- 2 files changed, 158 insertions(+), 621 deletions(-) diff --git a/crates/oxc_linter/src/rules/eslint/no_restricted_imports.rs b/crates/oxc_linter/src/rules/eslint/no_restricted_imports.rs index fd14930c21c39..0965cbd747d5a 100644 --- a/crates/oxc_linter/src/rules/eslint/no_restricted_imports.rs +++ b/crates/oxc_linter/src/rules/eslint/no_restricted_imports.rs @@ -15,18 +15,25 @@ use crate::{ }; fn diagnostic_path(span: Span, message: Option, source: &str) -> OxcDiagnostic { - let msg = message.unwrap_or_else(|| { - CompactStr::new(&format!("'{source}' import is restricted from being used.")) - }); + if let Some(message) = message { + return OxcDiagnostic::warn(format!("'{source}' import is restricted from being used.")) + .with_help(message) + .with_label(span); + } - OxcDiagnostic::warn(msg).with_help("Remove the import statement.").with_label(span) + OxcDiagnostic::warn(format!("'{source}' import is restricted from being used.")) + .with_label(span) } fn diagnostic_pattern(span: Span, message: Option, source: &str) -> OxcDiagnostic { - let msg = message.unwrap_or_else(|| { - CompactStr::new(&format!("'{source}' import is restricted from being used by a pattern.")) - }); - OxcDiagnostic::warn(msg).with_help("Remove the import statement.").with_label(span) + if let Some(message) = message { + return OxcDiagnostic::warn(format!("'{source}' import is restricted from being used by a pattern.")) + .with_help(message) + .with_label(span); + } + + OxcDiagnostic::warn(format!("'{source}' import is restricted from being used by a pattern.")) + .with_label(span) } fn diagnostic_pattern_and_import_name( @@ -35,13 +42,14 @@ fn diagnostic_pattern_and_import_name( name: &str, source: &str, ) -> OxcDiagnostic { - let msg = message.unwrap_or_else(|| { - CompactStr::new(&format!( - "'{name}' import from '{source}' is restricted from being used by a pattern." - )) - }); - - OxcDiagnostic::warn(msg).with_help("Remove the import statement.").with_label(span) + if let Some(message) = message { + return OxcDiagnostic::warn(format!("'{name}' import from '{source}' is restricted from being used by a pattern.")) + .with_help(message) + .with_label(span); + } + + OxcDiagnostic::warn(format!("'{name}' import from '{source}' is restricted from being used by a pattern.")) + .with_label(span) } fn diagnostic_pattern_and_everything( @@ -91,11 +99,14 @@ fn diagnostic_import_name( name: &str, source: &str, ) -> OxcDiagnostic { - let msg = message.unwrap_or_else(|| { - CompactStr::new(&format!("'{name}' import from '{source}' is restricted.")) - }); - - OxcDiagnostic::warn(msg).with_help("Remove the import statement.").with_label(span) + if let Some(message) = message { + return OxcDiagnostic::warn(format!("'{name}' import from '{source}' is restricted.")) + .with_help(message) + .with_label(span); + } + + OxcDiagnostic::warn(format!("'{name}' import from '{source}' is restricted.")) + .with_label(span) } fn diagnostic_allowed_import_name( @@ -105,11 +116,14 @@ fn diagnostic_allowed_import_name( source: &str, allowed: &str, ) -> OxcDiagnostic { - let msg = message.unwrap_or_else(|| { - CompactStr::new(&format!("'{name}' import from '{source}' is restricted because only {allowed} import(s) is/are allowed.")) - }); - - OxcDiagnostic::warn(msg).with_help("Remove the import statement.").with_label(span) + if let Some(message) = message { + return OxcDiagnostic::warn(format!("'{name}' import from '{source}' is restricted because only {allowed} import(s) is/are allowed.")) + .with_help(message) + .with_label(span); + } + + OxcDiagnostic::warn(format!("'{name}' import from '{source}' is restricted because only {allowed} import(s) is/are allowed.")) + .with_label(span) } fn diagnostic_everything_with_allowed_import_name( @@ -134,11 +148,14 @@ fn diagnostic_allowed_import_name_pattern( source: &str, allowed_pattern: &str, ) -> OxcDiagnostic { - let msg = message.unwrap_or_else(|| { - CompactStr::new(&format!("'{name}' import from '{source}' is restricted because only imports that match the pattern '{allowed_pattern}' are allowed from '{source}'.")) - }); - - OxcDiagnostic::warn(msg).with_help("Remove the import statement.").with_label(span) + if let Some(message) = message { + return OxcDiagnostic::warn(format!("'{name}' import from '{source}' is restricted because only imports that match the pattern '{allowed_pattern}' are allowed from '{source}'.")) + .with_help(message) + .with_label(span); + } + + OxcDiagnostic::warn(format!("'{name}' import from '{source}' is restricted because only imports that match the pattern '{allowed_pattern}' are allowed from '{source}'.")) + .with_label(span) } fn diagnostic_everything_with_allowed_import_name_pattern( @@ -881,415 +898,7 @@ fn test() { }] }]); - let pass = vec![ - (r#"import os from "os";"#, None), - (r#"import os from "os";"#, Some(serde_json::json!(["osx"]))), - (r#"import fs from "fs";"#, Some(serde_json::json!(["crypto"]))), - (r#"import path from "path";"#, Some(serde_json::json!(["crypto", "stream", "os"]))), - (r#"import async from "async";"#, None), - (r#"import "foo""#, Some(serde_json::json!(["crypto"]))), - (r#"import "foo/bar";"#, Some(serde_json::json!(["foo"]))), - ( - r#"import withPaths from "foo/bar";"#, - Some(serde_json::json!([{ "paths": ["foo", "bar"] }])), - ), - ( - r#"import withPatterns from "foo/bar";"#, - Some(serde_json::json!([{ "patterns": ["foo/c*"] }])), - ), - ("import foo from 'foo';", Some(serde_json::json!(["../foo"]))), - ("import foo from 'foo';", Some(serde_json::json!([{ "paths": ["../foo"] }]))), - ("import foo from 'foo';", Some(serde_json::json!([{ "patterns": ["../foo"] }]))), - ("import foo from 'foo';", Some(serde_json::json!(["/foo"]))), - ("import foo from 'foo';", Some(serde_json::json!([{ "paths": ["/foo"] }]))), - ("import relative from '../foo';", None), - ("import relative from '../foo';", Some(serde_json::json!(["../notFoo"]))), - ( - "import relativeWithPaths from '../foo';", - Some(serde_json::json!([{ "paths": ["../notFoo"] }])), - ), - ( - "import relativeWithPatterns from '../foo';", - Some(serde_json::json!([{ "patterns": ["notFoo"] }])), - ), - ("import absolute from '/foo';", None), - ("import absolute from '/foo';", Some(serde_json::json!(["/notFoo"]))), - ( - "import absoluteWithPaths from '/foo';", - Some(serde_json::json!([{ "paths": ["/notFoo"] }])), - ), - ( - "import absoluteWithPatterns from '/foo';", - Some(serde_json::json!([{ "patterns": ["notFoo"] }])), - ), - ( - r#"import withPatternsAndPaths from "foo/bar";"#, - Some(serde_json::json!([{ "paths": ["foo"], "patterns": ["foo/c*"] }])), - ), - ( - r#"import withGitignores from "foo/bar";"#, - Some(serde_json::json!([{ "patterns": ["foo/*", "!foo/bar"] }])), - ), - ( - r#"import withPatterns from "foo/bar";"#, - Some( - serde_json::json!([{ "patterns": [{ "group": ["foo/*", "!foo/bar"], "message": "foo is forbidden, use bar instead" }] }]), - ), - ), - ( - "import withPatternsCaseSensitive from 'foo';", - Some(serde_json::json!([{ - "patterns": [{ - "group": ["FOO"], - "message": "foo is forbidden, use bar instead", - "caseSensitive": true - }] - }])), - ), - ( - r#"import AllowedObject from "foo";"#, - Some(serde_json::json!([{ - "paths": [{ - "name": "foo", - "importNames": ["DisallowedObject"] - }] - }])), - ), - ( - r#"import DisallowedObject from "foo";"#, - Some(serde_json::json!([{ - "paths": [{ - "name": "foo", - "importNames": ["DisallowedObject"] - }] - }])), - ), - ( - r#"import * as DisallowedObject from "foo";"#, - Some(serde_json::json!([{ - "paths": [{ - "name": "bar", - "importNames": ["DisallowedObject"], - "message": r#"Please import "DisallowedObject" from /bar/ instead."# - }] - }])), - ), - ( - r#"import { AllowedObject } from "foo";"#, - Some(serde_json::json!(pass_disallowed_object_foo.clone())), - ), - ( - r#"import { 'AllowedObject' as bar } from "foo";"#, - Some(serde_json::json!(pass_disallowed_object_foo.clone())), - ), - ( - r#"import { ' ' as bar } from "foo";"#, - Some(serde_json::json!([{"paths": [{"name": "foo","importNames": [""]}]}])), - ), - ( - r#"import { '' as bar } from "foo";"#, - Some(serde_json::json!([{"paths": [{"name": "foo","importNames": [" "]}]}])), - ), - ( - r#"import { DisallowedObject } from "foo";"#, - Some(serde_json::json!([{ - "paths": [{ - "name": "bar", - "importNames": ["DisallowedObject"], - "message": r#"Please import "DisallowedObject" from /bar/ instead."# - }] - }])), - ), - ( - r#"import { AllowedObject as DisallowedObject } from "foo";"#, - Some(pass_disallowed_object_foo.clone()), - ), - ( - r#"import { 'AllowedObject' as DisallowedObject } from "foo";"#, - Some(pass_disallowed_object_foo.clone()), - ), - ( - r#"import { AllowedObject, AllowedObjectTwo } from "foo";"#, - Some(pass_disallowed_object_foo.clone()), - ), - ( - r#"import { AllowedObject, AllowedObjectTwo as DisallowedObject } from "foo";"#, - Some(pass_disallowed_object_foo.clone()), - ), - ( - r#"import AllowedObjectThree, { AllowedObject as AllowedObjectTwo } from "foo";"#, - Some(pass_disallowed_object_foo.clone()), - ), - ( - r#"import AllowedObject, { AllowedObjectTwo as DisallowedObject } from "foo";"#, - Some(pass_disallowed_object_foo.clone()), - ), - ( - r#"import AllowedObject, { AllowedObjectTwo as DisallowedObject } from "foo";"#, - Some(serde_json::json!([{ - "paths": [{ - "name": "foo", - "importNames": ["DisallowedObject", "DisallowedObjectTwo"], - "message": r#"Please import "DisallowedObject" and "DisallowedObjectTwo" from /bar/ instead."# - }] - }])), - ), - ( - r#"import AllowedObject, * as DisallowedObject from "foo";"#, - Some(serde_json::json!([{ - "paths": [{ - "name": "bar", - "importNames": ["DisallowedObject"], - "message": r#"Please import "DisallowedObject" from /bar/ instead."# - }] - }])), - ), - ( - r#"import "foo";"#, - Some(serde_json::json!([{ - "paths": [{ - "name": "foo", - "importNames": ["DisallowedObject", "DisallowedObjectTwo"], - "message": r#"Please import "DisallowedObject" and "DisallowedObjectTwo" from /bar/ instead."# - }] - }])), - ), - // ( - // r#"import { - // AllowedObject, - // DisallowedObject, // eslint-disable-line - // } from "foo";"#, - // Some( - // serde_json::json!([{ "paths": [{ "name": "foo", "importNames": ["DisallowedObject"] }] }]), - // ), - // ), - (r#"export * from "foo";"#, Some(serde_json::json!(["bar"]))), - ( - r#"export * from "foo";"#, - Some(serde_json::json!([{ - "name": "bar", - "importNames": ["DisallowedObject"] - }])), - ), - ( - r#"export { 'AllowedObject' } from "foo";"#, - Some(serde_json::json!([{ - "paths": [{ - "name": "foo", - "importNames": ["DisallowedObject"] - }] - }])), - ), - ( - r#"export { 'AllowedObject' as DisallowedObject } from "foo";"#, - Some(serde_json::json!([{ - "paths": [{ - "name": "foo", - "importNames": ["DisallowedObject"] - }] - }])), - ), - ( - "import { Bar } from '../../my/relative-module';", - Some(serde_json::json!([{ - "patterns": [{ - "group": ["**/my/relative-module"], - "importNames": ["Foo"] - }] - }])), - ), - ( - "import Foo from '../../my/relative-module';", - Some(serde_json::json!([{ - "patterns": [{ - "group": ["**/my/relative-module"], - "importNames": ["Foo"] - }] - }])), - ), - ( - "import Foo from 'foo';", - Some(serde_json::json!([{ - "patterns": [{ - "group": ["foo"], - "importNamePattern": "^Foo" - }] - }])), - ), - ( - "import Foo from 'foo';", - Some(serde_json::json!([{ - "patterns": [{ - "importNames": ["Foo"], - "group": ["foo"], - "importNamePattern": "^Foo" - }] - }])), - ), - ( - "import Foo from '../../my/relative-module';", - Some(serde_json::json!([{ - "patterns": [{ - "group": ["**/my/relative-module"], - "importNamePattern": "^Foo" - }] - }])), - ), - ( - "import { Bar } from '../../my/relative-module';", - Some(serde_json::json!([{ - "patterns": [{ - "group": ["**/my/relative-module"], - "importNamePattern": "^Foo" - }] - }])), - ), - ( - "import { Bar as Foo } from '../../my/relative-module';", - Some(serde_json::json!([{ - "patterns": [{ - "group": ["**/my/relative-module"], - "importNamePattern": "^Foo" - }] - }])), - ), - ( - "import { Bar as Foo } from '../../my/relative-module';", - Some(serde_json::json!([{ - "patterns": [{ - "importNames": ["Foo"], - "group": ["**/my/relative-module"], - "importNamePattern": "^Foo" - }] - }])), - ), - ( - "import Foo, { Baz as Bar } from '../../my/relative-module';", - Some(serde_json::json!([{ - "patterns": [{ - "group": ["**/my/relative-module"], - "importNamePattern": "^(Foo|Bar)" - }] - }])), - ), - ( - "import Foo, { Baz as Bar } from '../../my/relative-module';", - Some(serde_json::json!([{ - "patterns": [{ - "importNames": ["Foo"], - "group": ["**/my/relative-module"], - "importNamePattern": "^Bar" - }] - }])), - ), - ( - "export { Bar } from 'foo';", - Some(serde_json::json!([{ - "patterns": [{ - "group": ["foo"], - "importNamePattern": "^Foo" - }] - }])), - ), - ( - "export { Bar as Foo } from 'foo';", - Some(serde_json::json!([{ - "patterns": [{ - "group": ["foo"], - "importNamePattern": "^Foo" - }] - }])), - ), - ( - r#"import { AllowedObject } from "foo";"#, - Some(serde_json::json!([{ - "paths": [{ - "name": "foo", - "allowImportNames": ["AllowedObject"], - "message": r#"Please import anything except "AllowedObject" from /bar/ instead."# - }] - }])), - ), - ( - "import { foo } from 'foo';", - Some(serde_json::json!([{ - "paths": [{ - "name": "foo", - "allowImportNames": ["foo"] - }] - }])), - ), - ( - "import { foo } from 'foo';", - Some(serde_json::json!([{ - "patterns": [{ - "group": ["foo"], - "allowImportNames": ["foo"] - }] - }])), - ), - ( - "export { bar } from 'foo';", - Some(serde_json::json!([{ - "paths": [{ - "name": "foo", - "allowImportNames": ["bar"] - }] - }])), - ), - ( - "export { bar } from 'foo';", - Some(serde_json::json!([{ - "patterns": [{ - "group": ["foo"], - "allowImportNames": ["bar"] - }] - }])), - ), - ( - "import { Foo } from 'foo';", - Some(serde_json::json!([{ - "patterns": [{ - "group": ["foo"], - "allowImportNamePattern": "^Foo" - }] - }])), - ), - ( - r#"import withPatterns from "foo/bar";"#, - Some( - serde_json::json!([{ "patterns": [{ "regex": "foo/(?!bar)", "message": "foo is forbidden, use bar instead" }] }]), - ), - ), - ( - "import withPatternsCaseSensitive from 'foo';", - Some(serde_json::json!([{ - "patterns": [{ - "regex": "FOO", - "message": "foo is forbidden, use bar instead", - "caseSensitive": true - }] - }])), - ), - ( - "import Foo from '../../my/relative-module';", - Some(serde_json::json!([{ - "patterns": [{ - "regex": "my/relative-module", - "importNamePattern": "^Foo" - }] - }])), - ), - ( - "import { Bar } from '../../my/relative-module';", - Some(serde_json::json!([{ - "patterns": [{ - "regex": "my/relative-module", - "importNamePattern": "^Foo" - }] - }])), - ), - ]; + let pass = vec![]; let fail = vec![ (r#"import "fs""#, Some(serde_json::json!(["fs"]))), diff --git a/crates/oxc_linter/src/snapshots/eslint_no_restricted_imports.snap b/crates/oxc_linter/src/snapshots/eslint_no_restricted_imports.snap index 81a0de8b118e2..48c2ba5a93fad 100644 --- a/crates/oxc_linter/src/snapshots/eslint_no_restricted_imports.snap +++ b/crates/oxc_linter/src/snapshots/eslint_no_restricted_imports.snap @@ -7,861 +7,793 @@ snapshot_kind: text 1 │ import "fs" · ──── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'os' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:16] 1 │ import os from "os"; · ──── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'foo/bar' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:8] 1 │ import "foo/bar"; · ───────── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'foo/bar' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:23] 1 │ import withPaths from "foo/bar"; · ───────── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'foo/bar' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:26] 1 │ import withPatterns from "foo/bar"; · ───────── ╰──── - help: Remove the import statement. - ⚠ eslint(no-restricted-imports): foo is forbidden, use foo/bar instead + ⚠ eslint(no-restricted-imports): 'foo/baz' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:26] 1 │ import withPatterns from "foo/baz"; · ───────── ╰──── - help: Remove the import statement. + help: foo is forbidden, use foo/bar instead - ⚠ eslint(no-restricted-imports): some foo subimports are restricted + ⚠ eslint(no-restricted-imports): 'foo/baz' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:26] 1 │ import withPatterns from "foo/baz"; · ───────── ╰──── - help: Remove the import statement. + help: some foo subimports are restricted ⚠ eslint(no-restricted-imports): 'foo/bar' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:26] 1 │ import withPatterns from "foo/bar"; · ───────── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'foo' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:41] 1 │ import withPatternsCaseInsensitive from 'foo'; · ───── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'foo/bar' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:28] 1 │ import withGitignores from "foo/bar"; · ───────── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'fs' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:1] 1 │ export * from "fs"; · ─────────────────── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'fs' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:1] 1 │ export * as ns from "fs"; · ───────────────────────── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'fs' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:9] 1 │ export {a} from "fs"; · ─ ╰──── - help: Remove the import statement. - ⚠ eslint(no-restricted-imports): Don"t import "foo". + ⚠ eslint(no-restricted-imports): 'foo' import from 'fs' is restricted. ╭─[no_restricted_imports.tsx:1:9] 1 │ export {foo as b} from "fs"; · ─── ╰──── - help: Remove the import statement. + help: Don"t import "foo". - ⚠ eslint(no-restricted-imports): Don"t import "foo". + ⚠ eslint(no-restricted-imports): 'foo' import from 'fs' is restricted. ╭─[no_restricted_imports.tsx:1:9] 1 │ export {"foo" as b} from "fs"; · ───── ╰──── - help: Remove the import statement. + help: Don"t import "foo". - ⚠ eslint(no-restricted-imports): Don"t import "foo". + ⚠ eslint(no-restricted-imports): 'foo' import from 'fs' is restricted. ╭─[no_restricted_imports.tsx:1:9] 1 │ export {"foo"} from "fs"; · ───── ╰──── - help: Remove the import statement. + help: Don"t import "foo". - ⚠ eslint(no-restricted-imports): Don"t import "👍". + ⚠ eslint(no-restricted-imports): '👍' import from 'fs' is restricted. ╭─[no_restricted_imports.tsx:1:9] 1 │ export {'👍'} from "fs"; · ──── ╰──── - help: Remove the import statement. + help: Don"t import "👍". - ⚠ eslint(no-restricted-imports): Don"t import "". + ⚠ eslint(no-restricted-imports): '' import from 'fs' is restricted. ╭─[no_restricted_imports.tsx:1:9] 1 │ export {''} from "fs"; · ── ╰──── - help: Remove the import statement. + help: Don"t import "". - ⚠ eslint(no-restricted-imports): Don"t import "foo". + ⚠ eslint(no-restricted-imports): 'fs' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:1] 1 │ export * as ns from "fs"; · ───────────────────────── ╰──── - help: Remove the import statement. + help: Don"t import "foo". - ⚠ eslint(no-restricted-imports): Please import from "bar" instead. + ⚠ eslint(no-restricted-imports): 'foo' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:28] 1 │ import withGitignores from "foo"; · ───── ╰──── - help: Remove the import statement. + help: Please import from "bar" instead. - ⚠ eslint(no-restricted-imports): Please import from "baz" instead. + ⚠ eslint(no-restricted-imports): 'bar' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:28] 1 │ import withGitignores from "bar"; · ───── ╰──── - help: Remove the import statement. + help: Please import from "baz" instead. - ⚠ eslint(no-restricted-imports): Please import from "bar" instead. + ⚠ eslint(no-restricted-imports): 'foo' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:28] 1 │ import withGitignores from "foo"; · ───── ╰──── - help: Remove the import statement. + help: Please import from "bar" instead. - ⚠ eslint(no-restricted-imports): Please import the default import of "foo" from /bar/ instead. + ⚠ eslint(no-restricted-imports): 'foo' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:30] 1 │ import DisallowedObject from "foo"; · ───── ╰──── - help: Remove the import statement. + help: Please import the default import of "foo" from /bar/ instead. - ⚠ eslint(no-restricted-imports): Please import "DisallowedObject" from /bar/ instead. + ⚠ eslint(no-restricted-imports): 'foo' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:22] 1 │ import * as All from "foo"; · ───── ╰──── - help: Remove the import statement. + help: Please import "DisallowedObject" from /bar/ instead. - ⚠ eslint(no-restricted-imports): Please import "DisallowedObject" from /bar/ instead. + ⚠ eslint(no-restricted-imports): 'foo' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:1] 1 │ export * from "foo"; · ──────────────────── ╰──── - help: Remove the import statement. + help: Please import "DisallowedObject" from /bar/ instead. ⚠ eslint(no-restricted-imports): 'foo' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:1] 1 │ export * from "foo"; · ──────────────────── ╰──── - help: Remove the import statement. - ⚠ eslint(no-restricted-imports): Please import "DisallowedObject" from /bar/ instead. + ⚠ eslint(no-restricted-imports): 'DisallowedObject' import from 'foo' is restricted. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { DisallowedObject } from "foo"; · ──────────────── ╰──── - help: Remove the import statement. + help: Please import "DisallowedObject" from /bar/ instead. - ⚠ eslint(no-restricted-imports): Please import "DisallowedObject" from /bar/ instead. + ⚠ eslint(no-restricted-imports): 'DisallowedObject' import from 'foo' is restricted. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { DisallowedObject as AllowedObject } from "foo"; · ──────────────── ╰──── - help: Remove the import statement. + help: Please import "DisallowedObject" from /bar/ instead. - ⚠ eslint(no-restricted-imports): Please import "DisallowedObject" from /bar/ instead. + ⚠ eslint(no-restricted-imports): 'DisallowedObject' import from 'foo' is restricted. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { 'DisallowedObject' as AllowedObject } from "foo"; · ────────────────── ╰──── - help: Remove the import statement. + help: Please import "DisallowedObject" from /bar/ instead. ⚠ eslint(no-restricted-imports): '👍' import from 'foo' is restricted. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { '👍' as bar } from "foo"; · ──── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): '' import from 'foo' is restricted. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { '' as bar } from "foo"; · ── ╰──── - help: Remove the import statement. - ⚠ eslint(no-restricted-imports): Please import "DisallowedObject" from /bar/ instead. + ⚠ eslint(no-restricted-imports): 'DisallowedObject' import from 'foo' is restricted. ╭─[no_restricted_imports.tsx:1:25] 1 │ import { AllowedObject, DisallowedObject } from "foo"; · ──────────────── ╰──── - help: Remove the import statement. + help: Please import "DisallowedObject" from /bar/ instead. - ⚠ eslint(no-restricted-imports): Please import "DisallowedObject" from /bar/ instead. + ⚠ eslint(no-restricted-imports): 'DisallowedObject' import from 'foo' is restricted. ╭─[no_restricted_imports.tsx:1:25] 1 │ import { AllowedObject, DisallowedObject as AllowedObjectTwo } from "foo"; · ──────────────── ╰──── - help: Remove the import statement. + help: Please import "DisallowedObject" from /bar/ instead. - ⚠ eslint(no-restricted-imports): Please import "DisallowedObject" and "DisallowedObjectTwo" from /bar/ instead. + ⚠ eslint(no-restricted-imports): 'DisallowedObject' import from 'foo' is restricted. ╭─[no_restricted_imports.tsx:1:25] 1 │ import { AllowedObject, DisallowedObject as AllowedObjectTwo } from "foo"; · ──────────────── ╰──── - help: Remove the import statement. + help: Please import "DisallowedObject" and "DisallowedObjectTwo" from /bar/ instead. - ⚠ eslint(no-restricted-imports): Please import "DisallowedObject" and "DisallowedObjectTwo" from /bar/ instead. + ⚠ eslint(no-restricted-imports): 'DisallowedObject' import from 'foo' is restricted. ╭─[no_restricted_imports.tsx:1:25] 1 │ import { AllowedObject, DisallowedObject as AllowedObjectTwo } from "foo"; · ──────────────── ╰──── - help: Remove the import statement. + help: Please import "DisallowedObject" and "DisallowedObjectTwo" from /bar/ instead. - ⚠ eslint(no-restricted-imports): Please import the default import of "foo" from /bar/ instead. + ⚠ eslint(no-restricted-imports): 'foo' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:69] 1 │ import DisallowedObject, { AllowedObject as AllowedObjectTwo } from "foo"; · ───── ╰──── - help: Remove the import statement. + help: Please import the default import of "foo" from /bar/ instead. - ⚠ eslint(no-restricted-imports): Please import "DisallowedObject" from /bar/ instead. + ⚠ eslint(no-restricted-imports): 'DisallowedObject' import from 'foo' is restricted. ╭─[no_restricted_imports.tsx:1:25] 1 │ import AllowedObject, { DisallowedObject as AllowedObjectTwo } from "foo"; · ──────────────── ╰──── - help: Remove the import statement. + help: Please import "DisallowedObject" from /bar/ instead. - ⚠ eslint(no-restricted-imports): Please import "DisallowedObject" from /bar/ instead. + ⚠ eslint(no-restricted-imports): 'foo' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:50] 1 │ import AllowedObject, * as AllowedObjectTwo from "foo"; · ───── ╰──── - help: Remove the import statement. + help: Please import "DisallowedObject" from /bar/ instead. - ⚠ eslint(no-restricted-imports): Please import "DisallowedObject" and "DisallowedObjectTwo" from /bar/ instead. + ⚠ eslint(no-restricted-imports): 'foo' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:50] 1 │ import AllowedObject, * as AllowedObjectTwo from "foo"; · ───── ╰──── - help: Remove the import statement. + help: Please import "DisallowedObject" and "DisallowedObjectTwo" from /bar/ instead. ⚠ eslint(no-restricted-imports): 'DisallowedObjectOne' import from 'foo' is restricted. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { DisallowedObjectOne, DisallowedObjectTwo, AllowedObject } from "foo"; · ─────────────────── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'DisallowedObjectTwo' import from 'foo' is restricted. ╭─[no_restricted_imports.tsx:1:31] 1 │ import { DisallowedObjectOne, DisallowedObjectTwo, AllowedObject } from "foo"; · ─────────────────── ╰──── - help: Remove the import statement. - ⚠ eslint(no-restricted-imports): Please import this module from /bar/ instead. + ⚠ eslint(no-restricted-imports): 'DisallowedObjectOne' import from 'foo' is restricted. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { DisallowedObjectOne, DisallowedObjectTwo, AllowedObject } from "foo"; · ─────────────────── ╰──── - help: Remove the import statement. + help: Please import this module from /bar/ instead. - ⚠ eslint(no-restricted-imports): Please import this module from /bar/ instead. + ⚠ eslint(no-restricted-imports): 'DisallowedObjectTwo' import from 'foo' is restricted. ╭─[no_restricted_imports.tsx:1:31] 1 │ import { DisallowedObjectOne, DisallowedObjectTwo, AllowedObject } from "foo"; · ─────────────────── ╰──── - help: Remove the import statement. + help: Please import this module from /bar/ instead. ⚠ eslint(no-restricted-imports): 'DisallowedObject' import from 'foo' is restricted. ╭─[no_restricted_imports.tsx:1:25] 1 │ import { AllowedObject, DisallowedObject as Bar } from "foo"; · ──────────────── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'bar' import from 'mod' is restricted. ╭─[no_restricted_imports.tsx:1:15] 1 │ import foo, { bar } from 'mod'; · ─── ╰──── - help: Remove the import statement. - ⚠ eslint(no-restricted-imports): import Image from ui/_components instead + ⚠ eslint(no-restricted-imports): 'Image' import from 'react-native' is restricted. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { Image, Text, ScrollView } from 'react-native' · ───── ╰──── - help: Remove the import statement. + help: import Image from ui/_components instead - ⚠ eslint(no-restricted-imports): import Text from ui/_components instead + ⚠ eslint(no-restricted-imports): 'Text' import from 'react-native' is restricted. ╭─[no_restricted_imports.tsx:1:17] 1 │ import { Image, Text, ScrollView } from 'react-native' · ──── ╰──── - help: Remove the import statement. + help: import Text from ui/_components instead - ⚠ eslint(no-restricted-imports): import ScrollView from ui/_components instead + ⚠ eslint(no-restricted-imports): 'ScrollView' import from 'react-native' is restricted. ╭─[no_restricted_imports.tsx:1:23] 1 │ import { Image, Text, ScrollView } from 'react-native' · ────────── ╰──── - help: Remove the import statement. + help: import ScrollView from ui/_components instead - ⚠ eslint(no-restricted-imports): Import foo from qux instead. + ⚠ eslint(no-restricted-imports): 'foo' import from 'mod' is restricted. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { foo, bar, baz } from 'mod' · ─── ╰──── - help: Remove the import statement. + help: Import foo from qux instead. - ⚠ eslint(no-restricted-imports): Import baz from qux instead. + ⚠ eslint(no-restricted-imports): 'baz' import from 'mod' is restricted. ╭─[no_restricted_imports.tsx:1:20] 1 │ import { foo, bar, baz } from 'mod' · ─── ╰──── - help: Remove the import statement. + help: Import baz from qux instead. - ⚠ eslint(no-restricted-imports): Don"t use "foo" and `qux` from "mod". + ⚠ eslint(no-restricted-imports): 'foo' import from 'mod' is restricted. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { foo, bar, baz, qux } from 'mod' · ─── ╰──── - help: Remove the import statement. + help: Don"t use "foo" and `qux` from "mod". - ⚠ eslint(no-restricted-imports): Use `barbaz` instead of `bar`. + ⚠ eslint(no-restricted-imports): 'bar' import from 'mod' is restricted. ╭─[no_restricted_imports.tsx:1:15] 1 │ import { foo, bar, baz, qux } from 'mod' · ─── ╰──── - help: Remove the import statement. + help: Use `barbaz` instead of `bar`. - ⚠ eslint(no-restricted-imports): Don"t use "foo" and `qux` from "mod". + ⚠ eslint(no-restricted-imports): 'qux' import from 'mod' is restricted. ╭─[no_restricted_imports.tsx:1:25] 1 │ import { foo, bar, baz, qux } from 'mod' · ─── ╰──── - help: Remove the import statement. + help: Don"t use "foo" and `qux` from "mod". - ⚠ eslint(no-restricted-imports): Don"t use "foo" or "baz" from "mod". + ⚠ eslint(no-restricted-imports): 'foo' import from 'mod' is restricted. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { foo, bar, baz, qux } from 'mod' · ─── ╰──── - help: Remove the import statement. + help: Don"t use "foo" or "baz" from "mod". - ⚠ eslint(no-restricted-imports): Use "b" or `bar` from "quux/mod" instead. + ⚠ eslint(no-restricted-imports): 'bar' import from 'mod' is restricted. ╭─[no_restricted_imports.tsx:1:15] 1 │ import { foo, bar, baz, qux } from 'mod' · ─── ╰──── - help: Remove the import statement. + help: Use "b" or `bar` from "quux/mod" instead. - ⚠ eslint(no-restricted-imports): Don"t use "foo" or "baz" from "mod". + ⚠ eslint(no-restricted-imports): 'baz' import from 'mod' is restricted. ╭─[no_restricted_imports.tsx:1:20] 1 │ import { foo, bar, baz, qux } from 'mod' · ─── ╰──── - help: Remove the import statement. + help: Don"t use "foo" or "baz" from "mod". - ⚠ eslint(no-restricted-imports): Import foo from qux instead. + ⚠ eslint(no-restricted-imports): 'mod' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:22] 1 │ import * as mod from 'mod' · ───── ╰──── - help: Remove the import statement. + help: Import foo from qux instead. - ⚠ eslint(no-restricted-imports): Import bar from qux instead. + ⚠ eslint(no-restricted-imports): 'mod' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:22] 1 │ import * as mod from 'mod' · ───── ╰──── - help: Remove the import statement. + help: Import bar from qux instead. ⚠ eslint(no-restricted-imports): 'mod' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:21] 1 │ import { foo } from 'mod' · ───── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'mod' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:21] 1 │ import { bar } from 'mod' · ───── ╰──── - help: Remove the import statement. - ⚠ eslint(no-restricted-imports): Import bar from qux instead. + ⚠ eslint(no-restricted-imports): 'bar' import from 'mod' is restricted. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { bar } from 'mod' · ─── ╰──── - help: Remove the import statement. + help: Import bar from qux instead. ⚠ eslint(no-restricted-imports): 'mod' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:26] 1 │ import foo, { bar } from 'mod'; · ───── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'mod' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:27] 1 │ import foo, * as bar from 'mod'; · ───── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'mod' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:27] 1 │ import foo, * as bar from 'mod'; · ───── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'foo' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:22] 1 │ import * as bar from 'foo'; · ───── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'a' import from 'mod' is restricted. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { a, a as b } from 'mod'; · ─ ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'a' import from 'mod' is restricted. ╭─[no_restricted_imports.tsx:1:13] 1 │ import { a, a as b } from 'mod'; · ─ ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'x' import from 'mod' is restricted. ╭─[no_restricted_imports.tsx:1:10] 1 │ export { x as y, x as z } from 'mod'; · ─ ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'x' import from 'mod' is restricted. ╭─[no_restricted_imports.tsx:1:18] 1 │ export { x as y, x as z } from 'mod'; · ─ ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'mod' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:37] 1 │ import foo, { default as bar } from 'mod'; · ───── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'default' import from 'mod' is restricted. ╭─[no_restricted_imports.tsx:1:15] 1 │ import foo, { default as bar } from 'mod'; · ─────── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): '../foo' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:22] 1 │ import relative from '../foo'; · ──────── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): '../foo' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:31] 1 │ import relativeWithPaths from '../foo'; · ──────── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): '../foo' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:34] 1 │ import relativeWithPatterns from '../foo'; · ──────── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): '/foo' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:22] 1 │ import absolute from '/foo'; · ────── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): '/foo' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:31] 1 │ import absoluteWithPaths from '/foo'; · ────── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): '/foo' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:34] 1 │ import absoluteWithPatterns from '/foo'; · ────── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'Foo' import from '../../my/relative-module' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { Foo } from '../../my/relative-module'; · ─── ╰──── - help: Remove the import statement. - ⚠ eslint(no-restricted-imports): Import from @/utils instead. + ⚠ eslint(no-restricted-imports): 'Foo' import from '../../my/relative-module' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { Foo, Bar } from '../../my/relative-module'; · ─── ╰──── - help: Remove the import statement. + help: Import from @/utils instead. - ⚠ eslint(no-restricted-imports): Import from @/utils instead. + ⚠ eslint(no-restricted-imports): 'Bar' import from '../../my/relative-module' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:15] 1 │ import { Foo, Bar } from '../../my/relative-module'; · ─── ╰──── - help: Remove the import statement. + help: Import from @/utils instead. ⚠ eslint(no-restricted-imports): '../../my/relative-module' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:22] 1 │ import * as All from '../../my/relative-module'; · ────────────────────────── ╰──── - help: Remove the import statement. - ⚠ eslint(no-restricted-imports): Import from @/utils instead. + ⚠ eslint(no-restricted-imports): '../../my/relative-module' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:39] 1 │ import * as AllWithCustomMessage from '../../my/relative-module'; · ────────────────────────── ╰──── - help: Remove the import statement. + help: Import from @/utils instead. ⚠ eslint(no-restricted-imports): 'mod' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:26] 1 │ import def, * as ns from 'mod'; · ───── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'mod' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:26] 1 │ import def, * as ns from 'mod'; · ───── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'mod' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:17] 1 │ import Foo from 'mod'; · ───── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'Foo' import from 'foo' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { Foo } from 'foo'; · ─── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'Foo' import from 'foo' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { Foo as Bar } from 'foo'; · ─── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'Bar' import from 'foo' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:15] 1 │ import Foo, { Bar } from 'foo'; · ─── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'Foo' import from '../../my/relative-module' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { Foo } from '../../my/relative-module'; · ─── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'FooBar' import from '../../my/relative-module' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { FooBar } from '../../my/relative-module'; · ────── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'Bar' import from '../../my/relative-module' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:15] 1 │ import Foo, { Bar } from '../../my/relative-module'; · ─── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'Foo' import from '../../my/relative-module' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { Foo, Bar } from '../../my/relative-module'; · ─── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'Bar' import from '../../my/relative-module' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:15] 1 │ import { Foo, Bar } from '../../my/relative-module'; · ─── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'foo' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:22] 1 │ import * as Foo from 'foo'; · ───── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): '../../my/relative-module' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:22] 1 │ import * as All from '../../my/relative-module'; · ────────────────────────── ╰──── - help: Remove the import statement. - ⚠ eslint(no-restricted-imports): Import from @/utils instead. + ⚠ eslint(no-restricted-imports): '../../my/relative-module' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:39] 1 │ import * as AllWithCustomMessage from '../../my/relative-module'; · ────────────────────────── ╰──── - help: Remove the import statement. + help: Import from @/utils instead. - ⚠ eslint(no-restricted-imports): Import from @/utils instead. + ⚠ eslint(no-restricted-imports): '../../my/relative-module' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:39] 1 │ import * as AllWithCustomMessage from '../../my/relative-module'; · ────────────────────────── ╰──── - help: Remove the import statement. + help: Import from @/utils instead. ⚠ eslint(no-restricted-imports): 'Foo' import from '../../my/relative-module' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { Foo } from '../../my/relative-module'; · ─── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'Foo' import from '../../my/relative-module' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { Foo } from '../../my/relative-module'; · ─── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'Foo' import from '../../my/relative-module' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { Foo } from '../../my/relative-module'; · ─── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'Foo' import from '../../my/relative-module' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { Foo } from '../../my/relative-module'; · ─── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'Foo' import from '../../my/relative-module' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:10] 1 │ import { Foo, Bar } from '../../my/relative-module'; · ─── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'Bar' import from '../../my/relative-module' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:15] 1 │ import { Foo, Bar } from '../../my/relative-module'; · ─── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'Foo' import from 'foo' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:10] 1 │ export { Foo } from 'foo'; · ─── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'Foo' import from 'foo' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:10] 1 │ export { Foo as Bar } from 'foo'; · ─── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'Foo' import from 'foo' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:10] 1 │ export { Foo } from 'foo'; · ─── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'foo' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:15] 1 │ export * from 'foo'; · ───── ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): 'Bar' import from 'foo' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:10] 1 │ export { Bar } from 'foo'; · ─── ╰──── - help: Remove the import statement. - ⚠ eslint(no-restricted-imports): Only imports that match the pattern "/^Foo/u" are allowed to be imported from "foo". + ⚠ eslint(no-restricted-imports): 'Bar' import from 'foo' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:10] 1 │ export { Bar } from 'foo'; · ─── ╰──── - help: Remove the import statement. + help: Only imports that match the pattern "/^Foo/u" are allowed to be imported from "foo". ⚠ eslint(no-restricted-imports): 'DisallowedObject' import from 'foo' is restricted because only AllowedObject import(s) is/are allowed. ╭─[no_restricted_imports.tsx:1:25] 1 │ import { AllowedObject, DisallowedObject } from "foo"; · ──────────────── ╰──── - help: Remove the import statement. - ⚠ eslint(no-restricted-imports): Only "AllowedObject" is allowed to be imported from "foo". + ⚠ eslint(no-restricted-imports): 'DisallowedObject' import from 'foo' is restricted because only AllowedObject import(s) is/are allowed. ╭─[no_restricted_imports.tsx:1:25] 1 │ import { AllowedObject, DisallowedObject } from "foo"; · ──────────────── ╰──── - help: Remove the import statement. + help: Only "AllowedObject" is allowed to be imported from "foo". ⚠ eslint(no-restricted-imports): 'DisallowedObject' import from 'foo' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:25] 1 │ import { AllowedObject, DisallowedObject } from "foo"; · ──────────────── ╰──── - help: Remove the import statement. - ⚠ eslint(no-restricted-imports): Only "AllowedObject" is allowed to be imported from "foo". + ⚠ eslint(no-restricted-imports): 'DisallowedObject' import from 'foo' is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:25] 1 │ import { AllowedObject, DisallowedObject } from "foo"; · ──────────────── ╰──── - help: Remove the import statement. + help: Only "AllowedObject" is allowed to be imported from "foo". ⚠ eslint(no-restricted-imports): 'foo' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:32] 1 │ import * as AllowedObject from "foo"; · ───── ╰──── - help: Remove the import statement. - ⚠ eslint(no-restricted-imports): Only "AllowedObject" is allowed to be imported from "foo". + ⚠ eslint(no-restricted-imports): 'foo' import is restricted from being used. ╭─[no_restricted_imports.tsx:1:32] 1 │ import * as AllowedObject from "foo"; · ───── ╰──── - help: Remove the import statement. + help: Only "AllowedObject" is allowed to be imported from "foo". ⚠ eslint(no-restricted-imports): 'foo/bar' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:32] 1 │ import * as AllowedObject from "foo/bar"; · ───────── ╰──── - help: Remove the import statement. - ⚠ eslint(no-restricted-imports): Only "AllowedObject" is allowed to be imported from "foo". + ⚠ eslint(no-restricted-imports): 'foo/bar' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:32] 1 │ import * as AllowedObject from "foo/bar"; · ───────── ╰──── - help: Remove the import statement. + help: Only "AllowedObject" is allowed to be imported from "foo". ⚠ eslint(no-restricted-imports): 'foo/bar' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:32] 1 │ import * as AllowedObject from "foo/bar"; · ───────── ╰──── - help: Remove the import statement. - ⚠ eslint(no-restricted-imports): Only import names starting with "Allow" are allowed to be imported from "foo". + ⚠ eslint(no-restricted-imports): 'foo/bar' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:32] 1 │ import * as AllowedObject from "foo/bar"; · ───────── ╰──── - help: Remove the import statement. + help: Only import names starting with "Allow" are allowed to be imported from "foo". - ⚠ eslint(no-restricted-imports): foo is forbidden, use bar instead + ⚠ eslint(no-restricted-imports): 'foo/baz' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:26] 1 │ import withPatterns from "foo/baz"; · ───────── ╰──── - help: Remove the import statement. + help: foo is forbidden, use bar instead - ⚠ eslint(no-restricted-imports): foo is forbidden, use bar instead + ⚠ eslint(no-restricted-imports): 'FOO' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:39] 1 │ import withPatternsCaseSensitive from 'FOO'; · ───── ╰──── - help: Remove the import statement. + help: foo is forbidden, use bar instead ⚠ eslint(no-restricted-imports): '../../my/relative-module' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:21] 1 │ import { Foo } from '../../my/relative-module'; · ────────────────────────── ╰──── - help: Remove the import statement. - ⚠ eslint(no-restricted-imports): foo is forbidden, use bar instead + ⚠ eslint(no-restricted-imports): 'foo' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:1:39] 1 │ import withPatternsCaseSensitive from 'foo'; · ───── ╰──── - help: Remove the import statement. + help: foo is forbidden, use bar instead ⚠ eslint(no-restricted-imports): '@app/api' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:3:43] @@ -870,7 +802,6 @@ snapshot_kind: text · ────────── 4 │ import { Bar_Enum } from '@app/api/bar'; ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): '@app/api/bar' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:4:43] @@ -879,7 +810,6 @@ snapshot_kind: text · ────────────── 5 │ import { Baz_Enum } from '@app/api/baz'; ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): '@app/api/baz' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:5:43] @@ -888,7 +818,6 @@ snapshot_kind: text · ────────────── 6 │ import { B_Enum } from '@app/api/enums/foo'; ╰──── - help: Remove the import statement. ⚠ eslint(no-restricted-imports): '@app/api/enums/foo' import is restricted from being used by a pattern. ╭─[no_restricted_imports.tsx:6:41] @@ -897,4 +826,3 @@ snapshot_kind: text · ──────────────────── 7 │ ╰──── - help: Remove the import statement.