@whiteeclipse/toolchain 0.1.0-alpha.1 → 0.1.0-alpha.3

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
@@ -5,12 +5,11 @@ standard_revision: 1
5
5
 
6
6
  # @whiteeclipse/toolchain
7
7
 
8
- Shared ESLint and Prettier configurations for White Eclipse's JavaScript and TypeScript workspaces. This README covers `0.1.0-alpha.1`, an exploratory alpha package.
8
+ Shared ESLint and Prettier configurations for White Eclipse's JavaScript and TypeScript workspaces. This README covers `0.1.0-alpha.3`, an exploratory alpha package for [RFC 0003](https://github.com/whiteeclipse-studio/hypatia/blob/feature/website/docs/internal/rfcs/0003-engineering-conventions.md).
9
9
 
10
10
  ## Setup
11
11
 
12
- Install the exploratory release with `bun add --dev @whiteeclipse/toolchain@0.1.0-alpha.1`; the registry tag is `alpha`.
13
- The workspace instructions below apply when developing this repository.
12
+ Install the exploratory release with `bun add --dev @whiteeclipse/toolchain@0.1.0-alpha.3`. The registry tag is `alpha`. The workspace instructions below apply when developing this repository.
14
13
 
15
14
  Add the package to a consuming workspace's development dependencies, then run `bun install`:
16
15
 
@@ -25,7 +24,7 @@ Add the package to a consuming workspace's development dependencies, then run `b
25
24
  Install compatible peers according to [package.json](./package.json):
26
25
 
27
26
  | Peer | Supported versions |
28
- | ---------- | ------------------ |
27
+ |------------|--------------------|
29
28
  | ESLint | `10.13.0` |
30
29
  | Prettier | `3.9.10` |
31
30
  | TypeScript | `6.0.3` |
@@ -53,10 +52,7 @@ export { default } from "@whiteeclipse/toolchain/prettier";
53
52
 
54
53
  ## Running checks
55
54
 
56
- With dependencies installed, run `bun run lint` from the repository root to check all packages and applications, or from
57
- an individual workspace to check only that workspace. The toolchain workspace imports its own source configuration
58
- directly. Consuming workspaces may load the built entrypoint, so rebuild the toolchain after changing shared rules.
59
- Passing `--conditions=development` to `bun run` does not propagate that condition to the ESLint subprocess.
55
+ With dependencies installed, run `bun run lint` from the repository root to check all packages and applications, or from an individual workspace to check only that workspace. The toolchain workspace imports its own source configuration directly. Consuming workspaces may load the built entrypoint, so rebuild the toolchain after changing shared rules. Passing `--conditions=development` to `bun run` does not propagate that condition to the ESLint subprocess.
60
56
 
61
57
  To load shared rules from source, invoke ESLint directly from the repository root:
62
58
 
@@ -78,22 +74,11 @@ Use ESLint's `--fix` or Prettier's `--write` to apply available fixes, then revi
78
74
  The package exposes two default exports; it has no package-root export:
79
75
 
80
76
  - **`@whiteeclipse/toolchain/eslint`:** a flat configuration array combining JavaScript correctness, type-aware TypeScript, import boundaries, promise handling, JSDoc, readability, and JSX checks.
81
- - **`@whiteeclipse/toolchain/prettier`:** a configuration object using 120-column lines, four-space indentation, double
82
- quotes, semicolons, trailing commas, and LF endings. It includes `prettier-plugin-packagejson` for package-file
83
- formatting and `prettier-plugin-tailwindcss` for automatic utility-class ordering. The Tailwind plugin loads last.
84
-
85
- Typed linting uses TypeScript's project service, so checked TypeScript files need an appropriate `tsconfig.json`. Import
86
- resolution supports Bun and checks `tsconfig.json` in the current directory as well as projects at
87
- `apps/*/tsconfig.json` and `packages/*/*/tsconfig.json`. Repository workspace configurations set `tsconfigRootDir` to
88
- their own directory, and their TypeScript projects include the ESLint configuration and relevant scripts.
89
-
90
- JSDoc is required on interfaces, standalone functions, and class methods. PascalCase function declarations and assigned
91
- functions with an explicit `ReactElement` or `React.ReactElement` return annotation may omit JSDoc; a union with `null`
92
- is also supported. Inferred returns, type aliases, hooks, and other return types do not receive this exception. These
93
- components may also use summary-only JSDoc without `@param` or `@returns`. Other checks, including supplied tag names
94
- and parameter names, still apply. Object-literal methods and function-valued
95
- properties do not require duplicate comments; document their contracts on the corresponding types. Any JSDoc supplied on
96
- an implementation is still checked.
77
+ - **`@whiteeclipse/toolchain/prettier`:** a configuration object using 120-column lines, four-space indentation, double quotes, semicolons, trailing commas, and LF endings. It includes `prettier-plugin-packagejson` for package-file formatting and `prettier-plugin-tailwindcss` for automatic utility-class ordering. The Tailwind plugin loads last. Markdown paragraphs stay on one source line so the renderer can wrap them to fit the page.
78
+
79
+ Typed linting uses TypeScript's project service, so checked TypeScript files need an appropriate `tsconfig.json`. Import resolution supports Bun and checks `tsconfig.json` in the current directory as well as projects at `apps/*/tsconfig.json` and `packages/*/*/tsconfig.json`. Repository workspace configurations set `tsconfigRootDir` to their own directory, and their TypeScript projects include the ESLint configuration and relevant scripts.
80
+
81
+ JSDoc is required on interfaces, standalone functions, and class methods. PascalCase function declarations and assigned functions with an explicit `ReactElement` or `React.ReactElement` return annotation may omit JSDoc; a union with `null` is also supported. Inferred returns, type aliases, hooks, and other return types do not receive this exception. These components may also use summary-only JSDoc without `@param` or `@returns`. Other checks, including supplied tag names and parameter names, still apply. Object-literal methods and function-valued properties do not require duplicate comments; document their contracts on the corresponding types. Any JSDoc supplied on an implementation is still checked.
97
82
 
98
83
  JavaScript files, configuration files, and scripts receive Node globals. Source files under `src` and Storybook files receive browser globals; overlapping patterns can receive both. Test files relax selected function-name, numeric-literal, and named-capture rules while retaining other checks.
99
84
 
@@ -125,13 +110,9 @@ export default { ...config, printWidth: 100 };
125
110
 
126
111
  ### Tailwind class formatting
127
112
 
128
- Use the shared Prettier configuration to sort utility classes consistently. Tailwind recommends its official plugin
129
- in [Automatic Class Sorting with Prettier](https://tailwindcss.com/blog/automatic-class-sorting-with-prettier). Sorting
130
- groups related utilities and state variants; it does not shorten long class lists or automatically split them into
131
- logical groups.
113
+ Use the shared Prettier configuration to sort utility classes consistently. Tailwind recommends its official plugin in [Automatic Class Sorting with Prettier](https://tailwindcss.com/blog/automatic-class-sorting-with-prettier). Sorting groups related utilities and state variants; it does not shorten long class lists or automatically split them into logical groups.
132
114
 
133
- For Tailwind CSS v4, consuming workspaces must configure `tailwindStylesheet` with the CSS entrypoint, relative to their
134
- Prettier configuration file:
115
+ For Tailwind CSS v4, consuming workspaces must configure `tailwindStylesheet` with the CSS entrypoint, relative to their Prettier configuration file:
135
116
 
136
117
  ```js
137
118
  import config from "@whiteeclipse/toolchain/prettier";
@@ -142,10 +123,9 @@ export default {
142
123
  };
143
124
  ```
144
125
 
145
- Hypatia's root configuration supplies separate stylesheet overrides for Website and Storybook. See the
146
- plugin's [stylesheet configuration](https://github.com/tailwindlabs/prettier-plugin-tailwindcss#specifying-your-tailwind-stylesheet-path-tailwind-css-v4)
147
- and [plugin-order requirement](https://github.com/tailwindlabs/prettier-plugin-tailwindcss#compatibility-with-other-prettier-plugins)
148
- when extending this setup.
126
+ Hypatia's root configuration supplies separate stylesheet overrides for Website and Storybook. See the plugin's [stylesheet configuration](https://github.com/tailwindlabs/prettier-plugin-tailwindcss#specifying-your-tailwind-stylesheet-path-tailwind-css-v4) and [plugin-order requirement](https://github.com/tailwindlabs/prettier-plugin-tailwindcss#compatibility-with-other-prettier-plugins) when extending this setup.
127
+
128
+ When adding file-specific overrides, include `...(config.overrides ?? [])` at the start of the `overrides` array to retain the shared Markdown setting.
149
129
 
150
130
  ## Troubleshooting
151
131
 
@@ -167,7 +147,7 @@ Released under the [MIT License](https://whiteeclipse.dev/LICENCE).
167
147
  ## Revisions
168
148
 
169
149
  | Revision | Date | Author | Description |
170
- | -------- | ---------- | ------------- | ------------------------------------------------------------------ |
150
+ |----------|------------|---------------|--------------------------------------------------------------------|
171
151
  | 1 | 2026-10-25 | Akane SHIMOKA | Adds the package README. |
172
152
  | 2 | 2026-10-26 | Akane SHIMOKA | Consolidate documentation |
173
153
  | 3 | 2026-10-27 | Codex | Add built JavaScript, declaration, and development exports |
@@ -175,3 +155,4 @@ Released under the [MIT License](https://whiteeclipse.dev/LICENCE).
175
155
  | 5 | 2026-10-30 | Akane SHIMOKA | Clarify object-literal JSDoc exemptions and shared rule loading |
176
156
  | 6 | 2026-11-04 | Akane SHIMOKA | Add Tailwind class sorting and the React component JSDoc exception |
177
157
  | 7 | 2026-11-04 | Akane SHIMOKA | Document alpha registry installation and release packaging |
158
+ | 8 | 2026-11-19 | Akane SHIMOKA | Document single-line Markdown paragraphs in alpha.3 |
@@ -69,6 +69,17 @@ export default defineConfig({
69
69
  "no-useless-constructor": "error",
70
70
  "no-useless-escape": "error",
71
71
  "no-useless-return": "error",
72
+ "no-unused-vars": [
73
+ "error",
74
+ {
75
+ args: "all",
76
+ argsIgnorePattern: "^_",
77
+ varsIgnorePattern: "^_",
78
+ caughtErrors: "all",
79
+ caughtErrorsIgnorePattern: "^_",
80
+ destructuredArrayIgnorePattern: "^_",
81
+ },
82
+ ],
72
83
  "no-var": "error",
73
84
  "no-void": ["error", { allowAsStatement: true }],
74
85
  "no-warning-comments": ["error", { terms: ["FIXME"], location: "anywhere" }],
@@ -49,6 +49,15 @@ export default defineConfig({
49
49
  "@typescript-eslint/strict-boolean-expressions": ["error", { allowString: false, allowNumber: false }],
50
50
  "@typescript-eslint/restrict-template-expressions": ["error", { allowNumber: true }],
51
51
  "@typescript-eslint/no-unused-expressions": ["error", { allowTaggedTemplates: true }],
52
+ "no-unused-vars": ["off"],
53
+ "@typescript-eslint/no-unused-vars": ["error", {
54
+ args: "all",
55
+ argsIgnorePattern: "^_",
56
+ varsIgnorePattern: "^_",
57
+ caughtErrors: "all",
58
+ caughtErrorsIgnorePattern: "^_",
59
+ destructuredArrayIgnorePattern: "^_",
60
+ }],
52
61
  "@typescript-eslint/no-dynamic-delete": "off",
53
62
  },
54
63
  }, {
package/dist/prettier.js CHANGED
@@ -18,6 +18,12 @@ const config = {
18
18
  bracketSameLine: false,
19
19
  arrowParens: "avoid",
20
20
  endOfLine: "lf",
21
+ overrides: [
22
+ {
23
+ files: "*.md",
24
+ options: { proseWrap: "never" },
25
+ },
26
+ ],
21
27
  plugins: [
22
28
  require.resolve("prettier-plugin-packagejson"),
23
29
  // Tailwind's plugin must be last to preserve compatibility with other plugins.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whiteeclipse/toolchain",
3
- "version": "0.1.0-alpha.1",
3
+ "version": "0.1.0-alpha.3",
4
4
  "description": "Shared ESLint and Prettier configuration of White Eclipse.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,16 +21,11 @@
21
21
  "default": "./dist/prettier.js"
22
22
  }
23
23
  },
24
- "files": [
25
- "dist",
26
- "README.md",
27
- "LICENCE"
28
- ],
29
24
  "scripts": {
30
- "build": "bun ../../../scripts/build-package.ts",
25
+ "build": "rm -rf dist && tsc -p tsconfig.json",
31
26
  "lint": "bun --conditions=development run --bun eslint .",
32
27
  "prepack": "bun run build",
33
- "typecheck": "tsc -p tsconfig.json"
28
+ "typecheck": "tsc -p tsconfig.json --noEmit"
34
29
  },
35
30
  "dependencies": {
36
31
  "@eslint/js": "10.0.1",