@howells/lint 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MIGRATIONS.md +5 -4
- package/README.md +95 -37
- package/bin/howells-lint-strict.mjs +42 -0
- package/bin/howells-workspace-check.mjs +21 -2
- package/bin/run-manypkg-command.mjs +14 -6
- package/bin/workspace-preflight.mjs +134 -0
- package/biome/core.json +40 -25
- package/biome/next.json +36 -7
- package/biome/react.json +36 -7
- package/package.json +6 -4
package/MIGRATIONS.md
CHANGED
|
@@ -19,9 +19,10 @@ If none of these fit cleanly, the likely answer is a new shared preset here, not
|
|
|
19
19
|
## Migration steps
|
|
20
20
|
|
|
21
21
|
1. Add `@howells/lint` as a dev dependency.
|
|
22
|
-
2.
|
|
23
|
-
3. Replace
|
|
24
|
-
4.
|
|
22
|
+
2. Pin Node with `.node-version` set to `22.18.0` and `engines.node` set to `>=22.18.0`.
|
|
23
|
+
3. Replace `eslint`, `next lint`, `prettier`, or direct `biome` scripts with `howells-lint` and `howells-format`.
|
|
24
|
+
4. Replace the project `biome.json` or `biome.jsonc` with a minimal file that only extends one shared preset.
|
|
25
|
+
5. Remove direct `eslint`, `eslint-config-*`, `eslint-plugin-*`, `prettier`, `@biomejs/biome`, and `ultracite` dependencies once the project is green.
|
|
25
26
|
|
|
26
27
|
## Keep local config thin
|
|
27
28
|
|
|
@@ -35,7 +36,7 @@ The normal local config should look like this:
|
|
|
35
36
|
|
|
36
37
|
Acceptable local additions:
|
|
37
38
|
|
|
38
|
-
- repo-specific file includes or force-ignores that
|
|
39
|
+
- repo-specific file includes or force-ignores for generated files that are unique to one project
|
|
39
40
|
- one-off rule changes tied to a genuine platform constraint
|
|
40
41
|
- temporary compatibility shims during migration
|
|
41
42
|
|
package/README.md
CHANGED
|
@@ -10,36 +10,63 @@ The goal is not to invent a second lint philosophy. The goal is to:
|
|
|
10
10
|
- give every consumer the same small preset matrix
|
|
11
11
|
- discourage repo-local overrides unless the project has a genuinely unique constraint
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Agent Setup Checklist
|
|
14
|
+
|
|
15
|
+
When configuring a project, do this in order:
|
|
16
|
+
|
|
17
|
+
1. Require Node 22.18.0+ and pnpm in the root `package.json`, and pin `.node-version` to `22.18.0`.
|
|
18
|
+
2. Install only `@howells/lint` as the direct lint dependency.
|
|
19
|
+
3. Add a `biome.json` that extends the closest presets.
|
|
20
|
+
4. Add read-only `lint`, mutating `lint:fix`, and optional `lint:strict` scripts.
|
|
21
|
+
5. If the project is a monorepo, add root workspace scripts that run `howells-workspace-check`.
|
|
22
|
+
6. Verify with `pnpm lint` and, when configured, `pnpm lint:strict`.
|
|
23
|
+
|
|
24
|
+
## Requirements
|
|
25
|
+
|
|
26
|
+
All projects using this package should declare the runtime and package manager explicitly:
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"packageManager": "pnpm@10.23.0",
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=22.18.0"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Also add a root `.node-version` file:
|
|
38
|
+
|
|
39
|
+
```text
|
|
40
|
+
22.18.0
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Install the shared tooling:
|
|
14
44
|
|
|
15
45
|
```bash
|
|
16
46
|
pnpm add -D @howells/lint
|
|
17
47
|
```
|
|
18
48
|
|
|
19
|
-
|
|
49
|
+
Do not add `@biomejs/biome`, `ultracite`, or `@manypkg/cli` directly unless you are developing this package itself. They are pinned transitively here.
|
|
20
50
|
|
|
21
|
-
|
|
51
|
+
## Biome Presets
|
|
22
52
|
|
|
23
|
-
|
|
24
|
-
- `@howells/lint/biome/react`
|
|
25
|
-
- `@howells/lint/biome/next`
|
|
53
|
+
Choose the closest preset instead of starting from a generic base and patching it locally:
|
|
26
54
|
|
|
27
|
-
|
|
55
|
+
- `@howells/lint/biome/core` for Node or non-React TypeScript packages
|
|
56
|
+
- `@howells/lint/biome/react` for React packages
|
|
57
|
+
- `@howells/lint/biome/next` for Next.js apps
|
|
28
58
|
|
|
29
|
-
|
|
30
|
-
- enable VCS ignore file support
|
|
31
|
-
- ignore common build output directories
|
|
32
|
-
- keep `ignoreUnknown` on so mixed repos do not need defensive local config
|
|
33
|
-
- enforce 2-space indentation consistently
|
|
34
|
-
- enable Tailwind CSS directives on DOM-oriented presets
|
|
59
|
+
These presets already pin Biome and Ultracite, enable VCS ignore file support, ignore common build output directories, keep `ignoreUnknown` on for mixed repos, enforce 2-space indentation, and enable Tailwind CSS directives on DOM-oriented presets.
|
|
35
60
|
|
|
36
|
-
|
|
61
|
+
The shared presets exclude generated and output folders seen across Howells projects: `node_modules`, `.next`, `.turbo`, `.vercel`, `dist`, `build`, `coverage`, `out`, `storybook-static`, `playwright-report`, `test-results`, `.source`, `.cache`, `.expo`, `.output`, `.wrangler`, `.svelte-kit`, `.nuxt`, `.vite`, `.vinxi`, `dev-dist`, `tmp`, and `temp`. Keep repo-local excludes only for genuinely project-specific generated files or data directories.
|
|
37
62
|
|
|
38
63
|
Node or non-React TypeScript package:
|
|
39
64
|
|
|
40
65
|
```json
|
|
41
66
|
{
|
|
42
|
-
"
|
|
67
|
+
"$schema": "https://biomejs.dev/schemas/2.4.14/schema.json",
|
|
68
|
+
"extends": ["@howells/lint/biome/core"],
|
|
69
|
+
"root": true
|
|
43
70
|
}
|
|
44
71
|
```
|
|
45
72
|
|
|
@@ -47,7 +74,9 @@ React package:
|
|
|
47
74
|
|
|
48
75
|
```json
|
|
49
76
|
{
|
|
50
|
-
"
|
|
77
|
+
"$schema": "https://biomejs.dev/schemas/2.4.14/schema.json",
|
|
78
|
+
"extends": ["@howells/lint/biome/core", "@howells/lint/biome/react"],
|
|
79
|
+
"root": true
|
|
51
80
|
}
|
|
52
81
|
```
|
|
53
82
|
|
|
@@ -55,56 +84,83 @@ Next.js app:
|
|
|
55
84
|
|
|
56
85
|
```json
|
|
57
86
|
{
|
|
58
|
-
"
|
|
87
|
+
"$schema": "https://biomejs.dev/schemas/2.4.14/schema.json",
|
|
88
|
+
"extends": [
|
|
89
|
+
"@howells/lint/biome/core",
|
|
90
|
+
"@howells/lint/biome/react",
|
|
91
|
+
"@howells/lint/biome/next"
|
|
92
|
+
],
|
|
93
|
+
"root": true
|
|
59
94
|
}
|
|
60
95
|
```
|
|
61
96
|
|
|
62
|
-
##
|
|
97
|
+
## Package Scripts
|
|
63
98
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
- `howells-biome` proxies to the pinned Biome binary
|
|
67
|
-
- `howells-ultracite` proxies to the pinned Ultracite binary
|
|
68
|
-
- `howells-lint` defaults to `biome check .`
|
|
69
|
-
- `howells-format` defaults to `biome check . --write`
|
|
70
|
-
- `howells-workspace-check` defaults to `manypkg check`
|
|
71
|
-
- `howells-workspace-fix` defaults to `manypkg fix`
|
|
72
|
-
|
|
73
|
-
Example scripts:
|
|
99
|
+
Every package or single-package app should use this shape:
|
|
74
100
|
|
|
75
101
|
```json
|
|
76
102
|
{
|
|
77
103
|
"scripts": {
|
|
78
|
-
"lint": "howells-lint",
|
|
79
|
-
"lint:fix": "howells-format"
|
|
104
|
+
"lint": "howells-lint .",
|
|
105
|
+
"lint:fix": "howells-format .",
|
|
106
|
+
"lint:strict": "howells-lint-strict ."
|
|
80
107
|
}
|
|
81
108
|
}
|
|
82
109
|
```
|
|
83
110
|
|
|
84
|
-
|
|
111
|
+
Keep `lint` non-mutating. Put all `--write` behavior in `lint:fix` or `format` so CI and local checks have the same semantics.
|
|
112
|
+
|
|
113
|
+
Prefer `howells-lint .` over raw `biome check` or long target lists. Use explicit script targets only when the package has a real scope constraint:
|
|
85
114
|
|
|
86
115
|
```json
|
|
87
116
|
{
|
|
88
117
|
"scripts": {
|
|
89
|
-
"lint": "
|
|
90
|
-
"lint:fix": "
|
|
118
|
+
"lint": "howells-lint apps/web packages/ui",
|
|
119
|
+
"lint:fix": "howells-format apps/web packages/ui"
|
|
91
120
|
}
|
|
92
121
|
}
|
|
93
122
|
```
|
|
94
123
|
|
|
95
|
-
|
|
124
|
+
## Monorepo Roots
|
|
125
|
+
|
|
126
|
+
Use workspace checks only at the monorepo root. Do not add `howells-workspace-check` to individual packages, and do not add it to single-package apps.
|
|
96
127
|
|
|
97
|
-
|
|
128
|
+
A monorepo root should have:
|
|
98
129
|
|
|
99
130
|
```json
|
|
100
131
|
{
|
|
132
|
+
"packageManager": "pnpm@10.23.0",
|
|
133
|
+
"engines": {
|
|
134
|
+
"node": ">=22.18.0"
|
|
135
|
+
},
|
|
101
136
|
"scripts": {
|
|
102
|
-
"lint": "
|
|
103
|
-
"lint:fix": "howells-
|
|
137
|
+
"lint": "turbo run lint && howells-workspace-check",
|
|
138
|
+
"lint:fix": "turbo run lint:fix && howells-workspace-fix",
|
|
139
|
+
"lint:strict": "turbo run lint:strict",
|
|
140
|
+
"check": "pnpm lint && pnpm typecheck && pnpm test"
|
|
141
|
+
},
|
|
142
|
+
"devDependencies": {
|
|
143
|
+
"@howells/lint": "^0.1.6"
|
|
104
144
|
}
|
|
105
145
|
}
|
|
106
146
|
```
|
|
107
147
|
|
|
148
|
+
`howells-workspace-check` validates that the root declares `packageManager: "pnpm@..."`, requires Node 22.18.0+ in `engines.node`, pins `.node-version` to `22.18.0`, keeps `pnpm-workspace.yaml` present when workspace package directories exist, and passes `manypkg check`.
|
|
149
|
+
|
|
150
|
+
CI should call `pnpm lint` or `pnpm check` so root workspace checks are not bypassed by a direct `turbo lint` command.
|
|
151
|
+
|
|
152
|
+
## Binaries
|
|
153
|
+
|
|
154
|
+
Installers only need `@howells/lint` as a direct dependency. Use these package binaries:
|
|
155
|
+
|
|
156
|
+
- `howells-biome` proxies to the pinned Biome binary
|
|
157
|
+
- `howells-ultracite` proxies to the pinned Ultracite binary
|
|
158
|
+
- `howells-lint` defaults to `biome check .`
|
|
159
|
+
- `howells-lint-strict` runs high-signal Biome security, correctness, and suspicious lint rules
|
|
160
|
+
- `howells-format` defaults to `biome check . --write`
|
|
161
|
+
- `howells-workspace-check` validates root workspace hygiene, then runs `manypkg check`
|
|
162
|
+
- `howells-workspace-fix` runs `manypkg fix`
|
|
163
|
+
|
|
108
164
|
## Rules
|
|
109
165
|
|
|
110
166
|
- Do not add local overrides just to preserve old ESLint behavior.
|
|
@@ -112,6 +168,8 @@ Prefer explicit script targets over config churn when the only difference is sco
|
|
|
112
168
|
- If multiple repos need the same exception, add or adjust a preset here.
|
|
113
169
|
- If a repo needs framework-specific linting, choose the matching preset instead of layering rules manually.
|
|
114
170
|
- Prefer inline `biome-ignore` comments for truly isolated exceptions over broad config overrides.
|
|
171
|
+
- Keep package `lint` scripts read-only; use `lint:fix` for formatting and safe writes.
|
|
172
|
+
- Prefer `howells-lint .` over raw `biome check` or long target lists unless a package has a real scope constraint.
|
|
115
173
|
|
|
116
174
|
## Claude Code Hooks
|
|
117
175
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { runPackageBin } from "./run-package-bin.mjs";
|
|
4
|
+
|
|
5
|
+
const args = process.argv.slice(2);
|
|
6
|
+
const passthroughOptions = new Set(["--help", "-h", "--version", "-V"]);
|
|
7
|
+
const targets =
|
|
8
|
+
args.length === 0 || args[0].startsWith("-") ? [".", ...args] : args;
|
|
9
|
+
|
|
10
|
+
const strictRuleOptions = [
|
|
11
|
+
"--only=security",
|
|
12
|
+
"--skip=security/noSecrets",
|
|
13
|
+
"--only=correctness/noConstAssign",
|
|
14
|
+
"--only=correctness/noUnreachable",
|
|
15
|
+
"--only=correctness/noInvalidConstructorSuper",
|
|
16
|
+
"--only=correctness/noSetterReturn",
|
|
17
|
+
"--only=correctness/noUnsafeFinally",
|
|
18
|
+
"--only=correctness/noUnsafeOptionalChaining",
|
|
19
|
+
"--only=correctness/noGlobalObjectCalls",
|
|
20
|
+
"--only=correctness/noSelfAssign",
|
|
21
|
+
"--only=correctness/noSwitchDeclarations",
|
|
22
|
+
"--only=suspicious/noDebugger",
|
|
23
|
+
"--only=suspicious/noDoubleEquals",
|
|
24
|
+
"--only=suspicious/noExplicitAny",
|
|
25
|
+
"--only=suspicious/noCatchAssign",
|
|
26
|
+
"--only=suspicious/noFunctionAssign",
|
|
27
|
+
"--only=suspicious/noGlobalAssign",
|
|
28
|
+
"--only=suspicious/noRedeclare",
|
|
29
|
+
"--only=suspicious/noSparseArray",
|
|
30
|
+
"--only=suspicious/noVar",
|
|
31
|
+
"--only=suspicious/noDuplicateCase",
|
|
32
|
+
"--only=suspicious/noDuplicateObjectKeys",
|
|
33
|
+
"--only=suspicious/noDuplicateParameters",
|
|
34
|
+
"--only=suspicious/noFallthroughSwitchClause",
|
|
35
|
+
"--only=suspicious/noFocusedTests",
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
const resolvedArgs = passthroughOptions.has(args[0])
|
|
39
|
+
? args
|
|
40
|
+
: ["lint", ...strictRuleOptions, ...targets];
|
|
41
|
+
|
|
42
|
+
runPackageBin("@biomejs/biome", "biome", resolvedArgs);
|
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { handleManypkgMetadataCommand } from "./run-manypkg-command.mjs";
|
|
4
|
+
import { runPackageBin } from "./run-package-bin.mjs";
|
|
5
|
+
import { runWorkspacePreflight } from "./workspace-preflight.mjs";
|
|
4
6
|
|
|
5
7
|
const args = process.argv.slice(2);
|
|
6
|
-
|
|
8
|
+
|
|
9
|
+
if (handleManypkgMetadataCommand("check", args)) {
|
|
10
|
+
process.exit(0);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const errors = runWorkspacePreflight();
|
|
14
|
+
|
|
15
|
+
if (errors.length > 0) {
|
|
16
|
+
console.error("Workspace hygiene check failed:");
|
|
17
|
+
|
|
18
|
+
for (const error of errors) {
|
|
19
|
+
console.error(`- ${error}`);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
runPackageBin("@manypkg/cli", "manypkg", ["check", ...args]);
|
|
@@ -7,24 +7,32 @@ const require = createRequire(import.meta.url);
|
|
|
7
7
|
const helpOptions = new Set(["--help", "-h"]);
|
|
8
8
|
const versionOptions = new Set(["--version", "-V"]);
|
|
9
9
|
|
|
10
|
-
function
|
|
10
|
+
export function printManypkgCommandHelp(command) {
|
|
11
11
|
console.log(`Usage: howells-workspace-${command} [options]\n`);
|
|
12
12
|
console.log(`Runs: manypkg ${command} [options]`);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
function
|
|
15
|
+
export function printManypkgCliVersion() {
|
|
16
16
|
const { version } = require("@manypkg/cli/package.json");
|
|
17
17
|
console.log(version);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
export function
|
|
20
|
+
export function handleManypkgMetadataCommand(command, args) {
|
|
21
21
|
if (helpOptions.has(args[0])) {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
printManypkgCommandHelp(command);
|
|
23
|
+
return true;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
if (versionOptions.has(args[0])) {
|
|
27
|
-
|
|
27
|
+
printManypkgCliVersion();
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function runManypkgCommand(command, args) {
|
|
35
|
+
if (handleManypkgMetadataCommand(command, args)) {
|
|
28
36
|
process.exit(0);
|
|
29
37
|
}
|
|
30
38
|
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
|
|
4
|
+
const workspaceDirs = ["apps", "packages", "services", "workers", "examples"];
|
|
5
|
+
const requiredNodeVersion = "22.18.0";
|
|
6
|
+
|
|
7
|
+
function readRootPackageJson() {
|
|
8
|
+
const packageJsonPath = join(process.cwd(), "package.json");
|
|
9
|
+
|
|
10
|
+
if (!existsSync(packageJsonPath)) {
|
|
11
|
+
return {
|
|
12
|
+
errors: ["root package.json is missing"],
|
|
13
|
+
packageJson: undefined,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
try {
|
|
18
|
+
return {
|
|
19
|
+
errors: [],
|
|
20
|
+
packageJson: JSON.parse(readFileSync(packageJsonPath, "utf8")),
|
|
21
|
+
};
|
|
22
|
+
} catch (error) {
|
|
23
|
+
return {
|
|
24
|
+
errors: [`root package.json could not be parsed: ${error.message}`],
|
|
25
|
+
packageJson: undefined,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function hasWorkspaceChildren(directory) {
|
|
31
|
+
const directoryPath = join(process.cwd(), directory);
|
|
32
|
+
|
|
33
|
+
if (!existsSync(directoryPath)) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return readdirSync(directoryPath, { withFileTypes: true }).some((entry) => {
|
|
38
|
+
return (
|
|
39
|
+
entry.isDirectory() &&
|
|
40
|
+
existsSync(join(directoryPath, entry.name, "package.json"))
|
|
41
|
+
);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function hasLikelyWorkspaceLayout(packageJson) {
|
|
46
|
+
return (
|
|
47
|
+
Boolean(packageJson?.workspaces) || workspaceDirs.some(hasWorkspaceChildren)
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function isAtLeastRequiredNodeVersion(major, minor, patch = 0) {
|
|
52
|
+
if (major > 22) {
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (major < 22) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (minor > 18) {
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (minor < 18) {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return patch >= 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function isNode2218Engine(range) {
|
|
72
|
+
if (typeof range !== "string") {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const normalizedRange = range.replaceAll(/\s+/g, "");
|
|
77
|
+
const match = normalizedRange.match(
|
|
78
|
+
/^(?:>=|\^|~)?(?<major>\d+)(?:\.(?<minor>\d+))?(?:\.(?<patch>\d+))?$/,
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
if (!match?.groups?.major || !match.groups.minor) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return isAtLeastRequiredNodeVersion(
|
|
86
|
+
Number(match.groups.major),
|
|
87
|
+
Number(match.groups.minor),
|
|
88
|
+
Number(match.groups.patch ?? 0),
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function readNodeVersionFile() {
|
|
93
|
+
const nodeVersionPath = join(process.cwd(), ".node-version");
|
|
94
|
+
|
|
95
|
+
if (!existsSync(nodeVersionPath)) {
|
|
96
|
+
return undefined;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return readFileSync(nodeVersionPath, "utf8").trim();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function runWorkspacePreflight() {
|
|
103
|
+
const { errors, packageJson } = readRootPackageJson();
|
|
104
|
+
|
|
105
|
+
if (!packageJson) {
|
|
106
|
+
return errors;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (typeof packageJson.packageManager !== "string") {
|
|
110
|
+
errors.push("root package.json must declare packageManager");
|
|
111
|
+
} else if (!packageJson.packageManager.startsWith("pnpm@")) {
|
|
112
|
+
errors.push("root package.json packageManager must use pnpm");
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (!isNode2218Engine(packageJson.engines?.node)) {
|
|
116
|
+
errors.push(
|
|
117
|
+
`root package.json engines.node must require Node ${requiredNodeVersion}+`,
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const nodeVersion = readNodeVersionFile();
|
|
122
|
+
if (nodeVersion !== requiredNodeVersion) {
|
|
123
|
+
errors.push(`root .node-version must be ${requiredNodeVersion}`);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (
|
|
127
|
+
hasLikelyWorkspaceLayout(packageJson) &&
|
|
128
|
+
!existsSync(join(process.cwd(), "pnpm-workspace.yaml"))
|
|
129
|
+
) {
|
|
130
|
+
errors.push("pnpm-workspace.yaml is required for workspace projects");
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return errors;
|
|
134
|
+
}
|
package/biome/core.json
CHANGED
|
@@ -1,27 +1,42 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/2.4.14/schema.json",
|
|
3
|
+
"extends": ["ultracite/biome/core"],
|
|
4
|
+
"formatter": {
|
|
5
|
+
"indentStyle": "space",
|
|
6
|
+
"indentWidth": 2
|
|
7
|
+
},
|
|
8
|
+
"files": {
|
|
9
|
+
"ignoreUnknown": true,
|
|
10
|
+
"includes": [
|
|
11
|
+
"**",
|
|
12
|
+
"!**/node_modules/**",
|
|
13
|
+
"!**/.next/**",
|
|
14
|
+
"!**/.turbo/**",
|
|
15
|
+
"!**/.vercel/**",
|
|
16
|
+
"!**/dist/**",
|
|
17
|
+
"!**/build/**",
|
|
18
|
+
"!**/coverage/**",
|
|
19
|
+
"!**/out/**",
|
|
20
|
+
"!**/storybook-static/**",
|
|
21
|
+
"!**/playwright-report/**",
|
|
22
|
+
"!**/test-results/**",
|
|
23
|
+
"!**/.source/**",
|
|
24
|
+
"!**/.cache/**",
|
|
25
|
+
"!**/.expo/**",
|
|
26
|
+
"!**/.output/**",
|
|
27
|
+
"!**/.wrangler/**",
|
|
28
|
+
"!**/.svelte-kit/**",
|
|
29
|
+
"!**/.nuxt/**",
|
|
30
|
+
"!**/.vite/**",
|
|
31
|
+
"!**/.vinxi/**",
|
|
32
|
+
"!**/dev-dist/**",
|
|
33
|
+
"!**/tmp/**",
|
|
34
|
+
"!**/temp/**"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"vcs": {
|
|
38
|
+
"enabled": true,
|
|
39
|
+
"clientKind": "git",
|
|
40
|
+
"useIgnoreFile": true
|
|
41
|
+
}
|
|
27
42
|
}
|
package/biome/next.json
CHANGED
|
@@ -1,9 +1,38 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/2.4.14/schema.json",
|
|
3
|
+
"extends": ["./react.json", "ultracite/biome/next"],
|
|
4
|
+
"files": {
|
|
5
|
+
"ignoreUnknown": true,
|
|
6
|
+
"includes": [
|
|
7
|
+
"**",
|
|
8
|
+
"!**/node_modules/**",
|
|
9
|
+
"!**/.next/**",
|
|
10
|
+
"!**/.turbo/**",
|
|
11
|
+
"!**/.vercel/**",
|
|
12
|
+
"!**/dist/**",
|
|
13
|
+
"!**/build/**",
|
|
14
|
+
"!**/coverage/**",
|
|
15
|
+
"!**/out/**",
|
|
16
|
+
"!**/storybook-static/**",
|
|
17
|
+
"!**/playwright-report/**",
|
|
18
|
+
"!**/test-results/**",
|
|
19
|
+
"!**/.source/**",
|
|
20
|
+
"!**/.cache/**",
|
|
21
|
+
"!**/.expo/**",
|
|
22
|
+
"!**/.output/**",
|
|
23
|
+
"!**/.wrangler/**",
|
|
24
|
+
"!**/.svelte-kit/**",
|
|
25
|
+
"!**/.nuxt/**",
|
|
26
|
+
"!**/.vite/**",
|
|
27
|
+
"!**/.vinxi/**",
|
|
28
|
+
"!**/dev-dist/**",
|
|
29
|
+
"!**/tmp/**",
|
|
30
|
+
"!**/temp/**"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"css": {
|
|
34
|
+
"parser": {
|
|
35
|
+
"tailwindDirectives": true
|
|
36
|
+
}
|
|
37
|
+
}
|
|
9
38
|
}
|
package/biome/react.json
CHANGED
|
@@ -1,9 +1,38 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/2.4.14/schema.json",
|
|
3
|
+
"extends": ["./core.json", "ultracite/biome/react"],
|
|
4
|
+
"files": {
|
|
5
|
+
"ignoreUnknown": true,
|
|
6
|
+
"includes": [
|
|
7
|
+
"**",
|
|
8
|
+
"!**/node_modules/**",
|
|
9
|
+
"!**/.next/**",
|
|
10
|
+
"!**/.turbo/**",
|
|
11
|
+
"!**/.vercel/**",
|
|
12
|
+
"!**/dist/**",
|
|
13
|
+
"!**/build/**",
|
|
14
|
+
"!**/coverage/**",
|
|
15
|
+
"!**/out/**",
|
|
16
|
+
"!**/storybook-static/**",
|
|
17
|
+
"!**/playwright-report/**",
|
|
18
|
+
"!**/test-results/**",
|
|
19
|
+
"!**/.source/**",
|
|
20
|
+
"!**/.cache/**",
|
|
21
|
+
"!**/.expo/**",
|
|
22
|
+
"!**/.output/**",
|
|
23
|
+
"!**/.wrangler/**",
|
|
24
|
+
"!**/.svelte-kit/**",
|
|
25
|
+
"!**/.nuxt/**",
|
|
26
|
+
"!**/.vite/**",
|
|
27
|
+
"!**/.vinxi/**",
|
|
28
|
+
"!**/dev-dist/**",
|
|
29
|
+
"!**/tmp/**",
|
|
30
|
+
"!**/temp/**"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"css": {
|
|
34
|
+
"parser": {
|
|
35
|
+
"tailwindDirectives": true
|
|
36
|
+
}
|
|
37
|
+
}
|
|
9
38
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@howells/lint",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Pinned Biome and Ultracite presets for Howells projects.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
+
"packageManager": "pnpm@10.23.0",
|
|
6
7
|
"engines": {
|
|
7
|
-
"node": ">=
|
|
8
|
+
"node": ">=22.18.0"
|
|
8
9
|
},
|
|
9
10
|
"files": [
|
|
10
11
|
"biome/*.json",
|
|
@@ -15,15 +16,16 @@
|
|
|
15
16
|
"bin": {
|
|
16
17
|
"howells-biome": "bin/howells-biome.mjs",
|
|
17
18
|
"howells-lint": "bin/howells-lint.mjs",
|
|
19
|
+
"howells-lint-strict": "bin/howells-lint-strict.mjs",
|
|
18
20
|
"howells-format": "bin/howells-format.mjs",
|
|
19
21
|
"howells-ultracite": "bin/howells-ultracite.mjs",
|
|
20
22
|
"howells-workspace-check": "bin/howells-workspace-check.mjs",
|
|
21
23
|
"howells-workspace-fix": "bin/howells-workspace-fix.mjs"
|
|
22
24
|
},
|
|
23
25
|
"dependencies": {
|
|
24
|
-
"@biomejs/biome": "2.4.
|
|
26
|
+
"@biomejs/biome": "2.4.14",
|
|
25
27
|
"@manypkg/cli": "^0.25.1",
|
|
26
|
-
"ultracite": "7.6.
|
|
28
|
+
"ultracite": "7.6.2"
|
|
27
29
|
},
|
|
28
30
|
"exports": {
|
|
29
31
|
"./package.json": "./package.json",
|