Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions .changeset/honest-onions-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@apitree.cz/ts-config': minor
---

BREAKING: Drop CJS support completely.

Added `node` config for Node.js services and apps.
12 changes: 12 additions & 0 deletions .changeset/nervous-jars-jam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'@apitree.cz/prettier-config': patch
'@apitree.cz/testing-library': patch
'@apitree.cz/typedoc-config': patch
'@apitree.cz/eslint-config': patch
'@apitree.cz/vitest-config': patch
'@apitree.cz/ts-config': patch
'@apitree.cz/ts-utils': patch
'@apitree.cz/cli': patch
---

Upgrade dependencies to latest version.
5 changes: 5 additions & 0 deletions .changeset/silent-seals-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@apitree.cz/testing-library': minor
---

BREAKING: Migrate to `react@19` and `vitest@3`.
5 changes: 5 additions & 0 deletions .changeset/tender-dolls-grab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@apitree.cz/vitest-config': minor
---

BREAKING: Migrate to `vitest@3`.
11 changes: 11 additions & 0 deletions .changeset/violet-bears-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@apitree.cz/eslint-config': minor
---

BREAKING:

- migrate to `eslint@9` and flat config
- migrate to `react@19`
- drop CJS support completely

This package is now pure ESM.-
7 changes: 0 additions & 7 deletions .eslintrc.cjs

This file was deleted.

6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ Powered by [Turbo](https://turbo.build/repo/docs)

### Prerequisites

- node.js `>=20`
- pnpm `>=8`

> **Note:** This repository contains [pure ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) packages.
- node.js `v22`
- pnpm `v10`

### Installation

Expand Down
2 changes: 1 addition & 1 deletion commitlint.config.cjs → commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
export default {
extends: '@commitlint/config-conventional',
};
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { base, react } from '@apitree.cz/eslint-config';

export default [...base, ...react];
34 changes: 16 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "apitree.cz-toolbox",
"version": "0.0.0",
"private": true,
"description": "Shared configuration and utilities for ApiTree projects.",
"description": "Shared configurations and utilities for ApiTree projects.",
"repository": {
"type": "git",
"url": "https://github.com/ApiTreeCZ/toolbox"
Expand All @@ -13,31 +13,29 @@
"Vít Rozsíval <[email protected]"
],
"type": "module",
"workspaces": [
"./packages/*"
],
"scripts": {
"build": "turbo run build",
"cleanup": "turbo run cleanup",
"build": "turbo run build --no-daemon",
"cleanup": "turbo run cleanup --no-daemon",
"postcleanup": "del .eslintcache tsconfig.tsbuildinfo node_modules",
"fix": "turbo run fix",
"fix": "turbo run fix --no-daemon",
"postfix": "run-p postts postformat:fix postlint:fix",
"format": "turbo run format --parallel",
"format": "turbo run format --no-daemon --parallel",
"format:fix": "turbo run format:fix --no-daemon --parallel",
"postformat": "prettier --check \"./*.{json,md,yaml}\" \".github/**/*.yaml\"",
"format:fix": "turbo run format:fix --parallel",
"postformat:fix": "pnpm run postformat --write",
"postinstall": "manypkg check",
"lint": "turbo run lint",
"postlint": "eslint --cache \"./*.{cjs,js}\"",
"lint:fix": "turbo run lint:fix",
"lint": "turbo run lint --no-daemon",
"lint:fix": "turbo run lint:fix --no-daemon",
"postlint": "eslint --cache ./*.js",
"postlint:fix": "pnpm run postlint --fix",
"prepare": "is-ci || run-s prepare:husky build sync-project-references",
"prepare:husky": "husky",
"qa": "turbo run qa",
"qa": "turbo run qa --no-daemon",
"postqa": "run-p postts postlint postformat",
"sync-project-references": "apitree sync-project-references",
"test": "turbo run test",
"ts": "turbo run ts",
"test": "turbo run test --no-daemon",
"test:coverage": "turbo run test:coverage --no-daemon",
"ts": "turbo run ts --no-daemon",
"postts": "tsc --project tsconfig.json"
},
"devDependencies": {
Expand All @@ -49,15 +47,15 @@
"@commitlint/cli": "^19.6.1",
"@commitlint/config-conventional": "^19.6.0",
"@manypkg/cli": "0.23.0",
"@types/node": "^22.10.5",
"@types/node": "^22.12.0",
"del-cli": "^6.0.0",
"eslint": "^8.57.1",
"eslint": "^9.19.0",
"husky": "^9.1.7",
"is-ci": "^4.1.0",
"lint-staged": "^15.3.0",
"npm-run-all2": "^7.0.2",
"prettier": "^3.4.2",
"turbo": "^2.3.3",
"turbo": "^2.3.4",
"typescript": "^5.7.3"
},
"packageManager": "[email protected]",
Expand Down
7 changes: 0 additions & 7 deletions packages/cli/.eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"fix": "run-p ts format:fix lint:fix",
"format": "prettier --check \"./**/*.{json,md}\"",
"format:fix": "pnpm run format --write",
"lint": "eslint --cache --ext cjs,js,ts .",
"lint": "eslint --cache .",
"lint:fix": "pnpm run lint --fix",
"qa": "run-p ts format lint",
"ts": "tsc --build tsconfig.json"
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/src/commands/sync-project-references/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export const action = async ({ config }: ActionProps) => {
});
});
if (sync.length === 0) {
return logger.warn('No project references to sync.');
logger.warn('No project references to sync.');
return;
}
const paths = await Promise.all(sync);
await runHooks(hooks, paths.flat());
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "@apitree.cz/ts-config/library",
"include": [".eslintrc.cjs", "./*.js", "bin/**/*", "src/**/*"],
"include": ["./*.js", "bin/**/*", "src/**/*"],
"exclude": ["dist", "node_modules"],
"references": [{ "path": "../ts-utils/tsconfig.build.json" }, { "path": "../typedoc-config/tsconfig.build.json" }]
}
10 changes: 0 additions & 10 deletions packages/eslint-config/.eslintrc.js

This file was deleted.

67 changes: 28 additions & 39 deletions packages/eslint-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,64 +18,53 @@ pnpm add --save-dev @apitree.cz/eslint-config eslint

## Usage

Use one of the following configurations in your `.eslintrc.cjs`:
Use one of the following configurations in your repository's root `eslint.config.js` file.

### Base

```javascript
module.exports = {
extends: '@apitree.cz',
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
};
```

### CommonJS

```javascript
module.exports = {
extends: '@apitree.cz/eslint-config/cjs',
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
};
export { base as default } from '@apitree.cz/eslint-config';
```

### React

```javascript
module.exports = {
extends: '@apitree.cz/eslint-config/react',
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
};
import { base, react } from '@apitree.cz/eslint-config';

export default [...base, ...react];
```

### Next.js

Next.js configuration requires to specify the path to the app(s).

```javascript
module.exports = {
extends: '@apitree.cz/eslint-config/nextjs',
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
import { base, react, nextjs } from '@apitree.cz/eslint-config';

export default [
...base,
...react,
{
files: ['apps/*/<next-js-app-name>/**/*'],
// or `files: ['**/*.{ts,tsx}']` in single-app repo
...nextjs,
},
};
];
```

### Nest.js

Nest.js configuration requires to specify the path to the app(s).

```javascript
module.exports = {
extends: '@apitree.cz/eslint-config/nestjs',
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
import { base, nestjs } from '@apitree.cz/eslint-config';

export default [
...base,
{
files: ['apps/*/<nest-js-app-name>/**/*'],
// or `files: ['**/*.ts']` in single-app repo
...nestjs,
},
};
];
```
1 change: 0 additions & 1 deletion packages/eslint-config/base.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/eslint-config/cjs.js

This file was deleted.

2 changes: 0 additions & 2 deletions packages/eslint-config/index.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/eslint-config/index.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/eslint-config/lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
'./**/*.js': 'eslint --cache --fix',
'./**/*.{json,md}': 'prettier --write',
'./**/*.ts': [() => 'tsc --build tsconfig.json', 'eslint --cache --fix'],
Expand Down
1 change: 0 additions & 1 deletion packages/eslint-config/nestjs.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/eslint-config/nextjs.js

This file was deleted.

Loading