You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .changeset/brave-scripts-dance.md
+1-43Lines changed: 1 addition & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,46 +2,4 @@
2
2
"@biomejs/biome": patch
3
3
---
4
4
5
-
Added the new nursery rule [`useRequiredScripts`](https://biomejs.dev/linter/rules/use-required-scripts/), which enforces the presence of required scripts in `package.json`. This rule is particularly useful in monorepo environments where consistency across workspaces is important.
6
-
7
-
The rule accepts a `requiredScripts` option to specify which scripts must be present:
8
-
9
-
```json
10
-
{
11
-
"linter": {
12
-
"rules": {
13
-
"nursery": {
14
-
"useRequiredScripts": {
15
-
"level": "error",
16
-
"options": {
17
-
"requiredScripts": ["test", "build", "lint"]
18
-
}
19
-
}
20
-
}
21
-
}
22
-
}
23
-
}
24
-
```
25
-
26
-
For example, the following `package.json` triggers the rule when `["test", "build"]` are required:
✖ The required script "build" is missing from package.json.
40
-
41
-
> 1 │ {
42
-
│ ^
43
-
2 │ "scripts": {
44
-
3 │ "test": "vitest"
45
-
46
-
ℹ Add the missing script to your package.json.
47
-
```
5
+
Added the rule [`useRequiredScripts`](https://biomejs.dev/linter/rules/use-required-scripts/), which enforces presence of configurable entries in the `scripts` section of `package.json` files.
0 commit comments