@systemfsoftware/all 1.1.3 → 2.0.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # @systemfsoftware/all
2
2
 
3
+ ## 2.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Releases the workspace so its published versions track the shared dependency graph this change moves.
8
+
9
+ - The `@systemfsoftware/source` export condition is gone. It resolved to a package's TypeScript sources for editors and in-repo typechecks; each package now exports only its built entry. If your tsconfig sets `customConditions: ["@systemfsoftware/source"]`, or a bundler config names that condition, remove it — resolution falls back to the built entry, which is what every consumer already got.
10
+
11
+ ## 2.0.0
12
+
13
+ ### Major Changes
14
+
15
+ - The preset enforces a cyclomatic-complexity ceiling. Every function in a package's source directory is limited to a complexity of 2, and every function in a workflow file to 1; test files are not limited.
16
+
17
+ A project that already has branching beyond those values will see new errors on its next lint run. The measured ceiling uses the modified complexity variant, in which one `switch` costs a single point regardless of how many `case` clauses it has.
18
+
19
+ ### Minor Changes
20
+
21
+ - `vitest/no-standalone-expect` is no longer enabled by the preset.
22
+
23
+ The rule reports an `expect` outside a `test` or `it` block, and oxlint turns it on by
24
+ default whenever the `vitest` plugin is loaded. A Given/When/Then suite builds its `it`
25
+ blocks at runtime, so the linter reads a step's `expect` as standalone and reports an
26
+ assertion that does run. The preset now sets the rule `off`, and enables it nowhere.
27
+
28
+ A project that wants the rule back names it in its own config; a project that never
29
+ enabled it stops seeing the finding.
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies:
34
+ - @systemfsoftware/oxlint-plugin@4.0.0
35
+
3
36
  ## 1.1.3
4
37
 
5
38
  ### Patch Changes
package/README.md CHANGED
@@ -48,6 +48,7 @@ The preset registers and enables four custom plugin suites alongside stock oxlin
48
48
  ### Stock Namespaces & Defaults
49
49
 
50
50
  - **`categories`**: `correctness: 'error'`
51
+ - **Cyclomatic complexity**: `complexity` at `error` — `max 2` for `**/src/**`, `max 1` for `**/src/**/*.workflow.ts`, off for test files. Uses the `modified` variant (one `switch` costs a point, not one per `case`).
51
52
  - **Registered namespaces**: `oxc`, `typescript`, `import`, `unicorn`, `vitest`, `jsdoc`, `node`, `promise`
52
53
  - **Default ignore patterns**: `dist/**`, `build/**`, `coverage/**`, `**/*.d.ts`, `.turbo/**`, `.stryker-tmp/**`
53
54
 
package/dist/index.d.ts CHANGED
@@ -29,18 +29,6 @@ declare const rules: NonNullable<OxlintConfig['rules']>;
29
29
  * @public
30
30
  */
31
31
  declare const ignorePatterns: readonly string[];
32
- /**
33
- * The complete preset as one `extends`-consumable oxlint config, and this package's
34
- * default export: `export default all` in an `oxlint.config.ts` delivers the
35
- * plugins, type awareness, the correctness category, the stock defect and
36
- * test-hygiene tiers, and every recommended cell rule at `error`.
37
- *
38
- * Type awareness is on, so a consumer needs a `tsconfig.json` that includes the
39
- * files being linted; half of these rules produce no diagnostics without it and
40
- * say nothing about being inert.
41
- *
42
- * @public
43
- */
44
32
  declare const all: OxlintConfig;
45
33
  //#endregion
46
34
  export { all as default, ignorePatterns, plugins, rules };
package/dist/index.mjs CHANGED
@@ -85,32 +85,49 @@ const ignorePatterns = [
85
85
  "**/*.d.ts",
86
86
  "**/*.tsbuildinfo"
87
87
  ];
88
- /**
89
- * The complete preset as one `extends`-consumable oxlint config, and this package's
90
- * default export: `export default all` in an `oxlint.config.ts` delivers the
91
- * plugins, type awareness, the correctness category, the stock defect and
92
- * test-hygiene tiers, and every recommended cell rule at `error`.
93
- *
94
- * Type awareness is on, so a consumer needs a `tsconfig.json` that includes the
95
- * files being linted; half of these rules produce no diagnostics without it and
96
- * say nothing about being inert.
97
- *
98
- * @public
99
- */
88
+ const complexityOverrides = [
89
+ {
90
+ files: ["**/src/**"],
91
+ rules: { complexity: ["error", {
92
+ max: 2,
93
+ variant: "modified"
94
+ }] }
95
+ },
96
+ {
97
+ files: ["**/src/**/*.workflow.ts"],
98
+ rules: { complexity: ["error", {
99
+ max: 1,
100
+ variant: "modified"
101
+ }] }
102
+ },
103
+ {
104
+ files: [...[
105
+ "**/*.test.ts",
106
+ "**/*.spec.ts",
107
+ "**/__tests__/**",
108
+ "**/tests/**"
109
+ ]],
110
+ rules: { complexity: "off" }
111
+ }
112
+ ];
100
113
  const all = {
101
114
  plugins: [...plugins],
102
115
  jsPlugins: [...jsPlugins],
103
116
  options: { ...options },
104
117
  categories: { correctness: "error" },
105
118
  rules: { ...rules },
106
- overrides: [...overrides, {
107
- files: [
108
- "**/__fixtures__/**",
109
- "**/fixtures/**",
110
- "**/testResources/**"
111
- ],
112
- rules: { "no-restricted-imports": "off" }
113
- }]
119
+ overrides: [
120
+ ...overrides,
121
+ ...complexityOverrides,
122
+ {
123
+ files: [
124
+ "**/__fixtures__/**",
125
+ "**/fixtures/**",
126
+ "**/testResources/**"
127
+ ],
128
+ rules: { "no-restricted-imports": "off" }
129
+ }
130
+ ]
114
131
  };
115
132
  //#endregion
116
133
  export { all as default, ignorePatterns, plugins, rules };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@systemfsoftware/all",
3
3
  "license": "Apache-2.0",
4
- "version": "1.1.3",
4
+ "version": "2.0.1",
5
5
  "author": "Ryan Lee <drdgvhbh@gmail.com>",
6
6
  "repository": {
7
7
  "type": "git",
@@ -27,31 +27,31 @@
27
27
  "dist"
28
28
  ],
29
29
  "dependencies": {
30
- "@systemfsoftware/oxlint-plugin": "^3.0.0",
31
- "@systemfsoftware/oxlint-plugin-effect-dmmf": "^5.3.0",
32
- "@systemfsoftware/oxlint-plugin-effect-entrypoint": "^1.0.8",
33
- "@systemfsoftware/oxlint-plugin-cell-vocabulary": "^2.0.1",
34
- "@systemfsoftware/oxlint-plugin-effect-workflow": "^5.0.0",
35
- "@systemfsoftware/oxlint-plugin-effect-schema": "^5.2.0",
36
- "@systemfsoftware/oxlint-plugin-property-testing": "^1.4.0",
37
- "@systemfsoftware/oxlint-plugin-recommended": "^1.1.5",
38
- "@systemfsoftware/oxlint-plugin-test-placement": "^3.4.0",
39
- "@systemfsoftware/oxlint-plugin-test-hygiene": "^1.1.8"
30
+ "@systemfsoftware/oxlint-plugin": "^4.0.1",
31
+ "@systemfsoftware/oxlint-plugin-cell-vocabulary": "^2.0.3",
32
+ "@systemfsoftware/oxlint-plugin-effect-dmmf": "^5.4.1",
33
+ "@systemfsoftware/oxlint-plugin-effect-entrypoint": "^1.0.9",
34
+ "@systemfsoftware/oxlint-plugin-effect-schema": "^5.3.1",
35
+ "@systemfsoftware/oxlint-plugin-effect-workflow": "^5.0.1",
36
+ "@systemfsoftware/oxlint-plugin-recommended": "^1.3.0",
37
+ "@systemfsoftware/oxlint-plugin-property-testing": "^1.5.1",
38
+ "@systemfsoftware/oxlint-plugin-test-placement": "^3.4.1",
39
+ "@systemfsoftware/oxlint-plugin-test-hygiene": "^1.1.9"
40
40
  },
41
41
  "devDependencies": {
42
- "@systemfsoftware/arethetypeswrong-cli": "^1.1.1",
42
+ "@systemfsoftware/arethetypeswrong-cli": "^4.1.0",
43
43
  "@types/node": "^24",
44
- "effect": "^4.0.0-rc.112",
44
+ "effect": "4.0.0-rc.112",
45
45
  "oxlint": "^1.77.0",
46
46
  "oxlint-tsgolint": "7.0.2001",
47
47
  "rimraf": "^6.1.3",
48
48
  "tsdown": "^0.22.14",
49
49
  "typescript": "^7",
50
- "@systemfsoftware/oxlint-config": "^0.1.0",
51
- "@systemfsoftware/tsconfig": "^1.3.3"
50
+ "@systemfsoftware/tsconfig": "^1.3.4",
51
+ "@systemfsoftware/oxlint-config": "^0.1.0"
52
52
  },
53
53
  "peerDependencies": {
54
- "effect": "^4.0.0-rc.112",
54
+ "effect": "4.0.0-rc.112",
55
55
  "oxlint": "^1.77.0",
56
56
  "oxlint-tsgolint": "7.0.2001",
57
57
  "typescript": ">=5.0.0"