Skip to content

Commit bd215e7

Browse files
committed
fix: oops
1 parent 26e77c6 commit bd215e7

File tree

12 files changed

+9
-232
lines changed

12 files changed

+9
-232
lines changed

crates/biome_json_analyze/src/lint/nursery/no_duplicate_dependencies.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,16 @@ const PACKAGE_JSON: &str = "package.json";
4848

4949
// dependencies <-> devDependencies / optionalDependencies / peerDependencies
5050
// optionalDependencies <-> peerDependencies
51-
const UNIQUE_PROPERTY_KEYS: [(&str, [&str; 3]); 2] = [
51+
const UNIQUE_PROPERTY_KEYS: [(&str, &[&str]); 2] = [
5252
(
5353
"dependencies",
54-
[
54+
&[
5555
"devDependencies",
5656
"optionalDependencies",
5757
"peerDependencies",
5858
],
5959
),
60-
("optionalDependencies", ["peerDependencies", "", ""]),
60+
("optionalDependencies", &["peerDependencies"]),
6161
];
6262

6363
const DUPLICATE_PROPERTY_KEYS: &[&str; 7] = &[
@@ -190,7 +190,7 @@ impl Rule for NoDuplicateDependencies {
190190
continue;
191191
}
192192

193-
let deps = dependencies.get(property);
193+
let deps = dependencies.get(*property);
194194

195195
if deps.is_none() {
196196
continue;
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
source: crates/biome_json_analyze/tests/spec_tests.rs
3-
assertion_line: 82
43
expression: package.json
54
---
65
# Input

crates/biome_json_analyze/tests/specs/nursery/noDuplicateDependencies/invalid/dependencies-devDependencies/package.json.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ expression: package.json
2222
```
2323
package.json:4:5 lint/nursery/noDuplicateDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2424
25-
i The dependency foo is also listed in another dependency group.
25+
i The dependency "foo" is also listed in another dependency group.
2626
2727
2 │ "name": "invalid-dependencies-dev-dependencies",
2828
3 │ "dependencies": {

crates/biome_json_analyze/tests/specs/nursery/noDuplicateDependencies/invalid/dependencies-devDependencies/package.json.snap.new

Lines changed: 0 additions & 45 deletions
This file was deleted.

crates/biome_json_analyze/tests/specs/nursery/noDuplicateDependencies/invalid/dependencies-optionalDependencies/package.json.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ expression: package.json
2222
```
2323
package.json:4:5 lint/nursery/noDuplicateDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2424
25-
i The dependency foo is also listed in another dependency group.
25+
i The dependency "foo" is also listed in another dependency group.
2626
2727
2 │ "name": "invalid-dependencies-optional-dependencies",
2828
3 │ "dependencies": {

crates/biome_json_analyze/tests/specs/nursery/noDuplicateDependencies/invalid/dependencies-optionalDependencies/package.json.snap.new

Lines changed: 0 additions & 45 deletions
This file was deleted.

crates/biome_json_analyze/tests/specs/nursery/noDuplicateDependencies/invalid/dependencies-peerDependencies/package.json.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ expression: package.json
2222
```
2323
package.json:4:5 lint/nursery/noDuplicateDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2424
25-
i The dependency foo is also listed in another dependency group.
25+
i The dependency "foo" is also listed in another dependency group.
2626
2727
2 │ "name": "invalid-dependencies-peer-dependencies",
2828
3 │ "dependencies": {

crates/biome_json_analyze/tests/specs/nursery/noDuplicateDependencies/invalid/dependencies-peerDependencies/package.json.snap.new

Lines changed: 0 additions & 45 deletions
This file was deleted.

crates/biome_json_analyze/tests/specs/nursery/noDuplicateDependencies/invalid/dependencies/package.json.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ expression: package.json
1919
```
2020
package.json:4:5 lint/nursery/noDuplicateDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2121
22-
i The dependency foo is also listed in another dependency group.
22+
i The dependency "foo" is also listed in another dependency group.
2323
2424
2 │ "name": "invalid-dependencies",
2525
3 │ "dependencies": {

crates/biome_json_analyze/tests/specs/nursery/noDuplicateDependencies/invalid/dependencies/package.json.snap.new

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)