Skip to content

Commit fb2c1ca

Browse files
committed
feat(lint-staged): introduce shared configs
1 parent 61221f9 commit fb2c1ca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+402
-256
lines changed

.changeset/dull-yaks-switch.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@apitree.cz/lint-staged-config': patch
3+
'@apitree.cz/prettier-config': patch
4+
'@apitree.cz/testing-library': patch
5+
'@apitree.cz/typedoc-config': patch
6+
'@apitree.cz/eslint-config': patch
7+
'@apitree.cz/vitest-config': patch
8+
'@apitree.cz/ts-config': patch
9+
'@apitree.cz/ts-utils': patch
10+
'@apitree.cz/cli': patch
11+
---
12+
13+
Add package keywords.

.changeset/heavy-zoos-impress.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@apitree.cz/lint-staged-config': minor
3+
---
4+
5+
Introduce shared configurations for `lint-staged`:
6+
7+
- `root` – configuration for monorepo root
8+
- `workspace` – configuration for monorepo workspace
9+
- `singlePackage` – configuration for single package repository

.changeset/sweet-knives-share.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@apitree.cz/eslint-config': patch
3+
---
4+
5+
Add `monorepo` rule set allowing extraneous imports in `lint-staged.config.js` and `typedoc.config.js`.

lint-staged.config.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
export default {
2-
'./.changeset/**/*.{json,md}': 'prettier --write',
3-
'./.github/**/*.{yml,yaml}': 'prettier --write',
4-
'./*.js': 'eslint --cache --fix',
5-
'./*.{js,json,md,yml,yaml}': 'prettier --write',
6-
};
1+
export { root as default } from '@apitree.cz/lint-staged-config';

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"build": "turbo run build --no-daemon",
1818
"cleanup": "turbo run cleanup --no-daemon",
1919
"postcleanup": "del .eslintcache .turbo tsconfig.tsbuildinfo node_modules",
20+
"docs": "turbo run docs --no-daemon",
2021
"fix": "turbo run fix --no-daemon",
2122
"postfix": "run-p postts postformat:fix postlint:fix",
2223
"format": "turbo run format --no-daemon --parallel",
@@ -45,8 +46,10 @@
4546
"devDependencies": {
4647
"@apitree.cz/cli": "workspace:*",
4748
"@apitree.cz/eslint-config": "workspace:*",
49+
"@apitree.cz/lint-staged-config": "workspace:*",
4850
"@apitree.cz/prettier-config": "workspace:*",
4951
"@apitree.cz/ts-config": "workspace:*",
52+
"@apitree.cz/typedoc-config": "workspace:*",
5053
"@changesets/cli": "^2.27.12",
5154
"@commitlint/cli": "^19.6.1",
5255
"@commitlint/config-conventional": "^19.6.0",
@@ -59,6 +62,7 @@
5962
"lint-staged": "^15.4.3",
6063
"prettier": "^3.4.2",
6164
"turbo": "^2.3.4",
65+
"typedoc": "^0.27.6",
6266
"typescript": "^5.7.3"
6367
},
6468
"packageManager": "[email protected]",

packages/cli/docs/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
# @apitree.cz/cli
1+
**@apitree.cz/cli**
2+
3+
---
24

3-
## Table of contents
5+
# @apitree.cz/cli
46

5-
### Interfaces
7+
## Interfaces
68

79
- [SyncProjectReferencesConfig](interfaces/SyncProjectReferencesConfig.md)
810
- [SyncProjectReferencesHooks](interfaces/SyncProjectReferencesHooks.md)
Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,27 @@
1-
# Interface: SyncProjectReferencesConfig
1+
[**@apitree.cz/cli**](../README.md)
22

3-
## Table of contents
3+
---
44

5-
### Properties
5+
# Interface: SyncProjectReferencesConfig
66

7-
- [hooks](SyncProjectReferencesConfig.md#hooks)
8-
- [tsConfigs](SyncProjectReferencesConfig.md#tsconfigs)
7+
Defined in: [types.ts:24](https://github.com/ApiTreeCZ/toolbox/blob/main/packages/cli/src/commands/sync-project-references/types.ts#L24)
98

109
## Properties
1110

12-
### hooks
11+
### hooks?
1312

14-
`Optional` **hooks**: [`SyncProjectReferencesHooks`](SyncProjectReferencesHooks.md)
15-
16-
Custom hooks to run as parts of the sync process.
13+
> `optional` **hooks**: [`SyncProjectReferencesHooks`](SyncProjectReferencesHooks.md)
1714
18-
#### Defined in
15+
Defined in: [types.ts:28](https://github.com/ApiTreeCZ/toolbox/blob/main/packages/cli/src/commands/sync-project-references/types.ts#L28)
1916

20-
[commands/sync-project-references/types.ts:38](https://github.com/ApiTreeCZ/toolbox/blob/develop/packages/cli/src/commands/sync-project-references/types.ts#L38)
17+
Custom hooks to run as parts of the sync process.
2118

2219
---
2320

24-
### tsConfigs
25-
26-
`Optional` **tsConfigs**: [`SyncProjectReferencesTsConfigs`](SyncProjectReferencesTsConfigs.md)
21+
### tsConfigs?
2722

28-
Custom names for TS config files.
23+
> `optional` **tsConfigs**: [`SyncProjectReferencesTsConfigs`](SyncProjectReferencesTsConfigs.md)
2924
30-
#### Defined in
25+
Defined in: [types.ts:32](https://github.com/ApiTreeCZ/toolbox/blob/main/packages/cli/src/commands/sync-project-references/types.ts#L32)
3126

32-
[commands/sync-project-references/types.ts:42](https://github.com/ApiTreeCZ/toolbox/blob/develop/packages/cli/src/commands/sync-project-references/types.ts#L42)
27+
Custom names for TS config files.
Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
1-
# Interface: SyncProjectReferencesHooks
1+
[**@apitree.cz/cli**](../README.md)
22

3-
## Table of contents
3+
---
44

5-
### Properties
5+
# Interface: SyncProjectReferencesHooks
66

7-
- [afterSync](SyncProjectReferencesHooks.md#aftersync)
7+
Defined in: [types.ts:3](https://github.com/ApiTreeCZ/toolbox/blob/main/packages/cli/src/commands/sync-project-references/types.ts#L3)
88

99
## Properties
1010

11-
### afterSync
11+
### afterSync?
12+
13+
> `optional` **afterSync**: `string`[]
1214
13-
`Optional` **afterSync**: `string`[]
15+
Defined in: [types.ts:8](https://github.com/ApiTreeCZ/toolbox/blob/main/packages/cli/src/commands/sync-project-references/types.ts#L8)
1416

1517
Hook called after the project references are synced.
1618

17-
**`Default Value`**
19+
#### Default Value
1820

1921
`['prettier --write']`
20-
21-
#### Defined in
22-
23-
[commands/sync-project-references/types.ts:8](https://github.com/ApiTreeCZ/toolbox/blob/develop/packages/cli/src/commands/sync-project-references/types.ts#L8)
Lines changed: 13 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,35 @@
1-
# Interface: SyncProjectReferencesTsConfigs
1+
[**@apitree.cz/cli**](../README.md)
22

3-
## Table of contents
3+
---
44

5-
### Properties
5+
# Interface: SyncProjectReferencesTsConfigs
66

7-
- [build](SyncProjectReferencesTsConfigs.md#build)
8-
- [cjs](SyncProjectReferencesTsConfigs.md#cjs)
9-
- [default](SyncProjectReferencesTsConfigs.md#default)
10-
- [esm](SyncProjectReferencesTsConfigs.md#esm)
7+
Defined in: [types.ts:11](https://github.com/ApiTreeCZ/toolbox/blob/main/packages/cli/src/commands/sync-project-references/types.ts#L11)
118

129
## Properties
1310

14-
### build
11+
### build?
12+
13+
> `optional` **build**: `string`
1514
16-
`Optional` **build**: `string`
15+
Defined in: [types.ts:21](https://github.com/ApiTreeCZ/toolbox/blob/main/packages/cli/src/commands/sync-project-references/types.ts#L21)
1716

1817
Name of the TS config file for build.
1918

20-
**`Default Value`**
19+
#### Default Value
2120

2221
`'tsconfig.build.json'`
2322

24-
#### Defined in
25-
26-
[commands/sync-project-references/types.ts:21](https://github.com/ApiTreeCZ/toolbox/blob/develop/packages/cli/src/commands/sync-project-references/types.ts#L21)
27-
2823
---
2924

30-
### cjs
31-
32-
`Optional` **cjs**: `string`
25+
### default?
3326

34-
Name of the TS config file for CJS build (ambient modules only).
35-
36-
**`Default Value`**
37-
38-
`'tsconfig.cjs.build.json'`
39-
40-
#### Defined in
41-
42-
[commands/sync-project-references/types.ts:26](https://github.com/ApiTreeCZ/toolbox/blob/develop/packages/cli/src/commands/sync-project-references/types.ts#L26)
43-
44-
---
27+
> `optional` **default**: `string`
4528
46-
### default
47-
48-
`Optional` **default**: `string`
29+
Defined in: [types.ts:16](https://github.com/ApiTreeCZ/toolbox/blob/main/packages/cli/src/commands/sync-project-references/types.ts#L16)
4930

5031
Name of the main TS config file.
5132

52-
**`Default Value`**
33+
#### Default Value
5334

5435
`'tsconfig.json'`
55-
56-
#### Defined in
57-
58-
[commands/sync-project-references/types.ts:16](https://github.com/ApiTreeCZ/toolbox/blob/develop/packages/cli/src/commands/sync-project-references/types.ts#L16)
59-
60-
---
61-
62-
### esm
63-
64-
`Optional` **esm**: `string`
65-
66-
Name of the TS config file for ESM build (ambient modules only).
67-
68-
**`Default Value`**
69-
70-
`'tsconfig.esm.build.json'`
71-
72-
#### Defined in
73-
74-
[commands/sync-project-references/types.ts:31](https://github.com/ApiTreeCZ/toolbox/blob/develop/packages/cli/src/commands/sync-project-references/types.ts#L31)
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
# Interface: WorkspacePackageProps
1+
[**@apitree.cz/cli**](../README.md)
22

3-
## Table of contents
3+
---
44

5-
### Properties
5+
# Interface: WorkspacePackageProps
66

7-
- [workspacePackage](WorkspacePackageProps.md#workspacepackage)
7+
Defined in: [types.ts:35](https://github.com/ApiTreeCZ/toolbox/blob/main/packages/cli/src/commands/sync-project-references/types.ts#L35)
88

99
## Properties
1010

1111
### workspacePackage
1212

13-
**workspacePackage**: `Package`
13+
> **workspacePackage**: `Package`
1414
15-
Workspace package.
15+
Defined in: [types.ts:39](https://github.com/ApiTreeCZ/toolbox/blob/main/packages/cli/src/commands/sync-project-references/types.ts#L39)
1616

17-
#### Defined in
18-
19-
[commands/sync-project-references/types.ts:49](https://github.com/ApiTreeCZ/toolbox/blob/develop/packages/cli/src/commands/sync-project-references/types.ts#L49)
17+
Workspace package.

0 commit comments

Comments
 (0)