@systemfsoftware/all 1.1.2 → 2.0.0

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,42 @@
1
1
  # @systemfsoftware/all
2
2
 
3
+ ## 2.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 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.
8
+
9
+ 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.
10
+
11
+ ### Minor Changes
12
+
13
+ - `vitest/no-standalone-expect` is no longer enabled by the preset.
14
+
15
+ The rule reports an `expect` outside a `test` or `it` block, and oxlint turns it on by
16
+ default whenever the `vitest` plugin is loaded. A Given/When/Then suite builds its `it`
17
+ blocks at runtime, so the linter reads a step's `expect` as standalone and reports an
18
+ assertion that does run. The preset now sets the rule `off`, and enables it nowhere.
19
+
20
+ A project that wants the rule back names it in its own config; a project that never
21
+ enabled it stops seeing the finding.
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies:
26
+ - @systemfsoftware/oxlint-plugin@4.0.0
27
+
28
+ ## 1.1.3
29
+
30
+ ### Patch Changes
31
+
32
+ - Peer Effect requirement advances to 4.0.0-rc.112. No API changes.
33
+
34
+ - Introduce `@systemfsoftware/omp-typescript-discipline` plugin and rules for TypeScript configuration discipline
35
+
36
+ - Updated dependencies:
37
+ - @systemfsoftware/oxlint-plugin@3.0.0
38
+ - @systemfsoftware/oxlint-plugin-effect-workflow@5.0.0
39
+
3
40
  ## 1.1.2
4
41
 
5
42
  ### 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,14 +1,14 @@
1
1
  {
2
2
  "name": "@systemfsoftware/all",
3
3
  "license": "Apache-2.0",
4
- "version": "1.1.2",
4
+ "version": "2.0.0",
5
5
  "author": "Ryan Lee <drdgvhbh@gmail.com>",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/systemfsoftware/systemfsoftware.git",
9
- "directory": "packages/lint/oxlint/all"
9
+ "directory": "packages/oxlint-plugin/all"
10
10
  },
11
- "homepage": "https://github.com/systemfsoftware/systemfsoftware/tree/main/packages/lint/oxlint/all#readme",
11
+ "homepage": "https://github.com/systemfsoftware/systemfsoftware/tree/main/packages/oxlint-plugin/all#readme",
12
12
  "bugs": "https://github.com/systemfsoftware/systemfsoftware/issues",
13
13
  "description": "Complete oxlint preset for Effect and cell architecture: bundles all custom rule plugins (workflow, schema, entrypoint, cell vocabulary, property testing, test placement, hygiene) with type-aware correctness settings in a single config.",
14
14
  "keywords": [
@@ -27,31 +27,31 @@
27
27
  "dist"
28
28
  ],
29
29
  "dependencies": {
30
- "@systemfsoftware/oxlint-plugin-cell-vocabulary": "^2.0.0",
31
- "@systemfsoftware/oxlint-plugin-effect-dmmf": "^5.2.0",
32
- "@systemfsoftware/oxlint-plugin-effect-entrypoint": "^1.0.7",
33
- "@systemfsoftware/oxlint-plugin-property-testing": "^1.3.3",
34
- "@systemfsoftware/oxlint-plugin-effect-schema": "^5.1.0",
35
- "@systemfsoftware/oxlint-plugin-recommended": "^1.1.4",
36
- "@systemfsoftware/oxlint-plugin": "^2.1.3",
37
- "@systemfsoftware/oxlint-plugin-effect-workflow": "^4.2.0",
38
- "@systemfsoftware/oxlint-plugin-test-placement": "^3.3.0",
39
- "@systemfsoftware/oxlint-plugin-test-hygiene": "^1.1.7"
30
+ "@systemfsoftware/oxlint-plugin": "^4.0.0",
31
+ "@systemfsoftware/oxlint-plugin-effect-schema": "^5.2.0",
32
+ "@systemfsoftware/oxlint-plugin-effect-dmmf": "^5.3.0",
33
+ "@systemfsoftware/oxlint-plugin-cell-vocabulary": "^2.0.1",
34
+ "@systemfsoftware/oxlint-plugin-effect-entrypoint": "^1.0.8",
35
+ "@systemfsoftware/oxlint-plugin-effect-workflow": "^5.0.0",
36
+ "@systemfsoftware/oxlint-plugin-property-testing": "^1.4.0",
37
+ "@systemfsoftware/oxlint-plugin-recommended": "^1.2.0",
38
+ "@systemfsoftware/oxlint-plugin-test-hygiene": "^1.1.8",
39
+ "@systemfsoftware/oxlint-plugin-test-placement": "^3.4.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@systemfsoftware/arethetypeswrong-cli": "^1.1.1",
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.3",
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"