@howells/lint 0.2.5 → 0.2.7

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/README.md CHANGED
@@ -101,7 +101,7 @@ Use this lane when a project wants Oxlint and Oxfmt instead of Biome. React and
101
101
 
102
102
  React Doctor severities are passed through as published by React Doctor. Native Oxlint Next.js severities come from Oxlint's official `nextjs` plugin via Ultracite's Next preset. `@howells/lint` adds canonical Howells policy on top for file naming, barrel files, env access, file size, function size, complexity, and tests.
103
103
 
104
- The core Oxlint preset enables native Oxlint rules that keep code files navigable: `max-lines` errors above 600 non-comment, non-blank lines; `max-lines-per-function` errors above 120 non-comment, non-blank lines; `max-statements` errors above 45 statements per function; and `complexity` errors above cyclomatic complexity 15. Generated files should be ignored at the project level; rare intentional exceptions should use an exact-file override with a short refactor note.
104
+ The core Oxlint preset enables native Oxlint rules that keep code files navigable: `max-lines` errors above 600 non-comment, non-blank lines; `max-lines-per-function` warns above 120 non-comment, non-blank lines; `max-statements` warns above 45 statements per function; and `complexity` warns above cyclomatic complexity 15. React projects promote React Doctor's `react-doctor/no-giant-component` rule to an error, so genuinely oversized components still block CI. Test files keep the file-level `max-lines` guard but disable function-size, statement-count, and complexity limits, because test framework callbacks naturally wrap many independent cases. Generated files should be ignored at the project level; rare intentional exceptions should use an exact-file override with a short refactor note.
105
105
 
106
106
  Choose the closest preset:
107
107
 
package/oxlint/core.mjs CHANGED
@@ -3,10 +3,20 @@ import ultraciteCore from "ultracite/oxlint/core";
3
3
 
4
4
  export default defineConfig({
5
5
  extends: [ultraciteCore],
6
+ overrides: [
7
+ {
8
+ files: ["**/*.test.{js,jsx,ts,tsx}", "**/*.spec.{js,jsx,ts,tsx}"],
9
+ rules: {
10
+ complexity: "off",
11
+ "max-lines-per-function": "off",
12
+ "max-statements": "off",
13
+ },
14
+ },
15
+ ],
6
16
  plugins: [...new Set([...(ultraciteCore.plugins ?? []), "vitest"])],
7
17
  rules: {
8
18
  complexity: [
9
- "error",
19
+ "warn",
10
20
  {
11
21
  max: 15,
12
22
  },
@@ -20,7 +30,7 @@ export default defineConfig({
20
30
  },
21
31
  ],
22
32
  "max-lines-per-function": [
23
- "error",
33
+ "warn",
24
34
  {
25
35
  IIFEs: true,
26
36
  max: 120,
@@ -29,7 +39,7 @@ export default defineConfig({
29
39
  },
30
40
  ],
31
41
  "max-statements": [
32
- "error",
42
+ "warn",
33
43
  {
34
44
  max: 45,
35
45
  },
package/oxlint/react.mjs CHANGED
@@ -8,5 +8,8 @@ export default defineConfig({
8
8
  jsPlugins: [
9
9
  { name: "react-doctor", specifier: "oxlint-plugin-react-doctor" },
10
10
  ],
11
- rules: RECOMMENDED_RULES,
11
+ rules: {
12
+ ...RECOMMENDED_RULES,
13
+ "react-doctor/no-giant-component": "error",
14
+ },
12
15
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@howells/lint",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "Pinned Biome, Oxlint/Oxfmt, Ultracite, and React Doctor presets for Howells projects.",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/howells/lint#readme",