Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
arendjr committed Jul 21, 2023
1 parent ba73304 commit 4b62c7b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ fn get_restricted_import(module_path: &SyntaxTokenText) -> Option<ImportRestrict
return None;
}

let mut path_parts: Vec<&str> = module_path.text().split('/').collect();
let mut path_parts: Vec<_> = module_path.text().split('/').collect();
let mut index_filename = None;

if let Some(extension) = get_extension(&path_parts) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
// Imports within the same module are always allowed.
import { fooPackageVariable } from "./foo.js";

// Imports within the same module are always allowed.
import { fooPackageVariable } from "./foo.js";

// Resources (anything other than JS/TS files) are exempt.
import { barResource } from "../aunt/bar.png";

Expand All @@ -17,3 +14,9 @@ import { subPackageVariable } from "./sub/index.js";

// Library imports are exempt.
import useAsync from "react-use/lib/useAsync";

// Including library imports with an extension.
import map from "lodash/map.js";

// Scoped packages work too.
import netlify from "@astrojs/netlify/functions.js";
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ expression: validPackagePrivateImports.js
// Imports within the same module are always allowed.
import { fooPackageVariable } from "./foo.js";

// Imports within the same module are always allowed.
import { fooPackageVariable } from "./foo.js";

// Resources (anything other than JS/TS files) are exempt.
import { barResource } from "../aunt/bar.png";

Expand All @@ -24,6 +21,12 @@ import { subPackageVariable } from "./sub/index.js";
// Library imports are exempt.
import useAsync from "react-use/lib/useAsync";

// Including library imports with an extension.
import map from "lodash/map.js";

// Scoped packages work too.
import netlify from "@astrojs/netlify/functions.js";

```


0 comments on commit 4b62c7b

Please sign in to comment.