@sebastienrousseau/tsconfig-config 0.0.3 → 0.0.9

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
@@ -15,32 +15,31 @@
15
15
  <a href="https://www.npmjs.com/package/@sebastienrousseau/tsconfig-config"><img src="https://img.shields.io/npm/v/%40sebastienrousseau%2Ftsconfig-config.svg?style=for-the-badge&color=fc8d62&logo=npm" alt="npm package" /></a>
16
16
  <a href="https://sebastienrousseau.com/tsconfig-config/"><img src="https://img.shields.io/badge/docs-sebastienrousseau.com-brightgreen.svg?style=for-the-badge&logo=github" alt="Documentation" /></a>
17
17
  <a href="https://scorecard.dev/viewer/?uri=github.com/sebastienrousseau/tsconfig-config"><img src="https://img.shields.io/ossf-scorecard/github.com/sebastienrousseau/tsconfig-config?style=for-the-badge&label=OpenSSF%20Scorecard&logo=openssf" alt="OpenSSF Scorecard" /></a>
18
- <a href="https://www.bestpractices.dev/projects/14522"><img src="https://img.shields.io/cii/level/14522?style=for-the-badge&label=OpenSSF%20Best%20Practices&logo=openssf" alt="OpenSSF Best Practices" /></a>
19
18
  <a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-Apache--2.0%20OR%20MIT-blue.svg?style=for-the-badge" alt="License: Apache-2.0 OR MIT" /></a>
20
- <a href="#minimum-toolchain-policy"><img src="https://img.shields.io/badge/node->=%2018.0.0-93450a.svg?style=for-the-badge&logo=node.js" alt="Node >= 18.0.0" /></a>
19
+ <a href="#minimum-toolchain-policy"><img src="https://img.shields.io/badge/node->=%2020.0.0-93450a.svg?style=for-the-badge&logo=node.js" alt="Node >= 20.0.0" /></a>
21
20
  </p>
22
21
 
23
22
  ---
24
23
 
25
24
  ## Contents
26
25
 
27
- **Getting started**
26
+ ### Getting started
28
27
 
29
28
  - [Install](#install) — npm, pnpm, yarn, bun, source
30
29
  - [Requirements](#requirements) — runtime floor, platform support
31
30
  - [Quick Start](#quick-start) — import and extend in seconds
32
31
 
33
- **The configuration ecosystem**
32
+ ### Ecosystem
34
33
 
35
34
  - [The configuration ecosystem](#the-configuration-ecosystem) — `@sebastienrousseau/config` family map at a glance
36
35
 
37
- **Configuration reference**
36
+ ### Configuration reference
38
37
 
39
38
  - [Why this approach?](#why-this-approach) — design rationale and engineering principles
40
39
  - [Strict Type Checking & Modern Module Resolution](#strict-type-checking--modern-module-resolution) — before and after rule comparison
41
40
  - [Module compatibility](#module-compatibility) — dual CJS/ESM exports and TypeScript declarations
42
41
 
43
- **Operational**
42
+ ### Operational
44
43
 
45
44
  - [When not to use this configuration](#when-not-to-use-this-configuration) — boundaries and limitations
46
45
  - [Development](#development) — make targets, validation, test suite
@@ -84,7 +83,7 @@ make # check + test
84
83
 
85
84
  ## Requirements
86
85
 
87
- - **Node.js 18.0.0 or newer.** Every package manifest declares `engines.node`, and CI enforces the runtime floor on every push across macOS, Linux, and Windows.
86
+ - **Node.js 20.0.0 or newer.** Declared in `engines.node` and proved on every push: the CI matrix runs Node 20, 22, 24 on Linux, macOS and Windows, and fails if the matrix floor and `engines.node` disagree.
88
87
  - **npm 9.0.0 or newer** (or modern pnpm / yarn / bun).
89
88
  - **Module systems.** Full native support for ECMAScript Modules (ESM) and CommonJS (CJS).
90
89
  - **TypeScript 5.0 or newer** (optional, recommended for type checking).
@@ -93,25 +92,33 @@ make # check + test
93
92
 
94
93
  ## Quick Start
95
94
 
96
- ### In `package.json`
95
+ TypeScript resolves `extends` through node_modules, so these are used directly.
96
+
97
+ ### tsconfig.json — library
97
98
 
98
99
  ```json
99
100
  {
100
- "tsconfig": "@sebastienrousseau/tsconfig-config"
101
+ "extends": "@sebastienrousseau/tsconfig-config/base.json",
102
+ "include": ["src"]
101
103
  }
102
104
  ```
103
105
 
104
- ### In CommonJS Configuration
106
+ ### tsconfig.json — Node application
105
107
 
106
- ```js
107
- module.exports = require("@sebastienrousseau/tsconfig-config");
108
+ ```json
109
+ {
110
+ "extends": "@sebastienrousseau/tsconfig-config/node.json",
111
+ "include": ["src"]
112
+ }
108
113
  ```
109
114
 
110
- ### In ES Module Configuration
115
+ ### tsconfig.json — browser
111
116
 
112
- ```js
113
- import config from "@sebastienrousseau/tsconfig-config";
114
- export default config;
117
+ ```json
118
+ {
119
+ "extends": "@sebastienrousseau/tsconfig-config/web.json",
120
+ "include": ["src"]
121
+ }
115
122
  ```
116
123
 
117
124
  ---
@@ -124,25 +131,42 @@ export default config;
124
131
  | :--- | :--- | :--- |
125
132
  | [`@sebastienrousseau/biome-config`](https://github.com/sebastienrousseau/biome-config) | Rust-powered linting & formatting | Biome 1.9+ |
126
133
  | [`@sebastienrousseau/browserslist-config`](https://github.com/sebastienrousseau/browserslist-config) | Target browser matrix | Browserslist 4+ |
134
+ | [`@sebastienrousseau/c-config`](https://github.com/sebastienrousseau/c-config) | Modern C23 clang-format and clang-tidy rules | Clang 18+ / C23 |
127
135
  | [`@sebastienrousseau/c8-config`](https://github.com/sebastienrousseau/c8-config) | V8 native code coverage thresholds | c8 / V8 |
128
136
  | [`@sebastienrousseau/commitlint-config`](https://github.com/sebastienrousseau/commitlint-config) | Conventional Commits standard | Commitlint 19+ |
137
+ | [`@sebastienrousseau/cpp-config`](https://github.com/sebastienrousseau/cpp-config) | Modern C++23 clang-format, tidy & cmake rules | Clang 18+ / C++23 |
138
+ | [`@sebastienrousseau/csharp-config`](https://github.com/sebastienrousseau/csharp-config) | C# Roslyn analyzers and OmniSharp rules | .NET 8/9 / Roslyn |
139
+ | [`@sebastienrousseau/dart-config`](https://github.com/sebastienrousseau/dart-config) | Dart and Flutter analysis_options presets | Dart 3.x / Flutter |
129
140
  | [`@sebastienrousseau/docker-config`](https://github.com/sebastienrousseau/docker-config) | Multi-stage Docker hardening | Hadolint / BuildKit |
130
141
  | [`@sebastienrousseau/eslint-config`](https://github.com/sebastienrousseau/eslint-config) | Strict ECMAScript & TypeScript linting | ESLint 9+ Flat Config |
142
+ | [`@sebastienrousseau/go-config`](https://github.com/sebastienrousseau/go-config) | Golangci-lint, staticcheck, and revive rules | Go 1.22+ / golangci-lint |
143
+ | [`@sebastienrousseau/java-config`](https://github.com/sebastienrousseau/java-config) | Checkstyle, SpotBugs, and PMD rulesets | Java 21+ / Checkstyle |
131
144
  | [`@sebastienrousseau/jsdoc-config`](https://github.com/sebastienrousseau/jsdoc-config) | Structured API documentation generation | JSDoc 4+ |
132
145
  | [`@sebastienrousseau/knip-config`](https://github.com/sebastienrousseau/knip-config) | Unused files, exports & dependencies audit | Knip 5+ |
146
+ | [`@sebastienrousseau/kotlin-config`](https://github.com/sebastienrousseau/kotlin-config) | Official ktlint formatting and Detekt analysis | Kotlin 2.0+ / Detekt |
133
147
  | [`@sebastienrousseau/lefthook-config`](https://github.com/sebastienrousseau/lefthook-config) | Fast, parallel Git hook automation | Lefthook 1.7+ |
148
+ | [`@sebastienrousseau/lua-config`](https://github.com/sebastienrousseau/lua-config) | Lua 5.4, Neovim LuaCheck and StyLua presets | Lua 5.4 / StyLua |
134
149
  | [`@sebastienrousseau/markdownlint-config`](https://github.com/sebastienrousseau/markdownlint-config) | Markdown document style & structure | markdownlint-cli2 |
135
150
  | [`@sebastienrousseau/mocha-config`](https://github.com/sebastienrousseau/mocha-config) | BDD testing settings & reporting | Mocha 10+ |
136
151
  | [`@sebastienrousseau/oxlint-config`](https://github.com/sebastienrousseau/oxlint-config) | Sub-millisecond Rust JavaScript linting | Oxlint |
152
+ | [`@sebastienrousseau/php-config`](https://github.com/sebastienrousseau/php-config) | PER-CS 2.0, PSR-12 and Level 8 PHPStan | PHP 8.3+ / PHPStan |
137
153
  | [`@sebastienrousseau/playwright-config`](https://github.com/sebastienrousseau/playwright-config) | Cross-browser end-to-end testing | Playwright 1.40+ |
138
154
  | [`@sebastienrousseau/prettier-config`](https://github.com/sebastienrousseau/prettier-config) | Deterministic code formatting | Prettier 3+ |
155
+ | [`@sebastienrousseau/python-config`](https://github.com/sebastienrousseau/python-config) | Hardened Ruff, Black, Flake8, and MyPy rules | Python 3.12+ / Ruff |
156
+ | [`@sebastienrousseau/r-config`](https://github.com/sebastienrousseau/r-config) | Lintr and styler presets for data science | R 4.3+ / lintr |
139
157
  | [`@sebastienrousseau/remark-config`](https://github.com/sebastienrousseau/remark-config) | AST-based markdown verification | Remark 13+ |
158
+ | [`@sebastienrousseau/ruby-config`](https://github.com/sebastienrousseau/ruby-config) | RuboCop and StandardRB rules for Ruby 3.3+ | Ruby 3.3+ / RuboCop |
159
+ | [`@sebastienrousseau/rust-config`](https://github.com/sebastienrousseau/rust-config) | Hardened rustfmt formatting and Clippy lints | Rust 2021 / Clippy |
140
160
  | [`@sebastienrousseau/semantic-release-config`](https://github.com/sebastienrousseau/semantic-release-config) | Tag-driven automated releases & changelogs | semantic-release 24+ |
161
+ | [`@sebastienrousseau/shell-config`](https://github.com/sebastienrousseau/shell-config) | Strict ShellCheck static analysis & shfmt presets | POSIX / Bash / ShellCheck |
141
162
  | [`@sebastienrousseau/size-limit-config`](https://github.com/sebastienrousseau/size-limit-config) | Performance bundle budget enforcement | Size Limit 11+ |
163
+ | [`@sebastienrousseau/sql-config`](https://github.com/sebastienrousseau/sql-config) | Dialect-aware SQLFluff linting & formatting | SQLFluff / ANSI SQL |
142
164
  | [`@sebastienrousseau/stylelint-config`](https://github.com/sebastienrousseau/stylelint-config) | Modern CSS & SCSS quality assurance | Stylelint 16+ |
165
+ | [`@sebastienrousseau/swift-config`](https://github.com/sebastienrousseau/swift-config) | Strict SwiftLint rules & SwiftFormat presets | Swift 5.10 / SwiftLint |
143
166
  | [`@sebastienrousseau/tailwindcss-config`](https://github.com/sebastienrousseau/tailwindcss-config) | Utility-first design tokens & typography | Tailwind CSS 4+ |
144
167
  | [`@sebastienrousseau/tsconfig-config`](https://github.com/sebastienrousseau/tsconfig-config) | Strict type checking & modern module resolution | TypeScript 5+ |
145
168
  | [`@sebastienrousseau/vitest-config`](https://github.com/sebastienrousseau/vitest-config) | Lightning-fast Vite-native unit testing | Vitest 2+ |
169
+ | [`@sebastienrousseau/zig-config`](https://github.com/sebastienrousseau/zig-config) | Hardened ZLS and build formatting rules | Zig 0.13+ / ZLS |
146
170
 
147
171
  To adopt the complete suite with a single import, install the master meta-package:
148
172
 
@@ -158,9 +182,9 @@ Configuration rot is one of the most common vectors for project decay. Ad-hoc to
158
182
 
159
183
  `@sebastienrousseau/tsconfig-config` solves this with three deliberate engineering choices:
160
184
 
161
- 1. **Zero Runtime Dependencies**: The configuration contains only static, serialisable declarative definitions and clean programmatic adapters.
162
- 2. **Dual CJS/ESM Architecture**: Ships dedicated CommonJS (`index.cjs`) and ES Module (`index.mjs`) entrypoints alongside comprehensive TypeScript declarations (`index.d.ts`).
163
- 3. **Deterministic Governance**: Versioned strictly by `+0.0.1` per release, cryptographically signed with published PGP keys, and audited continuously.
185
+ 1. **Zero Runtime Dependencies**: The configuration contains only static, serialisable declarative definitions and clean programmatic adapters.
186
+ 1. **Dual CJS/ESM Architecture**: Ships dedicated CommonJS (`index.cjs`) and ES Module (`index.mjs`) entrypoints alongside comprehensive TypeScript declarations (`index.d.ts`).
187
+ 1. **Deterministic Governance**: Versioned strictly by `+0.0.1` per release, cryptographically signed with published PGP keys, and audited continuously.
164
188
 
165
189
  ---
166
190
 
@@ -233,15 +257,17 @@ make test
233
257
 
234
258
  ## Security
235
259
 
236
- - **Private Reporting**: Report security vulnerabilities by emailing **sebastian.rousseau@gmail.com**. Expect an initial response within 48 hours and a mitigation plan within 7 days.
260
+ - **Private Reporting**: Report security vulnerabilities by emailing **<sebastian.rousseau@gmail.com>**. Expect an initial response within 48 hours and a mitigation plan within 7 days.
237
261
  - **Commit Integrity**: All commits on `main` and release tags are cryptographically signed.
238
- - **Release Signing Key**: The release-signing PGP key is published in [`KEYS.asc`](KEYS.asc):
239
- ```text
240
- 4B7F16C909C7A8EE9BED338A4F047EDF5F90F638
241
- ```
242
- Signing key `Sebastien Rousseau <sebastian.rousseau@gmail.com>`, ed25519, expires 2028-08-16.
262
+ - **Release Signing Key**: The release-signing PGP key is published in [`KEYS.asc`](KEYS.asc).
243
263
  - **Supply Chain**: Monitored continuously via Dependabot, CodeQL, and SLSA provenance. See [`SECURITY.md`](SECURITY.md) for details.
244
264
 
265
+ ```text
266
+ 4B7F16C909C7A8EE9BED338A4F047EDF5F90F638
267
+ ```
268
+
269
+ Signing key `Sebastien Rousseau <sebastian.rousseau@gmail.com>`, ed25519, expires 2028-08-16.
270
+
245
271
  ---
246
272
 
247
273
  ## Documentation
@@ -264,10 +290,10 @@ make test
264
290
 
265
291
  ## Minimum-toolchain policy
266
292
 
267
- The minimum supported Node.js version is **18.0.0**. The floor may raise only when:
293
+ The minimum supported Node.js version is **20.0.0**. The floor may raise only when:
268
294
 
269
- 1. An upstream LTS version reaches official End-of-Life (EOL).
270
- 2. The reason is explicitly recorded in `CHANGELOG.md` and `DEVELOPMENT.md`.
295
+ 1. An upstream LTS version reaches official End-of-Life (EOL).
296
+ 1. The reason is explicitly recorded in `CHANGELOG.md` and `DEVELOPMENT.md`.
271
297
 
272
298
  ---
273
299
 
package/index.cjs CHANGED
@@ -1,3 +1,6 @@
1
+ // SPDX-FileCopyrightText: 2026 Sebastien Rousseau <sebastian.rousseau@gmail.com>
2
+ // SPDX-License-Identifier: Apache-2.0 OR MIT
3
+
1
4
  const base = require("./base.json");
2
5
  const node = require("./node.json");
3
6
  const web = require("./web.json");
package/index.d.ts CHANGED
@@ -1,14 +1,9 @@
1
- export interface TSConfig {
2
- compilerOptions?: Record<string, unknown>;
3
- extends?: string;
4
- include?: string[];
5
- exclude?: string[];
6
- }
1
+ // SPDX-FileCopyrightText: 2026 Sebastien Rousseau <sebastian.rousseau@gmail.com>
2
+ // SPDX-License-Identifier: Apache-2.0 OR MIT
7
3
 
8
- declare const configs: {
9
- base: TSConfig;
10
- node: TSConfig;
11
- web: TSConfig;
12
- };
4
+ export interface TsconfigConfig {
5
+ [key: string]: unknown;
6
+ }
13
7
 
14
- export default configs;
8
+ declare const config: TsconfigConfig;
9
+ export default config;
package/index.js CHANGED
@@ -1 +1,7 @@
1
+ // SPDX-FileCopyrightText: 2026 Sebastien Rousseau <sebastian.rousseau@gmail.com>
2
+ // SPDX-License-Identifier: Apache-2.0 OR MIT
3
+
4
+ "use strict";
5
+
6
+ // Legacy `main` entrypoint; the implementation lives in index.cjs.
1
7
  module.exports = require("./index.cjs");
package/index.mjs CHANGED
@@ -1,12 +1,14 @@
1
- import { createRequire } from "module";
1
+ // SPDX-FileCopyrightText: 2026 Sebastien Rousseau <sebastian.rousseau@gmail.com>
2
+ // SPDX-License-Identifier: Apache-2.0 OR MIT
2
3
 
3
- const require = createRequire(import.meta.url);
4
- const base = require("./base.json");
5
- const node = require("./node.json");
6
- const web = require("./web.json");
4
+ /**
5
+ * ESM entrypoint.
6
+ *
7
+ * The configuration is defined once, in `index.cjs`, and re-exported here so the
8
+ * two module systems cannot drift apart. Node resolves a CommonJS default import
9
+ * to `module.exports`, which is exactly the value consumers of the CJS entry get.
10
+ */
7
11
 
8
- export default {
9
- base,
10
- node,
11
- web,
12
- };
12
+ import config from "./index.cjs";
13
+
14
+ export default config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sebastienrousseau/tsconfig-config",
3
- "version": "0.0.3",
3
+ "version": "0.0.9",
4
4
  "description": "Shared TypeScript compiler configuration rules adhering to modern 2026 standards",
5
5
  "author": "Sebastien Rousseau <sebastienrousseau@users.noreply.github.com>",
6
6
  "license": "Apache-2.0 OR MIT",
@@ -47,16 +47,31 @@
47
47
  "access": "public"
48
48
  },
49
49
  "scripts": {
50
- "test": "node --test --experimental-test-coverage --test-coverage-exclude=\"tests/**\" --test-coverage-lines=98 --test-coverage-branches=98 --test-coverage-functions=98 tests/unit.test.js tests/integration.test.js tests/bench.test.js",
51
- "test:coverage": "node --test --experimental-test-coverage --test-coverage-exclude=\"tests/**\" --test-coverage-lines=98 --test-coverage-branches=98 --test-coverage-functions=98 tests/unit.test.js tests/integration.test.js tests/bench.test.js",
50
+ "test": "node --test tests/conformance.test.js tests/bench.test.js",
52
51
  "bench": "node benches/bench_load.js",
53
52
  "examples": "node examples/basic.js && node examples/advanced.js && node examples/features.js && node examples/esm.mjs",
54
- "docs:build": "bash scripts/build-docs.sh"
53
+ "docs:build": "bash scripts/build-docs.sh",
54
+ "test:conformance": "node --test tests/conformance.test.js",
55
+ "fuzz": "node fuzz/fuzz_config.js"
55
56
  },
56
57
  "peerDependencies": {
57
58
  "typescript": ">=5.0.0"
58
59
  },
59
60
  "devDependencies": {
61
+ "@sebastienrousseau/config-kit": "^0.0.8",
60
62
  "typescript": "^7.0.2"
63
+ },
64
+ "engines": {
65
+ "node": ">=20.0.0"
66
+ },
67
+ "sideEffects": false,
68
+ "configKit": {
69
+ "shape": "object",
70
+ "presets": [
71
+ "base.json",
72
+ "node.json",
73
+ "web.json"
74
+ ],
75
+ "validate": "typescript-tsconfig"
61
76
  }
62
77
  }