Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPM Package: Introduce @wordpress/ts-config #69030

Open
wants to merge 33 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d82c9c0
feat: Add initial configurations for ts-config package
im3dabasia Feb 4, 2025
e969760
feat: Add docs for ts-config
im3dabasia Feb 4, 2025
c09720e
revert: Package-lock changes
im3dabasia Feb 4, 2025
e97b036
feat: Use ts-config for keycodes package
im3dabasia Feb 4, 2025
e6642e4
feat: Use ts-config for url package
im3dabasia Feb 5, 2025
8d5ca3a
feat: Use ts-config for autop package
im3dabasia Feb 5, 2025
a72e5bb
feat: Use ts-config for fields package
im3dabasia Feb 5, 2025
79b12d7
feat: Use ts-config for date package
im3dabasia Feb 5, 2025
85bc390
feat: Use ts-config for eslint-plugin package
im3dabasia Feb 5, 2025
616282a
feat: Use ts-config for element package
im3dabasia Feb 5, 2025
5417a1c
feat: Use ts-config for block-editor package
im3dabasia Feb 5, 2025
30e81b2
feat: Use ts-config for bin package
im3dabasia Feb 5, 2025
0c91e5d
feat: Use ts-config for primitives package
im3dabasia Feb 5, 2025
a6a574f
feat: Use ts-config for i18n package
im3dabasia Feb 5, 2025
3aaa383
feat: Use ts-config for icons package
im3dabasia Feb 5, 2025
d182859
feat: Use ts-config for api-fetch package
im3dabasia Feb 5, 2025
c73e832
feat: Use ts-config for docgen package
im3dabasia Feb 5, 2025
f101372
feat: Use ts-config for react-i18n package
im3dabasia Feb 5, 2025
37f7886
feat: Use ts-config for interactivity-router package
im3dabasia Feb 5, 2025
fbf0ab1
feat: Use ts-config for date package
im3dabasia Feb 5, 2025
e811c8e
feat: Use ts-config for lazy-import package
im3dabasia Feb 5, 2025
5217e7a
feat: Use ts-config for a11y package
im3dabasia Feb 5, 2025
5d9969a
feat: Use ts-config for shortcode package
im3dabasia Feb 5, 2025
d74bbc5
feat: Use ts-config for core-data package
im3dabasia Feb 5, 2025
fdd9d42
feat: Use ts-config for test/e2e
im3dabasia Feb 5, 2025
54b775a
feat: Use ts-config for e2e-test-utils-playwright package
im3dabasia Feb 5, 2025
eb2d3af
feat: Use ts-config for packages with types
im3dabasia Feb 5, 2025
69d1ac2
feat: Use ts-config for priority-queue package
im3dabasia Feb 5, 2025
d306a16
feat: Use ts-config for report-flaky-tests package
im3dabasia Feb 5, 2025
5dab93e
feat: Update packages to use ts-config package
im3dabasia Feb 7, 2025
01bbb3b
doc: Update README.md
im3dabasia Feb 7, 2025
105a27f
doc: Updated changelog.md
im3dabasia Feb 7, 2025
67ea1ea
revert: Changelog entry
im3dabasia Feb 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"esModuleInterop": true,
Expand Down
6 changes: 6 additions & 0 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -1961,6 +1961,12 @@
"markdown_source": "../packages/token-list/README.md",
"parent": "packages"
},
{
"title": "@wordpress/ts-config",
"slug": "packages-ts-config",
"markdown_source": "../packages/ts-config/README.md",
"parent": "packages"
},
{
"title": "@wordpress/undo-manager",
"slug": "packages-undo-manager",
Expand Down
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ A `tsconfig.json` file should look like the following (comments are not necessar
```jsonc
{
// Extends a base configuration common to most packages
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",

// Options for the TypeScript compiler
// We'll usually set our `rootDir` and `declarationDir` as follows, which is specific
Expand Down
2 changes: 1 addition & 1 deletion packages/a11y/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"references": [ { "path": "../dom-ready" }, { "path": "../i18n" } ]
}
2 changes: 1 addition & 1 deletion packages/api-fetch/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"references": [ { "path": "../i18n" }, { "path": "../url" } ],
"exclude": [ "**/test" ]
}
2 changes: 1 addition & 1 deletion packages/autop/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"references": [ { "path": "../dom-ready" } ]
}
2 changes: 1 addition & 1 deletion packages/blob/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json"
"extends": "@wordpress/ts-config/tsconfig.base.json"
}
2 changes: 1 addition & 1 deletion packages/block-editor/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"references": [
{ "path": "../a11y" },
{ "path": "../api-fetch" },
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"types": [ "gutenberg-env" ],
"strictNullChecks": true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json"
"extends": "@wordpress/ts-config/tsconfig.base.json"
}
2 changes: 1 addition & 1 deletion packages/components/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"types": [
"gutenberg-env",
Expand Down
2 changes: 1 addition & 1 deletion packages/compose/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"rootDir": "src",
"declarationDir": "build-types",
Expand Down
2 changes: 1 addition & 1 deletion packages/core-data/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"checkJs": false,
"noImplicitAny": false
Expand Down
2 changes: 1 addition & 1 deletion packages/data-controls/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"types": [ "gutenberg-env" ]
},
Expand Down
2 changes: 1 addition & 1 deletion packages/data/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"checkJs": false
},
Expand Down
2 changes: 1 addition & 1 deletion packages/dataviews/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"types": [
"gutenberg-env",
Expand Down
2 changes: 1 addition & 1 deletion packages/date/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"references": [ { "path": "../deprecated" } ]
}
2 changes: 1 addition & 1 deletion packages/deprecated/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"references": [ { "path": "../hooks" } ]
}
2 changes: 1 addition & 1 deletion packages/docgen/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"rootDir": "lib"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/dom-ready/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json"
"extends": "@wordpress/ts-config/tsconfig.base.json"
}
2 changes: 1 addition & 1 deletion packages/dom/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"types": [ "gutenberg-env" ]
},
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-test-utils-playwright/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"incremental": false,
"composite": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-site/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"references": [
{ "path": "../a11y" },
{ "path": "../api-fetch" },
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"checkJs": false
},
Expand Down
2 changes: 1 addition & 1 deletion packages/element/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"noImplicitAny": false,
"strictNullChecks": false
Expand Down
2 changes: 1 addition & 1 deletion packages/escape-html/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json"
"extends": "@wordpress/ts-config/tsconfig.base.json"
}
2 changes: 1 addition & 1 deletion packages/eslint-plugin/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"module": "CommonJS",
"rootDir": "rules"
Expand Down
2 changes: 1 addition & 1 deletion packages/fields/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"checkJs": false
},
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"types": [ "gutenberg-env" ]
}
Expand Down
2 changes: 1 addition & 1 deletion packages/html-entities/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json"
"extends": "@wordpress/ts-config/tsconfig.base.json"
}
2 changes: 1 addition & 1 deletion packages/i18n/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"references": [ { "path": "../hooks" } ]
}
2 changes: 1 addition & 1 deletion packages/icons/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"references": [ { "path": "../element" }, { "path": "../primitives" } ]
}
2 changes: 1 addition & 1 deletion packages/interactivity-router/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"checkJs": false,
"strict": false
Expand Down
2 changes: 1 addition & 1 deletion packages/interactivity/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"noImplicitAny": false
}
Expand Down
2 changes: 1 addition & 1 deletion packages/interactivity/tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"noEmit": true,
"emitDeclarationOnly": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/is-shallow-equal/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json"
"extends": "@wordpress/ts-config/tsconfig.base.json"
}
2 changes: 1 addition & 1 deletion packages/keycodes/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"references": [ { "path": "../i18n" } ]
}
2 changes: 1 addition & 1 deletion packages/lazy-import/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"rootDir": "lib",
"useUnknownInCatchVariables": false
Expand Down
2 changes: 1 addition & 1 deletion packages/media-utils/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"types": [ "gutenberg-env" ],
"checkJs": false
Expand Down
2 changes: 1 addition & 1 deletion packages/notices/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"types": [ "gutenberg-env" ],
"checkJs": false
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"types": [ "gutenberg-env" ]
},
Expand Down
2 changes: 1 addition & 1 deletion packages/prettier-config/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"rootDir": "lib",
"types": [ "node" ]
Expand Down
2 changes: 1 addition & 1 deletion packages/primitives/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"references": [ { "path": "../element" } ]
}
2 changes: 1 addition & 1 deletion packages/priority-queue/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"types": [ "requestidlecallback" ]
}
Expand Down
2 changes: 1 addition & 1 deletion packages/private-apis/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"types": [ "gutenberg-env" ]
}
Expand Down
2 changes: 1 addition & 1 deletion packages/project-management-automation/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"compilerOptions": {
"rootDir": "lib",
"types": [ "node" ]
Expand Down
2 changes: 1 addition & 1 deletion packages/react-i18n/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"extends": "@wordpress/ts-config/tsconfig.base.json",
"references": [ { "path": "../element" }, { "path": "../i18n" } ]
}
2 changes: 1 addition & 1 deletion packages/redux-routine/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json"
"extends": "@wordpress/ts-config/tsconfig.base.json"
}
Loading
Loading