@venizia/dev-configs 0.3.5 → 0.4.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/LICENSE.md CHANGED
@@ -36,7 +36,7 @@ This monorepo contains the following packages, all licensed under MIT:
36
36
  | `@venizia/ignis-boot` | Application bootstrapping & artifact auto-discovery |
37
37
  | `@venizia/ignis-helpers` | Utility helpers - logging, cron, Redis, queues, storage |
38
38
  | `@venizia/ignis-inversion` | Dependency Injection & IoC container |
39
- | `@venizia/dev-configs` | Shared ESLint, Prettier, TypeScript configurations |
39
+ | `@venizia/dev-configs` | Shared oxlint, ESLint, TypeScript configurations |
40
40
  | `@venizia/ignis-docs` | Documentation and MCP Server |
41
41
 
42
42
  ---
package/README.md CHANGED
@@ -1,18 +1,18 @@
1
1
  # @venizia/dev-configs
2
2
 
3
- The oxlint, oxfmt, ESLint, Prettier and TypeScript settings every IGNIS package is built with. Install
3
+ The oxlint, ESLint and TypeScript settings every IGNIS package is built with. Install
4
4
  it as a dev dependency in an application that wants the same rules.
5
5
 
6
6
  ## Install
7
7
 
8
8
  ```bash
9
- bun add -d @venizia/dev-configs oxlint oxlint-tsgolint oxfmt eslint typescript
9
+ bun add -d @venizia/dev-configs oxlint oxlint-tsgolint eslint typescript
10
10
  ```
11
11
 
12
- `oxlint` (>=1.88.0), `oxlint-tsgolint` (>=7.0.2004), `oxfmt` (>=0.73.0), `eslint` (9 or 10),
13
- `prettier` (3) and `typescript` (5 or 6) are optional peers. Install only the tools you use. Keep the
12
+ `oxlint` (>=1.88.0), `oxlint-tsgolint` (>=7.0.2004), `eslint` (9 or 10),
13
+ `typescript` (5 or 6) are optional peers. Install only the tools you use. Formatting is `bun fmt` (Bun 1.4.4 or newer), set in `bunfig.toml`: see [Formatting](#formatting). Keep the
14
14
  ESLint config `.mjs`: a TypeScript one (`.mts`) makes ESLint require `jiti`, one more dependency. A
15
- project that still runs ESLint and Prettier installs `eslint prettier` and skips the oxc tools.
15
+ project that only wants the full ESLint preset installs `eslint` and skips the oxc tools.
16
16
 
17
17
  ## Use it
18
18
 
@@ -26,14 +26,6 @@ import { oxlintConfigs } from '@venizia/dev-configs/linters/oxlint';
26
26
  export default defineConfig(oxlintConfigs);
27
27
  ```
28
28
 
29
- ```typescript
30
- // .configs/formatters/oxfmt.config.mts
31
- import { defineConfig } from 'oxfmt';
32
- import { oxfmtConfigs } from '@venizia/dev-configs/formatters';
33
-
34
- export default defineConfig(oxfmtConfigs);
35
- ```
36
-
37
29
  ```typescript
38
30
  // .configs/lints/eslint.config.mjs - what oxlint cannot run: naming convention + house rules
39
31
  import { houseConfigs } from '@venizia/dev-configs/linters';
@@ -44,7 +36,7 @@ export default houseConfigs;
44
36
  ```bash
45
37
  oxlint -c .configs/lints/oxlint.config.mts --deny-warnings
46
38
  eslint -c .configs/lints/eslint.config.mjs .
47
- oxfmt -c .configs/formatters/oxfmt.config.mts --check "**/*.{ts,tsx,mts,js,mjs}"
39
+ bun fmt --check "**/*.{ts,tsx,mts,js,mjs}"
48
40
  ```
49
41
 
50
42
  `tsconfig.json` stays at the project root. Bun, the editor and oxlint's type-aware engine only find it
@@ -75,7 +67,6 @@ browser version. A React project swaps it for the React version, which builds on
75
67
  | Tool | Backend | Browser | React |
76
68
  | :--- | :--- | :--- | :--- |
77
69
  | oxlint | `oxlintConfigs` | `BrowserOxlintConfigs.create()` | `ReactOxlintConfigs.create()` |
78
- | oxfmt | `oxfmtConfigs` | `browserOxfmtConfigs` | `browserOxfmtConfigs` |
79
70
  | ESLint | `houseConfigs` | `houseConfigs` | `reactHouseConfigs` |
80
71
  | tsconfig | `tsconfig.common.json` | `tsconfig.browser.json` | `tsconfig.react.json` |
81
72
 
@@ -113,7 +104,6 @@ Every IGNIS package and example does.
113
104
  | :--- | :--- |
114
105
  | `@venizia/dev-configs` | Everything below, re-exported |
115
106
  | `@venizia/dev-configs/compilers` | `BunCompiler` |
116
- | `@venizia/dev-configs/formatters` | `oxfmtConfigs`, `browserOxfmtConfigs`, `prettierConfigs` |
117
107
  | `@venizia/dev-configs/testing` | `rejectionOf`, `expectRejection` - test helpers for a promise that must reject (imports `bun:test`; tests only) |
118
108
  | `@venizia/dev-configs/linters` | `oxlintConfigs`, `OxlintConfigs`, `BrowserOxlintConfigs`, `ReactOxlintConfigs`, `LintIgnore`, `namingConventionConfigs`, `reactNamingConventionConfigs`, `houseConfigs`, `reactHouseConfigs`, `eslintConfigs`, `ReactEslintConfigs`, the rule classes and their types |
119
109
  | `@venizia/dev-configs/linters/oxlint` | `oxlintConfigs`, `OxlintConfigs`, `IOxlintPresetOptions`, `BrowserOxlintConfigs`, `ReactOxlintConfigs`, `LintIgnore`, the rule classes and their types: everything an oxlint config needs, and nothing that loads ESLint. Loads in milliseconds: `/linters` also loads ESLint and its plugins, which an oxlint config never uses |
@@ -231,33 +221,25 @@ export default defineConfig({
231
221
  });
232
222
  ```
233
223
 
234
- ### oxfmtConfigs and prettierConfigs
224
+ ### Formatting
235
225
 
236
- `oxfmtConfigs` (type `OxfmtConfig`) and `prettierConfigs` hold the same seven options, so the output
237
- matches. oxfmt differs from Prettier on long union types, which it breaks with a leading `|` per line.
226
+ There is no formatter preset to import: `bun fmt` reads the `[fmt]` table of `bunfig.toml` in the folder it runs in or any parent, so one table at the repository root serves every package. The same table serves backend, browser and React code.
238
227
 
239
- | Setting | Value |
240
- | :--- | :--- |
241
- | `printWidth` | `100` |
242
- | `tabWidth` | `2` |
243
- | `singleQuote` | `true` |
244
- | `semi` | `true` |
245
- | `trailingComma` | `'all'` |
246
- | `bracketSpacing` | `true` |
247
- | `arrowParens` | `'avoid'` |
248
-
249
- `browserOxfmtConfigs` is `oxfmtConfigs` with two changes for browser and React code:
228
+ ```toml
229
+ [fmt]
230
+ printWidth = 100
231
+ singleQuote = true
232
+ arrowParens = "avoid"
233
+ flavor = "oxfmt"
234
+ ```
250
235
 
251
- | Setting | Value | Effect |
252
- | :--- | :--- | :--- |
253
- | `arrowParens` | `'always'` | `(x) => x` instead of `x => x` |
254
- | `bracketSameLine` | `true` | The closing `>` of a multi-line JSX element stays on its last attribute line, which keeps JSX diffs small |
236
+ `flavor = "oxfmt"` keeps the output IGNIS was formatted with; without it Bun formats in its default flavor, which puts the first member of a long union type on its own `|` line. Bun's defaults supply the rest: `tabWidth` 2, `trailingComma` `"all"`, `semi`, `bracketSpacing`. `devz lint` runs `bun fmt --no-script` and passes each pattern of `.configs/formatters/.ignore` as `--ignore-pattern`.
255
237
 
256
238
  ### eslintConfigs
257
239
 
258
240
  `eslintConfigs` keeps its shape and resolves to the same rules as before, but is now owned here instead
259
- of wrapping `@minimaltech/eslint-node`: ESLint recommended, typescript-eslint, Prettier as a lint
260
- rule, naming conventions, `curly`, `eslint-plugin-n`, plus these IGNIS rules:
241
+ of wrapping `@minimaltech/eslint-node`: ESLint recommended, typescript-eslint, naming
242
+ conventions, `curly`, `eslint-plugin-n`, plus these IGNIS rules:
261
243
 
262
244
  | Rule | Setting |
263
245
  | :--- | :--- |
@@ -4,9 +4,10 @@ export interface ILintStep {
4
4
  args: string[];
5
5
  }
6
6
  /**
7
- * `devz lint [--fix] [files]`: oxlint, then ESLint, then oxfmt, from the project's
8
- * `.configs/lints/` and `.configs/formatters/`. With no file it checks the whole project; with
9
- * files it handles only those, as a pre-commit hook passes them.
7
+ * `devz lint [--fix] [files]`: oxlint, then ESLint, then `bun fmt`, from the project's
8
+ * `.configs/lints/` and `.configs/formatters/.ignore`. `bun fmt` takes its options from the `[fmt]` table
9
+ * of the nearest `bunfig.toml`. With no file it checks the whole project; with files it handles only
10
+ * those, as a pre-commit hook passes them.
10
11
  */
11
12
  export declare class LintCommand {
12
13
  /**
@@ -18,7 +19,10 @@ export declare class LintCommand {
18
19
  root: string;
19
20
  file: string;
20
21
  }): string[];
21
- /** The tool calls for these arguments, in order; empty when a file list holds nothing to lint. */
22
+ /**
23
+ * The tool calls for these arguments, in order; empty when a file list holds nothing to lint or
24
+ * format. oxlint and ESLint take the code files; `bun fmt` takes those and the other formatted types.
25
+ */
22
26
  static plan(opts: {
23
27
  root: string;
24
28
  args: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../src/cli/lint.ts"],"names":[],"mappings":"AAaA,iFAAiF;AACjF,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED;;;;GAIG;AACH,qBAAa,WAAW;IACtB;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,EAAE;IAYjE,kGAAkG;IAClG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,SAAS,EAAE;IA0DhE,iGAAiG;IACjG,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM;IAgBhE,4FAA4F;WAC/E,GAAG,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC;CAgB1E"}
1
+ {"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../src/cli/lint.ts"],"names":[],"mappings":"AAuBA,iFAAiF;AACjF,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED;;;;;GAKG;AACH,qBAAa,WAAW;IACtB;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,EAAE;IAYjE;;;OAGG;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,SAAS,EAAE;IA8DhE,iGAAiG;IACjG,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM;IAgBhE,4FAA4F;WAC/E,GAAG,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC;CAgB1E"}
package/dist/cli/lint.js CHANGED
@@ -5,17 +5,28 @@ const node_fs_1 = require("node:fs");
5
5
  const node_path_1 = require("node:path");
6
6
  const LINT_CONFIG = '.configs/lints/oxlint.config.mts';
7
7
  const ESLINT_CONFIG = '.configs/lints/eslint.config.mjs';
8
- const FORMAT_CONFIG = '.configs/formatters/oxfmt.config.mts';
9
8
  const LINT_IGNORE_FILE = '.configs/lints/.ignore';
10
9
  const FORMAT_IGNORE_FILE = '.configs/formatters/.ignore';
11
10
  const ESLINT_CACHE = ['--cache', '--cache-location', 'node_modules/.cache/eslint/'];
12
11
  const LINTED_EXTENSIONS = new Set(['.ts', '.tsx', '.mts', '.js', '.mjs']);
13
- const FORMAT_GLOB = '**/*.{ts,tsx,mts,js,mjs}';
12
+ /** What `bun fmt` formats: the code, JSON (package.json keys are sorted), YAML, CSS, HTML and Vue - not Markdown. */
13
+ const FORMATTED_EXTENSIONS = new Set([
14
+ ...LINTED_EXTENSIONS,
15
+ '.json',
16
+ '.jsonc',
17
+ '.yml',
18
+ '.yaml',
19
+ '.css',
20
+ '.html',
21
+ '.vue',
22
+ ]);
23
+ const FORMAT_GLOB = '**/*.{ts,mts,tsx,js,mjs,json,jsonc,yml,yaml,css,html,vue}';
14
24
  const FIX_FLAG = '--fix';
15
25
  /**
16
- * `devz lint [--fix] [files]`: oxlint, then ESLint, then oxfmt, from the project's
17
- * `.configs/lints/` and `.configs/formatters/`. With no file it checks the whole project; with
18
- * files it handles only those, as a pre-commit hook passes them.
26
+ * `devz lint [--fix] [files]`: oxlint, then ESLint, then `bun fmt`, from the project's
27
+ * `.configs/lints/` and `.configs/formatters/.ignore`. `bun fmt` takes its options from the `[fmt]` table
28
+ * of the nearest `bunfig.toml`. With no file it checks the whole project; with files it handles only
29
+ * those, as a pre-commit hook passes them.
19
30
  */
20
31
  class LintCommand {
21
32
  /**
@@ -33,21 +44,28 @@ class LintCommand {
33
44
  .map(line => line.trim())
34
45
  .filter(line => line !== '' && !line.startsWith('#'));
35
46
  }
36
- /** The tool calls for these arguments, in order; empty when a file list holds nothing to lint. */
47
+ /**
48
+ * The tool calls for these arguments, in order; empty when a file list holds nothing to lint or
49
+ * format. oxlint and ESLint take the code files; `bun fmt` takes those and the other formatted types.
50
+ */
37
51
  static plan(opts) {
38
52
  const fix = opts.args[0] === FIX_FLAG;
39
53
  const paths = fix ? opts.args.slice(1) : opts.args;
40
54
  const whole = paths.length === 0;
41
55
  const files = paths.filter(path => LINTED_EXTENSIONS.has((0, node_path_1.extname)(path)));
42
- if (!whole && files.length === 0) {
56
+ const formatted = paths.filter(path => FORMATTED_EXTENSIONS.has((0, node_path_1.extname)(path)));
57
+ if (!whole && formatted.length === 0) {
43
58
  return [];
44
59
  }
45
60
  const targets = whole ? ['.'] : files;
46
61
  const lintIgnore = LintCommand.readIgnore({ root: opts.root, file: LINT_IGNORE_FILE }).flatMap(pattern => ['--ignore-pattern', pattern]);
47
- const formatIgnore = LintCommand.readIgnore({ root: opts.root, file: FORMAT_IGNORE_FILE }).map(pattern => `!${pattern}`);
62
+ const formatIgnore = LintCommand.readIgnore({
63
+ root: opts.root,
64
+ file: FORMAT_IGNORE_FILE,
65
+ }).flatMap(pattern => ['--ignore-pattern', pattern]);
48
66
  const unmatched = whole ? [] : ['--no-error-on-unmatched-pattern'];
49
67
  const eslintQuiet = whole ? [] : ['--no-warn-ignored'];
50
- return [
68
+ const linters = [
51
69
  {
52
70
  tool: 'oxlint',
53
71
  args: [
@@ -71,18 +89,19 @@ class LintCommand {
71
89
  ...targets,
72
90
  ],
73
91
  },
74
- {
75
- tool: 'oxfmt',
76
- args: [
77
- '-c',
78
- FORMAT_CONFIG,
79
- ...unmatched,
80
- ...(fix ? [] : ['--check']),
81
- ...(whole ? [FORMAT_GLOB] : files),
82
- ...formatIgnore,
83
- ],
84
- },
85
92
  ];
93
+ const formatter = {
94
+ tool: 'bun',
95
+ args: [
96
+ 'fmt',
97
+ '--no-script',
98
+ ...unmatched,
99
+ ...formatIgnore,
100
+ ...(fix ? [] : ['--check']),
101
+ ...(whole ? [FORMAT_GLOB] : formatted),
102
+ ],
103
+ };
104
+ return whole || files.length > 0 ? [...linters, formatter] : [formatter];
86
105
  }
87
106
  /** The tool's binary in the nearest `node_modules/.bin`, else its bare name for PATH to find. */
88
107
  static resolveTool(opts) {
@@ -1 +1 @@
1
- {"version":3,"file":"lint.js","sourceRoot":"","sources":["../../src/cli/lint.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AACnD,yCAAmD;AAEnD,MAAM,WAAW,GAAG,kCAAkC,CAAC;AACvD,MAAM,aAAa,GAAG,kCAAkC,CAAC;AACzD,MAAM,aAAa,GAAG,sCAAsC,CAAC;AAC7D,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAClD,MAAM,kBAAkB,GAAG,6BAA6B,CAAC;AACzD,MAAM,YAAY,GAAG,CAAC,SAAS,EAAE,kBAAkB,EAAE,6BAA6B,CAAC,CAAC;AACpF,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAC1E,MAAM,WAAW,GAAG,0BAA0B,CAAC;AAC/C,MAAM,QAAQ,GAAG,OAAO,CAAC;A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AAK,CAAC,MAAM,CAAC;YAEpC,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;gBACnB,OAAO,QAAQ,CAAC;YAClB,CAAC;QACH,CAAC;QAED,OAAO,CAAC,CAAC;IACX,CAAC;CACF;AA/GD,kCA+GC","sourcesContent":["import { existsSync, readFileSync } from 'node:fs';\nimport { dirname, extname, join } from 'node:path';\n\nconst LINT_CONFIG = '.configs/lints/oxlint.config.mts';\nconst ESLINT_CONFIG = '.configs/lints/eslint.config.mjs';\nconst FORMAT_CONFIG = '.configs/formatters/oxfmt.config.mts';\nconst LINT_IGNORE_FILE = '.configs/lints/.ignore';\nconst FORMAT_IGNORE_FILE = '.configs/formatters/.ignore';\nconst ESLINT_CACHE = ['--cache', '--cache-location', 'node_modules/.cache/eslint/'];\nconst LINTED_EXTENSIONS = new Set(['.ts', '.tsx', '.mts', '.js', '.mjs']);\nconst FORMAT_GLOB = '**/*.{ts,tsx,mts,js,mjs}';\nconst FIX_FLAG = '--fix';\n\n/** One tool call: the tool name and its arguments, run from the project root. */\nexport interface ILintStep {\n tool: string;\n args: string[];\n}\n\n/**\n * `devz lint [--fix] [files]`: oxlint, then ESLint, then oxfmt, from the project's\n * `.configs/lints/` and `.configs/formatters/`. With no file it checks the whole project; with\n * files it handles only those, as a pre-commit hook passes them.\n */\nexport class LintCommand {\n /**\n * The patterns of an ignore file, one per line, `#` comments and blank lines skipped. An ignore\n * file resolves its patterns from its own folder, so they go on the command line instead, which\n * resolves from the project root.\n */\n static readIgnore(opts: { root: string; file: string }): string[] {\n const path = join(opts.root, opts.file);\n if (!existsSync(path)) {\n return [];\n }\n\n return readFileSync(path, 'utf8')\n .split('\\n')\n .map(line => line.trim())\n .filter(line => line !== '' && !line.startsWith('#'));\n }\n\n /** The tool calls for these arguments, in order; empty when a file list holds nothing to lint. */\n static plan(opts: { root: string; args: string[] }): ILintStep[] {\n const fix = opts.args[0] === FIX_FLAG;\n const paths = fix ? opts.args.slice(1) : opts.args;\n const whole = paths.length === 0;\n const files = paths.filter(path => LINTED_EXTENSIONS.has(extname(path)));\n\n if (!whole && files.length === 0) {\n return [];\n }\n\n const targets = whole ? ['.'] : files;\n const lintIgnore = LintCommand.readIgnore({ root: opts.root, file: LINT_IGNORE_FILE }).flatMap(\n pattern => ['--ignore-pattern', pattern],\n );\n const formatIgnore = LintCommand.readIgnore({ root: opts.root, file: FORMAT_IGNORE_FILE }).map(\n pattern => `!${pattern}`,\n );\n const unmatched = whole ? [] : ['--no-error-on-unmatched-pattern'];\n const eslintQuiet = whole ? [] : ['--no-warn-ignored'];\n\n return [\n {\n tool: 'oxlint',\n args: [\n '-c',\n LINT_CONFIG,\n ...lintIgnore,\n ...unmatched,\n fix ? FIX_FLAG : '--deny-warnings',\n ...targets,\n ],\n },\n {\n tool: 'eslint',\n args: [\n '-c',\n ESLINT_CONFIG,\n ...ESLINT_CACHE,\n ...eslintQuiet,\n ...lintIgnore,\n ...(fix ? [FIX_FLAG] : []),\n ...targets,\n ],\n },\n {\n tool: 'oxfmt',\n args: [\n '-c',\n FORMAT_CONFIG,\n ...unmatched,\n ...(fix ? [] : ['--check']),\n ...(whole ? [FORMAT_GLOB] : files),\n ...formatIgnore,\n ],\n },\n ];\n }\n\n /** The tool's binary in the nearest `node_modules/.bin`, else its bare name for PATH to find. */\n static resolveTool(opts: { root: string; tool: string }): string {\n let dir = opts.root;\n while (true) {\n const candidate = join(dir, 'node_modules', '.bin', opts.tool);\n if (existsSync(candidate)) {\n return candidate;\n }\n\n const parent = dirname(dir);\n if (parent === dir) {\n return opts.tool;\n }\n dir = parent;\n }\n }\n\n /** Runs the plan in order and stops at the first tool that fails; returns the exit code. */\n static async run(opts: { root: string; args: string[] }): Promise<number> {\n for (const step of LintCommand.plan(opts)) {\n const child = Bun.spawn({\n cmd: [LintCommand.resolveTool({ root: opts.root, tool: step.tool }), ...step.args],\n cwd: opts.root,\n stdio: ['inherit', 'inherit', 'inherit'],\n });\n const exitCode = await child.exited;\n\n if (exitCode !== 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,CAAC,CAAC;IACX,CAAC;CACF;AAtHD,kCAsHC","sourcesContent":["import { existsSync, readFileSync } from 'node:fs';\nimport { dirname, extname, join } from 'node:path';\n\nconst LINT_CONFIG = '.configs/lints/oxlint.config.mts';\nconst ESLINT_CONFIG = '.configs/lints/eslint.config.mjs';\nconst LINT_IGNORE_FILE = '.configs/lints/.ignore';\nconst FORMAT_IGNORE_FILE = '.configs/formatters/.ignore';\nconst ESLINT_CACHE = ['--cache', '--cache-location', 'node_modules/.cache/eslint/'];\nconst LINTED_EXTENSIONS = new Set(['.ts', '.tsx', '.mts', '.js', '.mjs']);\n/** What `bun fmt` formats: the code, JSON (package.json keys are sorted), YAML, CSS, HTML and Vue - not Markdown. */\nconst FORMATTED_EXTENSIONS = new Set([\n ...LINTED_EXTENSIONS,\n '.json',\n '.jsonc',\n '.yml',\n '.yaml',\n '.css',\n '.html',\n '.vue',\n]);\nconst FORMAT_GLOB = '**/*.{ts,mts,tsx,js,mjs,json,jsonc,yml,yaml,css,html,vue}';\nconst FIX_FLAG = '--fix';\n\n/** One tool call: the tool name and its arguments, run from the project root. */\nexport interface ILintStep {\n tool: string;\n args: string[];\n}\n\n/**\n * `devz lint [--fix] [files]`: oxlint, then ESLint, then `bun fmt`, from the project's\n * `.configs/lints/` and `.configs/formatters/.ignore`. `bun fmt` takes its options from the `[fmt]` table\n * of the nearest `bunfig.toml`. With no file it checks the whole project; with files it handles only\n * those, as a pre-commit hook passes them.\n */\nexport class LintCommand {\n /**\n * The patterns of an ignore file, one per line, `#` comments and blank lines skipped. An ignore\n * file resolves its patterns from its own folder, so they go on the command line instead, which\n * resolves from the project root.\n */\n static readIgnore(opts: { root: string; file: string }): string[] {\n const path = join(opts.root, opts.file);\n if (!existsSync(path)) {\n return [];\n }\n\n return readFileSync(path, 'utf8')\n .split('\\n')\n .map(line => line.trim())\n .filter(line => line !== '' && !line.startsWith('#'));\n }\n\n /**\n * The tool calls for these arguments, in order; empty when a file list holds nothing to lint or\n * format. oxlint and ESLint take the code files; `bun fmt` takes those and the other formatted types.\n */\n static plan(opts: { root: string; args: string[] }): ILintStep[] {\n const fix = opts.args[0] === FIX_FLAG;\n const paths = fix ? opts.args.slice(1) : opts.args;\n const whole = paths.length === 0;\n const files = paths.filter(path => LINTED_EXTENSIONS.has(extname(path)));\n const formatted = paths.filter(path => FORMATTED_EXTENSIONS.has(extname(path)));\n\n if (!whole && formatted.length === 0) {\n return [];\n }\n\n const targets = whole ? ['.'] : files;\n const lintIgnore = LintCommand.readIgnore({ root: opts.root, file: LINT_IGNORE_FILE }).flatMap(\n pattern => ['--ignore-pattern', pattern],\n );\n const formatIgnore = LintCommand.readIgnore({\n root: opts.root,\n file: FORMAT_IGNORE_FILE,\n }).flatMap(pattern => ['--ignore-pattern', pattern]);\n const unmatched = whole ? [] : ['--no-error-on-unmatched-pattern'];\n const eslintQuiet = whole ? [] : ['--no-warn-ignored'];\n\n const linters: ILintStep[] = [\n {\n tool: 'oxlint',\n args: [\n '-c',\n LINT_CONFIG,\n ...lintIgnore,\n ...unmatched,\n fix ? FIX_FLAG : '--deny-warnings',\n ...targets,\n ],\n },\n {\n tool: 'eslint',\n args: [\n '-c',\n ESLINT_CONFIG,\n ...ESLINT_CACHE,\n ...eslintQuiet,\n ...lintIgnore,\n ...(fix ? [FIX_FLAG] : []),\n ...targets,\n ],\n },\n ];\n const formatter: ILintStep = {\n tool: 'bun',\n args: [\n 'fmt',\n '--no-script',\n ...unmatched,\n ...formatIgnore,\n ...(fix ? [] : ['--check']),\n ...(whole ? [FORMAT_GLOB] : formatted),\n ],\n };\n\n return whole || files.length > 0 ? [...linters, formatter] : [formatter];\n }\n\n /** The tool's binary in the nearest `node_modules/.bin`, else its bare name for PATH to find. */\n static resolveTool(opts: { root: string; tool: string }): string {\n let dir = opts.root;\n while (true) {\n const candidate = join(dir, 'node_modules', '.bin', opts.tool);\n if (existsSync(candidate)) {\n return candidate;\n }\n\n const parent = dirname(dir);\n if (parent === dir) {\n return opts.tool;\n }\n dir = parent;\n }\n }\n\n /** Runs the plan in order and stops at the first tool that fails; returns the exit code. */\n static async run(opts: { root: string; args: string[] }): Promise<number> {\n for (const step of LintCommand.plan(opts)) {\n const child = Bun.spawn({\n cmd: [LintCommand.resolveTool({ root: opts.root, tool: step.tool }), ...step.args],\n cwd: opts.root,\n stdio: ['inherit', 'inherit', 'inherit'],\n });\n const exitCode = await child.exited;\n\n if (exitCode !== 0) {\n return exitCode;\n }\n }\n\n return 0;\n }\n}\n"]}
@@ -14,6 +14,8 @@ export declare class BunCompiler {
14
14
  plugins?: Bun.BunPlugin[];
15
15
  /** Compile-time constants: each key is replaced by its value, a JSON-encoded expression, wherever the bundle reads it. */
16
16
  define?: Record<string, string>;
17
+ /** Type-check the bundle first; a type error stops the compile. */
18
+ check?: boolean;
17
19
  }): Promise<void>;
18
20
  }
19
21
  //# sourceMappingURL=bun.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bun.d.ts","sourceRoot":"","sources":["../../src/compilers/bun.ts"],"names":[],"mappings":"AAIA,gHAAgH;AAChH,qBAAa,WAAW;IACtB;;;;OAIG;WACU,OAAO,CAClB,IAAI,GAAE;QACJ,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,6GAA6G;QAC7G,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC;QAC1B,0HAA0H;QAC1H,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KAC5B,GACL,OAAO,CAAC,IAAI,CAAC;CAoCjB"}
1
+ {"version":3,"file":"bun.d.ts","sourceRoot":"","sources":["../../src/compilers/bun.ts"],"names":[],"mappings":"AAIA,gHAAgH;AAChH,qBAAa,WAAW;IACtB;;;;OAIG;WACU,OAAO,CAClB,IAAI,GAAE;QACJ,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,6GAA6G;QAC7G,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC;QAC1B,0HAA0H;QAC1H,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAChC,mEAAmE;QACnE,KAAK,CAAC,EAAE,OAAO,CAAC;KACZ,GACL,OAAO,CAAC,IAAI,CAAC;CAsCjB"}
@@ -12,7 +12,7 @@ class BunCompiler {
12
12
  * `platformaticKafkaPlugins()` from `helpers`, which would invert that chain.
13
13
  */
14
14
  static async compile(opts = {}) {
15
- const { entrypoint = DEFAULT_ENTRYPOINT, workers = [], outfile = DEFAULT_OUTFILE, target = Bun.env.BUN_TARGET ?? DEFAULT_COMPILE_TARGET, plugins = [], define = {}, } = opts;
15
+ const { entrypoint = DEFAULT_ENTRYPOINT, workers = [], outfile = DEFAULT_OUTFILE, target = Bun.env.BUN_TARGET ?? DEFAULT_COMPILE_TARGET, plugins = [], define = {}, check = false, } = opts;
16
16
  const built = await Bun.build({
17
17
  entrypoints: [entrypoint, ...workers],
18
18
  target: 'bun',
@@ -25,6 +25,7 @@ class BunCompiler {
25
25
  },
26
26
  define,
27
27
  plugins,
28
+ check,
28
29
  });
29
30
  if (!built.success) {
30
31
  // `getError` lives in `inversion`, which depends on `dev-configs` - importing it here would
@@ -1 +1 @@
1
- {"version":3,"file":"bun.js","sourceRoot":"","sources":["../../src/compilers/bun.ts"],"names":[],"mappings":";;;AAAA,MAAM,kBAAkB,GAAG,iBAAiB,CAAC;AAC7C,MAAM,eAAe,GAAG,YAAY,CAAC;AACrC,MAAM,sBAAsB,GAAG,eAAe,CAAC;AAE/C,gHAAgH;AAChH,MAAa,WAAW;IACtB;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,OAAO,CAClB,OASI,EAAE;QAEN,MAAM,EACJ,UAAU,GAAG,kBAAkB,EAC/B,OAAO,GAAG,EAAE,EACZ,OAAO,GAAG,eAAe,EACzB,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,UAAU,IAAI,sBAAsB,EACrD,OAAO,GAAG,EAAE,EACZ,MAAM,GAAG,EAAE,GACZ,GAAG,IAAI,CAAC;QAET,MAAM,KAAK,GAAG,MAAM,GAAG,CAAC,KAAK,CAAC;YAC5B,WAAW,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;YACrC,MAAM,EAAE,KAAK;YACb,MAAM,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;YAC1C,SAAS,EAAE,QAAQ;YACnB,KAAK,EAAE,KAAK;YACZ,OAAO,EAAE;gBACP,MAAM,EAAE,MAAiC;gBACzC,OAAO;aACR;YACD,MAAM;YACN,OAAO;SACR,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;YACnB,4FAA4F;YAC5F,8FAA8F;YAC9F,sGAAsG;YACtG,MAAM,IAAI,KAAK,CACb;gBACE,gDAAgD,UAAU,IAAI;gBAC9D,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,OAAO,EAAE,CAAC;aAC1D,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AArDD,kCAqDC","sourcesContent":["const DEFAULT_ENTRYPOINT = './dist/index.js';\nconst DEFAULT_OUTFILE = './dist/bin';\nconst DEFAULT_COMPILE_TARGET = 'bun-linux-x64';\n\n/** Bundles and compiles a single Bun executable: minified, linked sourcemaps, target read from `BUN_TARGET`. */\nexport class BunCompiler {\n /**\n * `plugins` is a parameter, never resolved here - `dev-configs` sits below every other IGNIS\n * package (see the Makefile chain) and must not import a plugin factory such as\n * `platformaticKafkaPlugins()` from `helpers`, which would invert that chain.\n */\n static async compile(\n opts: {\n entrypoint?: string;\n /** Bun Worker files the entrypoint starts (`new Worker('./x.worker.ts')`): compiled into the same binary. */\n workers?: string[];\n outfile?: string;\n target?: string;\n plugins?: Bun.BunPlugin[];\n /** Compile-time constants: each key is replaced by its value, a JSON-encoded expression, wherever the bundle reads it. */\n define?: Record<string, string>;\n } = {},\n ): Promise<void> {\n const {\n entrypoint = DEFAULT_ENTRYPOINT,\n workers = [],\n outfile = DEFAULT_OUTFILE,\n target = Bun.env.BUN_TARGET ?? DEFAULT_COMPILE_TARGET,\n plugins = [],\n define = {},\n } = opts;\n\n const built = await Bun.build({\n entrypoints: [entrypoint, ...workers],\n target: 'bun',\n minify: { whitespace: true, syntax: true },\n sourcemap: 'linked',\n throw: false,\n compile: {\n target: target as Bun.Build.CompileTarget,\n outfile,\n },\n define,\n plugins,\n });\n\n if (!built.success) {\n // `getError` lives in `inversion`, which depends on `dev-configs` - importing it here would\n // create a circular workspace dependency, so a failed compile throws a plain `Error` instead.\n // eslint-disable-next-line venizia/no-new-error -- getError would be a dev-configs -> inversion cycle\n throw new Error(\n [\n `[BunCompiler] compile failed for entrypoint \"${entrypoint}\":`,\n ...built.logs.map(log => `[${log.level}] ${log.message}`),\n ].join('\\n'),\n );\n }\n }\n}\n"]}
1
+ {"version":3,"file":"bun.js","sourceRoot":"","sources":["../../src/compilers/bun.ts"],"names":[],"mappings":";;;AAAA,MAAM,kBAAkB,GAAG,iBAAiB,CAAC;AAC7C,MAAM,eAAe,GAAG,YAAY,CAAC;AACrC,MAAM,sBAAsB,GAAG,eAAe,CAAC;AAE/C,gHAAgH;AAChH,MAAa,WAAW;IACtB;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,OAAO,CAClB,OAWI,EAAE;QAEN,MAAM,EACJ,UAAU,GAAG,kBAAkB,EAC/B,OAAO,GAAG,EAAE,EACZ,OAAO,GAAG,eAAe,EACzB,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,UAAU,IAAI,sBAAsB,EACrD,OAAO,GAAG,EAAE,EACZ,MAAM,GAAG,EAAE,EACX,KAAK,GAAG,KAAK,GACd,GAAG,IAAI,CAAC;QAET,MAAM,KAAK,GAAG,MAAM,GAAG,CAAC,KAAK,CAAC;YAC5B,WAAW,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;YACrC,MAAM,EAAE,KAAK;YACb,MAAM,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;YAC1C,SAAS,EAAE,QAAQ;YACnB,KAAK,EAAE,KAAK;YACZ,OAAO,EAAE;gBACP,MAAM,EAAE,MAAiC;gBACzC,OAAO;aACR;YACD,MAAM;YACN,OAAO;YACP,KAAK;SACN,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;YACnB,4FAA4F;YAC5F,8FAA8F;YAC9F,sGAAsG;YACtG,MAAM,IAAI,KAAK,CACb;gBACE,gDAAgD,UAAU,IAAI;gBAC9D,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,OAAO,EAAE,CAAC;aAC1D,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AAzDD,kCAyDC","sourcesContent":["const DEFAULT_ENTRYPOINT = './dist/index.js';\nconst DEFAULT_OUTFILE = './dist/bin';\nconst DEFAULT_COMPILE_TARGET = 'bun-linux-x64';\n\n/** Bundles and compiles a single Bun executable: minified, linked sourcemaps, target read from `BUN_TARGET`. */\nexport class BunCompiler {\n /**\n * `plugins` is a parameter, never resolved here - `dev-configs` sits below every other IGNIS\n * package (see the Makefile chain) and must not import a plugin factory such as\n * `platformaticKafkaPlugins()` from `helpers`, which would invert that chain.\n */\n static async compile(\n opts: {\n entrypoint?: string;\n /** Bun Worker files the entrypoint starts (`new Worker('./x.worker.ts')`): compiled into the same binary. */\n workers?: string[];\n outfile?: string;\n target?: string;\n plugins?: Bun.BunPlugin[];\n /** Compile-time constants: each key is replaced by its value, a JSON-encoded expression, wherever the bundle reads it. */\n define?: Record<string, string>;\n /** Type-check the bundle first; a type error stops the compile. */\n check?: boolean;\n } = {},\n ): Promise<void> {\n const {\n entrypoint = DEFAULT_ENTRYPOINT,\n workers = [],\n outfile = DEFAULT_OUTFILE,\n target = Bun.env.BUN_TARGET ?? DEFAULT_COMPILE_TARGET,\n plugins = [],\n define = {},\n check = false,\n } = opts;\n\n const built = await Bun.build({\n entrypoints: [entrypoint, ...workers],\n target: 'bun',\n minify: { whitespace: true, syntax: true },\n sourcemap: 'linked',\n throw: false,\n compile: {\n target: target as Bun.Build.CompileTarget,\n outfile,\n },\n define,\n plugins,\n check,\n });\n\n if (!built.success) {\n // `getError` lives in `inversion`, which depends on `dev-configs` - importing it here would\n // create a circular workspace dependency, so a failed compile throws a plain `Error` instead.\n // eslint-disable-next-line venizia/no-new-error -- getError would be a dev-configs -> inversion cycle\n throw new Error(\n [\n `[BunCompiler] compile failed for entrypoint \"${entrypoint}\":`,\n ...built.logs.map(log => `[${log.level}] ${log.message}`),\n ].join('\\n'),\n );\n }\n }\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  export * from './compilers';
2
- export * from './formatters';
3
2
  export * from './linters';
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
package/dist/index.js CHANGED
@@ -15,6 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./compilers"), exports);
18
- __exportStar(require("./formatters"), exports);
19
18
  __exportStar(require("./linters"), exports);
20
19
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,+CAA6B;AAC7B,4CAA0B","sourcesContent":["export * from './compilers';\nexport * from './formatters';\nexport * from './linters';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,4CAA0B","sourcesContent":["export * from './compilers';\nexport * from './linters';\n"]}
@@ -1,7 +1,7 @@
1
1
  import type { Linter } from 'eslint';
2
2
  /**
3
- * The full ESLint preset, owned here: the LoopBack 4 rule set on the ESLint, typescript-eslint and
4
- * Prettier recommended presets, type-aware through the project service. A project on oxlint uses
3
+ * The full ESLint preset, owned here: the LoopBack 4 rule set on the ESLint and typescript-eslint
4
+ * recommended presets, type-aware through the project service. A project on oxlint uses
5
5
  * `oxlintConfigs` + `namingConventionConfigs` instead.
6
6
  */
7
7
  export declare const eslintConfigs: Linter.Config[];
@@ -1 +1 @@
1
- {"version":3,"file":"eslint.d.ts","sourceRoot":"","sources":["../../src/linters/eslint.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAwFrC;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAqCvC,CAAC;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAWlD,CAAC"}
1
+ {"version":3,"file":"eslint.d.ts","sourceRoot":"","sources":["../../src/linters/eslint.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAuFrC;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAkCvC,CAAC;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAWlD,CAAC"}
@@ -7,7 +7,6 @@ exports.namingConventionConfigs = exports.eslintConfigs = void 0;
7
7
  const js_1 = __importDefault(require("@eslint/js"));
8
8
  const config_1 = require("eslint/config");
9
9
  const eslint_plugin_n_1 = __importDefault(require("eslint-plugin-n"));
10
- const recommended_1 = __importDefault(require("eslint-plugin-prettier/recommended"));
11
10
  const eslint_plugin_unicorn_1 = __importDefault(require("eslint-plugin-unicorn"));
12
11
  const typescript_eslint_1 = __importDefault(require("typescript-eslint"));
13
12
  const rules_1 = require("./rules");
@@ -84,15 +83,13 @@ const STRICT_RULES = {
84
83
  '@typescript-eslint/return-await': 'error',
85
84
  };
86
85
  /**
87
- * The full ESLint preset, owned here: the LoopBack 4 rule set on the ESLint, typescript-eslint and
88
- * Prettier recommended presets, type-aware through the project service. A project on oxlint uses
86
+ * The full ESLint preset, owned here: the LoopBack 4 rule set on the ESLint and typescript-eslint
87
+ * recommended presets, type-aware through the project service. A project on oxlint uses
89
88
  * `oxlintConfigs` + `namingConventionConfigs` instead.
90
89
  */
91
90
  exports.eslintConfigs = (0, config_1.defineConfig)([
92
91
  js_1.default.configs.recommended,
93
92
  typescript_eslint_1.default.configs.recommended,
94
- // Last of the presets, so it turns off every stylistic rule that would fight the formatter.
95
- recommended_1.default,
96
93
  {
97
94
  files: SOURCE_FILES,
98
95
  languageOptions: {
@@ -122,7 +119,6 @@ exports.eslintConfigs = (0, config_1.defineConfig)([
122
119
  '**/.babelrc.*',
123
120
  '**/eslint.config.*',
124
121
  '**/.eslintrc.*',
125
- '**/.prettierrc.*',
126
122
  ],
127
123
  },
128
124
  ]);
@@ -1 +1 @@
1
- {"version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AAC,IAAI,CAAC,EAAE,+BAAuB,CAAC,KAAK,EAAsB;YACnF,CAAC,4BAAoB,CAAC,IAAI,CAAC,EAAE,4BAAoB,CAAC,KAAK,EAAsB;YAC7E,CAAC,4BAAoB,CAAC,IAAI,CAAC,EAAE,4BAAoB,CAAC,KAAK,EAAE;SAC1D;KACF;IACD;QACE,OAAO,EAAE;YACP,kBAAkB;YAClB,WAAW;YACX,WAAW;YACX,UAAU;YACV,aAAa;YACb,mBAAmB;YACnB,eAAe;YACf,oBAAoB;YACpB,gBAAgB;YAChB,kBAAkB;SACnB;KACF;CACF,CAAC,CAAC;AAEH;;;;;;;;;;GAUG;AACU,QAAA,uBAAuB,GAAoB;IACtD,6FAA6F;IAC7F,EAAE,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,WAAW,EAAE,mBAAmB,CAAC,EAAE;IAC9F;QACE,KAAK,EAAE,CAAC,uBAAuB,CAAC;QAChC,eAAe,EAAE,EAAE,MAAM,EAAE,2BAAQ,CAAC,MAAuB,EAAE;QAC7D,OAAO,EAAE,EAAE,oBAAoB,EAAE,2BAAQ,CAAC,MAAe,EAAE;QAC3D,4FAA4F;QAC5F,aAAa,EAAE,EAAE,6BAA6B,EAAE,KAAK,EAAE;QACvD,KAAK,EAAE,EAAE,CAAC,4BAAoB,CAAC,IAAI,CAAC,EAAE,4BAAoB,CAAC,KAAK,EAAE,EAAE;KACrE;CACF,CAAC","sourcesContent":["import js from '@eslint/js';\nimport type { Linter } from 'eslint';\nimport { defineConfig } from 'eslint/config';\nimport n from 'eslint-plugin-n';\nimport prettierRecommended from 'eslint-plugin-prettier/recommended';\nimport unicorn from 'eslint-plugin-unicorn';\nimport tseslint from 'typescript-eslint';\nimport {\n NamingConventionRule,\n NoRestrictedImportsRule,\n NoUnusedVarsRule,\n SwitchCaseBracesRule,\n} from './rules';\n\n/** Every file the preset lints. */\nconst SOURCE_FILES = [\n '**/*.js',\n '**/*.cjs',\n '**/*.mjs',\n '**/*.jsx',\n '**/*.ts',\n '**/*.cts',\n '**/*.mts',\n '**/*.tsx',\n];\n\n/** Rules that stay off: the type checker, the formatter or the framework's own style covers them. */\nconst OFF_RULES: Linter.RulesRecord = {\n 'no-constant-condition': 'off',\n 'no-undef': 'off',\n 'no-unused-vars': 'off',\n 'no-mixed-operators': 'off',\n 'no-inner-declarations': 'off',\n 'no-dupe-class-members': 'off',\n 'no-redeclare': 'off',\n 'no-invalid-this': 'off',\n 'no-shadow': 'off',\n 'no-return-await': 'off',\n camelcase: 'off',\n '@typescript-eslint/no-explicit-any': 'off',\n '@typescript-eslint/no-unsafe-function-type': 'off',\n '@typescript-eslint/no-this-alias': 'off',\n '@typescript-eslint/no-empty-object-type': 'off',\n '@typescript-eslint/no-invalid-void-type': 'off',\n '@typescript-eslint/no-confusing-void-expression': 'off',\n '@typescript-eslint/no-extraneous-class': 'off',\n '@typescript-eslint/no-require-imports': 'off',\n '@typescript-eslint/strict-boolean-expressions': 'off',\n '@typescript-eslint/explicit-function-return-type': 'off',\n '@typescript-eslint/explicit-member-accessibility': 'off',\n '@typescript-eslint/explicit-module-boundary-types': 'off',\n '@typescript-eslint/array-type': 'off',\n '@typescript-eslint/no-non-null-assertion': 'off',\n '@typescript-eslint/no-empty-function': 'off',\n '@typescript-eslint/consistent-type-assertions': 'off',\n '@typescript-eslint/no-misused-promises': 'off',\n};\n\n/** The LoopBack 4 rule set, on top of the recommended presets. */\nconst STRICT_RULES: Linter.RulesRecord = {\n 'prefer-const': 'error',\n 'no-var': 'error',\n curly: ['error', 'all'],\n 'no-new-wrappers': 'error',\n 'no-throw-literal': 'error',\n 'no-unused-expressions': 'error',\n eqeqeq: ['error', 'smart'],\n 'no-void': 'error',\n 'no-useless-escape': 'warn',\n 'no-caller': 'error',\n 'n/prefer-node-protocol': ['error'],\n '@typescript-eslint/adjacent-overload-signatures': 'error',\n '@typescript-eslint/prefer-for-of': 'error',\n '@typescript-eslint/unified-signatures': 'error',\n '@typescript-eslint/no-invalid-this': ['error'],\n '@typescript-eslint/no-use-before-define': 'error',\n '@typescript-eslint/no-shadow': 'error',\n '@typescript-eslint/ban-ts-comment': 'error',\n '@typescript-eslint/no-namespace': 'error',\n '@typescript-eslint/await-thenable': 'error',\n '@typescript-eslint/no-floating-promises': 'error',\n '@typescript-eslint/prefer-optional-chain': 'error',\n '@typescript-eslint/prefer-nullish-coalescing': [\n 'error',\n { allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: true },\n ],\n '@typescript-eslint/return-await': 'error',\n};\n\n/**\n * The full ESLint preset, owned here: the LoopBack 4 rule set on the ESLint, typescript-eslint and\n * Prettier recommended presets, type-aware through the project service. A project on oxlint uses\n * `oxlintConfigs` + `namingConventionConfigs` instead.\n */\nexport const eslintConfigs: Linter.Config[] = defineConfig([\n js.configs.recommended,\n tseslint.configs.recommended,\n // Last of the presets, so it turns off every stylistic rule that would fight the formatter.\n prettierRecommended,\n {\n files: SOURCE_FILES,\n languageOptions: {\n parserOptions: {\n // Finds each file's tsconfig; the default project covers root-level scripts and configs.\n projectService: { allowDefaultProject: ['*.js', '*.cjs', '*.mjs', '.*.js'] },\n },\n },\n plugins: { n, unicorn },\n rules: {\n ...OFF_RULES,\n ...STRICT_RULES,\n '@typescript-eslint/no-unused-vars': NoUnusedVarsRule.build() as Linter.RuleEntry,\n [NoRestrictedImportsRule.NAME]: NoRestrictedImportsRule.build() as Linter.RuleEntry,\n [SwitchCaseBracesRule.NAME]: SwitchCaseBracesRule.build() as Linter.RuleEntry,\n [NamingConventionRule.NAME]: NamingConventionRule.build(),\n },\n },\n {\n ignores: [\n '**/node_modules/',\n '**/*.d.ts',\n '**/build/',\n '**/dist/',\n '**/release/',\n '**/babel.config.*',\n '**/.babelrc.*',\n '**/eslint.config.*',\n '**/.eslintrc.*',\n '**/.prettierrc.*',\n ],\n },\n]);\n\n/**\n * The one rule of `eslintConfigs` that oxlint cannot run yet, as a standalone ESLint preset to run\n * next to `oxlintConfigs`. It needs no type information, so ESLint stays fast.\n *\n * ```js\n * // .configs/lints/eslint.config.mjs\n * import { namingConventionConfigs } from '@venizia/dev-configs/linters';\n *\n * export default namingConventionConfigs;\n * ```\n */\nexport const namingConventionConfigs: Linter.Config[] = [\n // Global: ESLint does not read .gitignore, and still walks plain .js files no config claims.\n { ignores: ['**/dist/**', '**/build/**', '**/coverage/**', '**/*.d.ts', '**/*.{js,cjs,mjs}'] },\n {\n files: ['**/*.{ts,tsx,mts,cts}'],\n languageOptions: { parser: tseslint.parser as Linter.Parser },\n plugins: { '@typescript-eslint': tseslint.plugin as never },\n // oxlint owns every other rule, so the disable comments for them are not ESLint's to judge.\n linterOptions: { reportUnusedDisableDirectives: 'off' },\n rules: { [NamingConventionRule.NAME]: NamingConventionRule.build() },\n },\n];\n"]}
1
+ {"version":3,"file":"eslint.js","sourceRoot":"","sources":["../../src/linters/eslint.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAE5B,0CAA6C;AAC7C,sEAAgC;AAChC,kFAA4C;AAC5C,0EAAyC;AACzC,mCAKiB;AAEjB,mCAAmC;AACnC,MAAM,YAAY,GAAG;IACnB,SAAS;IACT,UAAU;IACV,UAAU;IACV,UAAU;IACV,SAAS;IACT,UAAU;IACV,UAAU;IACV,UAAU;CACX,CAAC;AAEF,qGAAqG;AACrG,MAAM,SAAS,GAAuB;IACpC,uBAAuB,EAAE,KAAK;IAC9B,UAAU,EAAE,KAAK;IACjB,gBAAgB,EAAE,KAAK;IACvB,oBAAoB,EAAE,KAAK;IAC3B,uBAAuB,EAAE,KAAK;IAC9B,uBAAuB,EAAE,KAAK;IAC9B,cAAc,EAAE,KAAK;IACrB,iBAAiB,EAAE,KAAK;IACxB,WAAW,EAAE,KAAK;IAClB,iBAAiB,EAAE,KAAK;IACxB,SAAS,EAAE,KAAK;IAChB,oCAAoC,EAAE,KAAK;IAC3C,4CAA4C,EAAE,KAAK;IACnD,kCAAkC,EAAE,KAAK;IACzC,yCAAyC,EAAE,KAAK;I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ACvD,KAAK,EAAE,EAAE,CAAC,4BAAoB,CAAC,IAAI,CAAC,EAAE,4BAAoB,CAAC,KAAK,EAAE,EAAE;KACrE;CACF,CAAC","sourcesContent":["import js from '@eslint/js';\nimport type { Linter } from 'eslint';\nimport { defineConfig } from 'eslint/config';\nimport n from 'eslint-plugin-n';\nimport unicorn from 'eslint-plugin-unicorn';\nimport tseslint from 'typescript-eslint';\nimport {\n NamingConventionRule,\n NoRestrictedImportsRule,\n NoUnusedVarsRule,\n SwitchCaseBracesRule,\n} from './rules';\n\n/** Every file the preset lints. */\nconst SOURCE_FILES = [\n '**/*.js',\n '**/*.cjs',\n '**/*.mjs',\n '**/*.jsx',\n '**/*.ts',\n '**/*.cts',\n '**/*.mts',\n '**/*.tsx',\n];\n\n/** Rules that stay off: the type checker, the formatter or the framework's own style covers them. */\nconst OFF_RULES: Linter.RulesRecord = {\n 'no-constant-condition': 'off',\n 'no-undef': 'off',\n 'no-unused-vars': 'off',\n 'no-mixed-operators': 'off',\n 'no-inner-declarations': 'off',\n 'no-dupe-class-members': 'off',\n 'no-redeclare': 'off',\n 'no-invalid-this': 'off',\n 'no-shadow': 'off',\n 'no-return-await': 'off',\n camelcase: 'off',\n '@typescript-eslint/no-explicit-any': 'off',\n '@typescript-eslint/no-unsafe-function-type': 'off',\n '@typescript-eslint/no-this-alias': 'off',\n '@typescript-eslint/no-empty-object-type': 'off',\n '@typescript-eslint/no-invalid-void-type': 'off',\n '@typescript-eslint/no-confusing-void-expression': 'off',\n '@typescript-eslint/no-extraneous-class': 'off',\n '@typescript-eslint/no-require-imports': 'off',\n '@typescript-eslint/strict-boolean-expressions': 'off',\n '@typescript-eslint/explicit-function-return-type': 'off',\n '@typescript-eslint/explicit-member-accessibility': 'off',\n '@typescript-eslint/explicit-module-boundary-types': 'off',\n '@typescript-eslint/array-type': 'off',\n '@typescript-eslint/no-non-null-assertion': 'off',\n '@typescript-eslint/no-empty-function': 'off',\n '@typescript-eslint/consistent-type-assertions': 'off',\n '@typescript-eslint/no-misused-promises': 'off',\n};\n\n/** The LoopBack 4 rule set, on top of the recommended presets. */\nconst STRICT_RULES: Linter.RulesRecord = {\n 'prefer-const': 'error',\n 'no-var': 'error',\n curly: ['error', 'all'],\n 'no-new-wrappers': 'error',\n 'no-throw-literal': 'error',\n 'no-unused-expressions': 'error',\n eqeqeq: ['error', 'smart'],\n 'no-void': 'error',\n 'no-useless-escape': 'warn',\n 'no-caller': 'error',\n 'n/prefer-node-protocol': ['error'],\n '@typescript-eslint/adjacent-overload-signatures': 'error',\n '@typescript-eslint/prefer-for-of': 'error',\n '@typescript-eslint/unified-signatures': 'error',\n '@typescript-eslint/no-invalid-this': ['error'],\n '@typescript-eslint/no-use-before-define': 'error',\n '@typescript-eslint/no-shadow': 'error',\n '@typescript-eslint/ban-ts-comment': 'error',\n '@typescript-eslint/no-namespace': 'error',\n '@typescript-eslint/await-thenable': 'error',\n '@typescript-eslint/no-floating-promises': 'error',\n '@typescript-eslint/prefer-optional-chain': 'error',\n '@typescript-eslint/prefer-nullish-coalescing': [\n 'error',\n { allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: true },\n ],\n '@typescript-eslint/return-await': 'error',\n};\n\n/**\n * The full ESLint preset, owned here: the LoopBack 4 rule set on the ESLint and typescript-eslint\n * recommended presets, type-aware through the project service. A project on oxlint uses\n * `oxlintConfigs` + `namingConventionConfigs` instead.\n */\nexport const eslintConfigs: Linter.Config[] = defineConfig([\n js.configs.recommended,\n tseslint.configs.recommended,\n {\n files: SOURCE_FILES,\n languageOptions: {\n parserOptions: {\n // Finds each file's tsconfig; the default project covers root-level scripts and configs.\n projectService: { allowDefaultProject: ['*.js', '*.cjs', '*.mjs', '.*.js'] },\n },\n },\n plugins: { n, unicorn },\n rules: {\n ...OFF_RULES,\n ...STRICT_RULES,\n '@typescript-eslint/no-unused-vars': NoUnusedVarsRule.build() as Linter.RuleEntry,\n [NoRestrictedImportsRule.NAME]: NoRestrictedImportsRule.build() as Linter.RuleEntry,\n [SwitchCaseBracesRule.NAME]: SwitchCaseBracesRule.build() as Linter.RuleEntry,\n [NamingConventionRule.NAME]: NamingConventionRule.build(),\n },\n },\n {\n ignores: [\n '**/node_modules/',\n '**/*.d.ts',\n '**/build/',\n '**/dist/',\n '**/release/',\n '**/babel.config.*',\n '**/.babelrc.*',\n '**/eslint.config.*',\n '**/.eslintrc.*',\n ],\n },\n]);\n\n/**\n * The one rule of `eslintConfigs` that oxlint cannot run yet, as a standalone ESLint preset to run\n * next to `oxlintConfigs`. It needs no type information, so ESLint stays fast.\n *\n * ```js\n * // .configs/lints/eslint.config.mjs\n * import { namingConventionConfigs } from '@venizia/dev-configs/linters';\n *\n * export default namingConventionConfigs;\n * ```\n */\nexport const namingConventionConfigs: Linter.Config[] = [\n // Global: ESLint does not read .gitignore, and still walks plain .js files no config claims.\n { ignores: ['**/dist/**', '**/build/**', '**/coverage/**', '**/*.d.ts', '**/*.{js,cjs,mjs}'] },\n {\n files: ['**/*.{ts,tsx,mts,cts}'],\n languageOptions: { parser: tseslint.parser as Linter.Parser },\n plugins: { '@typescript-eslint': tseslint.plugin as never },\n // oxlint owns every other rule, so the disable comments for them are not ESLint's to judge.\n linterOptions: { reportUnusedDisableDirectives: 'off' },\n rules: { [NamingConventionRule.NAME]: NamingConventionRule.build() },\n },\n];\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@venizia/dev-configs",
3
- "version": "0.3.5",
4
- "description": "Shareable development configurations for TypeScript projects: oxlint and oxfmt presets with per-rule builders, the ESLint naming-convention rule, the legacy ESLint flat config and Prettier presets, and TypeScript compiler options with critical decorator support (experimentalDecorators, emitDecoratorMetadata, useDefineForClassFields). Single source of truth for consistent code style, type checking, and build settings across monorepo packages.",
3
+ "version": "0.4.0",
4
+ "description": "Shareable development configurations for TypeScript projects: oxlint presets with per-rule builders, the ESLint naming-convention rule, the legacy ESLint flat config, and TypeScript compiler options with critical decorator support (experimentalDecorators, emitDecoratorMetadata, useDefineForClassFields). Single source of truth for consistent code style, type checking, and build settings across monorepo packages.",
5
5
  "keywords": [
6
6
  "build-tools",
7
7
  "bun",
@@ -29,10 +29,7 @@
29
29
  "monorepo",
30
30
  "monorepo-config",
31
31
  "nodejs",
32
- "oxfmt",
33
32
  "oxlint",
34
- "prettier",
35
- "prettier-config",
36
33
  "settings",
37
34
  "shareable-config",
38
35
  "shared-config",
@@ -44,26 +41,31 @@
44
41
  "venizia"
45
42
  ],
46
43
  "homepage": "https://ignis.venizia.ai",
47
- "repository": {
48
- "type": "git",
49
- "url": "git+https://github.com/VENIZIA-AI/ignis.git",
50
- "directory": "packages/dev-configs"
51
- },
52
44
  "bugs": {
53
45
  "url": "https://github.com/VENIZIA-AI/ignis/issues"
54
46
  },
47
+ "license": "MIT",
55
48
  "author": {
56
49
  "name": "VENIZIA AI Developer",
57
50
  "email": "developer@venizia.ai",
58
51
  "url": "https://venizia.ai"
59
52
  },
60
- "license": "MIT",
53
+ "repository": {
54
+ "type": "git",
55
+ "url": "git+https://github.com/VENIZIA-AI/ignis.git",
56
+ "directory": "packages/dev-configs"
57
+ },
61
58
  "bin": {
62
59
  "devz": "./dist/cli/index.js"
63
60
  },
64
- "engines": {
65
- "bun": ">=1.4"
66
- },
61
+ "files": [
62
+ "README.md",
63
+ "LICENSE.md",
64
+ "dist",
65
+ "src/tsconfig",
66
+ "!**/__tests__",
67
+ "!**/*.tsbuildinfo"
68
+ ],
67
69
  "exports": {
68
70
  ".": {
69
71
  "types": "./dist/index.d.ts",
@@ -73,10 +75,6 @@
73
75
  "types": "./dist/compilers/index.d.ts",
74
76
  "default": "./dist/compilers/index.js"
75
77
  },
76
- "./formatters": {
77
- "types": "./dist/formatters/index.d.ts",
78
- "default": "./dist/formatters/index.js"
79
- },
80
78
  "./linters": {
81
79
  "types": "./dist/linters/index.d.ts",
82
80
  "default": "./dist/linters/index.js"
@@ -95,63 +93,47 @@
95
93
  "./tsconfig.react.json": "./src/tsconfig/tsconfig.react.json",
96
94
  "./package.json": "./package.json"
97
95
  },
98
- "files": [
99
- "README.md",
100
- "LICENSE.md",
101
- "dist",
102
- "src/tsconfig",
103
- "!**/*.tsbuildinfo"
104
- ],
105
96
  "publishConfig": {
106
97
  "access": "public"
107
98
  },
108
99
  "scripts": {
109
- "force-update": "sh ./scripts/force-update.sh",
100
+ "force-update": "sh ../../scripts/force-update.sh",
110
101
  "prepublishOnly": "make rebuild"
111
102
  },
112
103
  "dependencies": {
113
104
  "@eslint/js": "^10.0.1",
114
- "eslint-config-prettier": "^10.1.8",
115
- "eslint-plugin-n": "^18.2.1",
116
- "eslint-plugin-prettier": "^5.5.6",
117
- "eslint-plugin-unicorn": "^74.0.0",
118
- "typescript-eslint": "^8.71.2"
105
+ "eslint-plugin-n": "^18.5.0",
106
+ "eslint-plugin-unicorn": "^78.0.0",
107
+ "typescript-eslint": "^8.72.0"
108
+ },
109
+ "devDependencies": {
110
+ "@types/bun": "^1.4.3",
111
+ "eslint": "^10.13.0",
112
+ "oxlint": "1.89.0",
113
+ "oxlint-tsgolint": "7.0.2004",
114
+ "typescript": "^6.0.3"
119
115
  },
120
116
  "peerDependencies": {
121
117
  "eslint": "^9.0.0 || ^10.0.0",
122
- "oxfmt": ">=0.73.0",
123
- "oxlint": ">=1.88.0",
118
+ "oxlint": ">=1.89.0",
124
119
  "oxlint-tsgolint": ">=7.0.2004",
125
- "prettier": "^3.0.0",
126
120
  "typescript": "^5.0.0 || ^6.0.0"
127
121
  },
128
122
  "peerDependenciesMeta": {
129
123
  "eslint": {
130
124
  "optional": true
131
125
  },
132
- "oxfmt": {
133
- "optional": true
134
- },
135
126
  "oxlint": {
136
127
  "optional": true
137
128
  },
138
129
  "oxlint-tsgolint": {
139
130
  "optional": true
140
131
  },
141
- "prettier": {
142
- "optional": true
143
- },
144
132
  "typescript": {
145
133
  "optional": true
146
134
  }
147
135
  },
148
- "devDependencies": {
149
- "@types/bun": "^1.4.1",
150
- "eslint": "^10.10.0",
151
- "oxfmt": "0.73.0",
152
- "oxlint": "1.88.0",
153
- "oxlint-tsgolint": "7.0.2004",
154
- "prettier": "^3.9.6",
155
- "typescript": "^6.0.3"
136
+ "engines": {
137
+ "bun": ">=1.4.4"
156
138
  }
157
139
  }
@@ -1,13 +1,11 @@
1
1
  {
2
2
  "$schema": "http://json.schemastore.org/tsconfig",
3
3
  "compilerOptions": {
4
- /* TypeScript 6.0 — suppress deprecation warnings for experimentalDecorators */
5
- "ignoreDeprecations": "6.0",
6
-
7
4
  /* Language and Environment */
8
5
  "target": "ES2025",
9
6
  "lib": ["ES2025"],
10
7
  "types": ["bun"],
8
+ "moduleDetection": "force",
11
9
  "experimentalDecorators": true,
12
10
  "emitDecoratorMetadata": true,
13
11
  "useDefineForClassFields": false,
@@ -16,7 +14,7 @@
16
14
  "module": "Node16",
17
15
  "moduleResolution": "node16",
18
16
  "resolveJsonModule": true,
19
- "isolatedModules": false,
17
+ "isolatedModules": true,
20
18
  "forceConsistentCasingInFileNames": true,
21
19
 
22
20
  /* Emit */
@@ -41,7 +39,7 @@
41
39
  /* Additional Checks */
42
40
  "noUnusedLocals": true,
43
41
  "noUnusedParameters": true,
44
- "noImplicitReturns": false,
42
+ "noImplicitReturns": true,
45
43
  "noFallthroughCasesInSwitch": true,
46
44
  "noUncheckedIndexedAccess": false,
47
45
  "noImplicitOverride": true,
@@ -6,6 +6,7 @@
6
6
  "lib": ["ES2025", "DOM", "DOM.Iterable"],
7
7
  "types": [],
8
8
  "module": "ESNext",
9
- "moduleResolution": "bundler"
9
+ "moduleResolution": "bundler",
10
+ "verbatimModuleSyntax": true
10
11
  }
11
12
  }
@@ -1,3 +0,0 @@
1
- export * from './oxfmt';
2
- export * from './prettier';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/formatters/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./oxfmt"), exports);
18
- __exportStar(require("./prettier"), exports);
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/formatters/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,6CAA2B","sourcesContent":["export * from './oxfmt';\nexport * from './prettier';\n"]}
@@ -1,28 +0,0 @@
1
- import type { OxfmtConfig } from 'oxfmt';
2
- /**
3
- * The oxfmt port of `prettierConfigs` - the same seven options, so the output matches Prettier's.
4
- *
5
- * ```ts
6
- * // .configs/formatters/oxfmt.config.mts
7
- * import { defineConfig } from 'oxfmt';
8
- * import { oxfmtConfigs } from '@venizia/dev-configs/formatters';
9
- *
10
- * export default defineConfig(oxfmtConfigs);
11
- * ```
12
- */
13
- export declare const oxfmtConfigs: OxfmtConfig;
14
- /**
15
- * `oxfmtConfigs` for browser and React code: arrow parameters always in parentheses (`(x) => x`),
16
- * and the closing `>` of a multi-line JSX element on its last attribute line, which keeps JSX diffs
17
- * small. `bracketSameLine` changes nothing outside JSX.
18
- *
19
- * ```ts
20
- * // .configs/formatters/oxfmt.config.mts
21
- * import { defineConfig } from 'oxfmt';
22
- * import { browserOxfmtConfigs } from '@venizia/dev-configs/formatters';
23
- *
24
- * export default defineConfig(browserOxfmtConfigs);
25
- * ```
26
- */
27
- export declare const browserOxfmtConfigs: OxfmtConfig;
28
- //# sourceMappingURL=oxfmt.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"oxfmt.d.ts","sourceRoot":"","sources":["../../src/formatters/oxfmt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEzC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,EAAE,WAQ1B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB,EAAE,WAIjC,CAAC"}
@@ -1,42 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.browserOxfmtConfigs = exports.oxfmtConfigs = void 0;
4
- /**
5
- * The oxfmt port of `prettierConfigs` - the same seven options, so the output matches Prettier's.
6
- *
7
- * ```ts
8
- * // .configs/formatters/oxfmt.config.mts
9
- * import { defineConfig } from 'oxfmt';
10
- * import { oxfmtConfigs } from '@venizia/dev-configs/formatters';
11
- *
12
- * export default defineConfig(oxfmtConfigs);
13
- * ```
14
- */
15
- exports.oxfmtConfigs = {
16
- bracketSpacing: true,
17
- singleQuote: true,
18
- printWidth: 100,
19
- tabWidth: 2,
20
- trailingComma: 'all',
21
- arrowParens: 'avoid',
22
- semi: true,
23
- };
24
- /**
25
- * `oxfmtConfigs` for browser and React code: arrow parameters always in parentheses (`(x) => x`),
26
- * and the closing `>` of a multi-line JSX element on its last attribute line, which keeps JSX diffs
27
- * small. `bracketSameLine` changes nothing outside JSX.
28
- *
29
- * ```ts
30
- * // .configs/formatters/oxfmt.config.mts
31
- * import { defineConfig } from 'oxfmt';
32
- * import { browserOxfmtConfigs } from '@venizia/dev-configs/formatters';
33
- *
34
- * export default defineConfig(browserOxfmtConfigs);
35
- * ```
36
- */
37
- exports.browserOxfmtConfigs = {
38
- ...exports.oxfmtConfigs,
39
- arrowParens: 'always',
40
- bracketSameLine: true,
41
- };
42
- //# sourceMappingURL=oxfmt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"oxfmt.js","sourceRoot":"","sources":["../../src/formatters/oxfmt.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;GAUG;AACU,QAAA,YAAY,GAAgB;IACvC,cAAc,EAAE,IAAI;IACpB,WAAW,EAAE,IAAI;IACjB,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,CAAC;IACX,aAAa,EAAE,KAAK;IACpB,WAAW,EAAE,OAAO;IACpB,IAAI,EAAE,IAAI;CACX,CAAC;AAEF;;;;;;;;;;;;GAYG;AACU,QAAA,mBAAmB,GAAgB;IAC9C,GAAG,oBAAY;IACf,WAAW,EAAE,QAAQ;IACrB,eAAe,EAAE,IAAI;CACtB,CAAC","sourcesContent":["import type { OxfmtConfig } from 'oxfmt';\n\n/**\n * The oxfmt port of `prettierConfigs` - the same seven options, so the output matches Prettier's.\n *\n * ```ts\n * // .configs/formatters/oxfmt.config.mts\n * import { defineConfig } from 'oxfmt';\n * import { oxfmtConfigs } from '@venizia/dev-configs/formatters';\n *\n * export default defineConfig(oxfmtConfigs);\n * ```\n */\nexport const oxfmtConfigs: OxfmtConfig = {\n bracketSpacing: true,\n singleQuote: true,\n printWidth: 100,\n tabWidth: 2,\n trailingComma: 'all',\n arrowParens: 'avoid',\n semi: true,\n};\n\n/**\n * `oxfmtConfigs` for browser and React code: arrow parameters always in parentheses (`(x) => x`),\n * and the closing `>` of a multi-line JSX element on its last attribute line, which keeps JSX diffs\n * small. `bracketSameLine` changes nothing outside JSX.\n *\n * ```ts\n * // .configs/formatters/oxfmt.config.mts\n * import { defineConfig } from 'oxfmt';\n * import { browserOxfmtConfigs } from '@venizia/dev-configs/formatters';\n *\n * export default defineConfig(browserOxfmtConfigs);\n * ```\n */\nexport const browserOxfmtConfigs: OxfmtConfig = {\n ...oxfmtConfigs,\n arrowParens: 'always',\n bracketSameLine: true,\n};\n"]}
@@ -1,3 +0,0 @@
1
- import type { Config } from 'prettier';
2
- export declare const prettierConfigs: Config;
3
- //# sourceMappingURL=prettier.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prettier.d.ts","sourceRoot":"","sources":["../../src/formatters/prettier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,eAAO,MAAM,eAAe,EAAE,MAQ7B,CAAC"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.prettierConfigs = void 0;
4
- exports.prettierConfigs = {
5
- bracketSpacing: true,
6
- singleQuote: true,
7
- printWidth: 100,
8
- tabWidth: 2,
9
- trailingComma: 'all',
10
- arrowParens: 'avoid',
11
- semi: true,
12
- };
13
- //# sourceMappingURL=prettier.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prettier.js","sourceRoot":"","sources":["../../src/formatters/prettier.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAW;IACrC,cAAc,EAAE,IAAI;IACpB,WAAW,EAAE,IAAI;IACjB,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,CAAC;IACX,aAAa,EAAE,KAAK;IACpB,WAAW,EAAE,OAAO;IACpB,IAAI,EAAE,IAAI;CACX,CAAC","sourcesContent":["import type { Config } from 'prettier';\n\nexport const prettierConfigs: Config = {\n bracketSpacing: true,\n singleQuote: true,\n printWidth: 100,\n tabWidth: 2,\n trailingComma: 'all',\n arrowParens: 'avoid',\n semi: true,\n};\n"]}