@dnd-mapp/config-prettier 1.0.0 → 1.1.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/CHANGELOG.md +10 -1
- package/README.md +22 -3
- package/configs/base.d.ts +4 -0
- package/configs/base.js +1 -2
- package/configs/organize-imports.d.ts +4 -0
- package/configs/organize-imports.js +7 -0
- package/index.d.ts +4 -0
- package/index.js +4 -1
- package/package.json +20 -4
package/CHANGELOG.md
CHANGED
|
@@ -6,11 +6,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [1.1.0] - 2026-09-20
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- `organize-imports` config, available as `@dnd-mapp/config-prettier/organize-imports`. It extends `base` with `prettier-plugin-organize-imports`.
|
|
14
|
+
- Type declarations for every config. Each one is typed as a Prettier `Config`.
|
|
15
|
+
- `prettier-plugin-organize-imports` and `typescript` as optional peer dependencies. Install them to use the `organize-imports` config.
|
|
16
|
+
|
|
9
17
|
## [1.0.0] - 2026-09-20
|
|
10
18
|
|
|
11
19
|
### Added
|
|
12
20
|
|
|
13
21
|
- `base` config, available as `@dnd-mapp/config-prettier` and `@dnd-mapp/config-prettier/base`.
|
|
14
22
|
|
|
15
|
-
[Unreleased]: https://github.com/dnd-mapp/config-prettier/compare/v1.
|
|
23
|
+
[Unreleased]: https://github.com/dnd-mapp/config-prettier/compare/v1.1.0...HEAD
|
|
24
|
+
[1.1.0]: https://github.com/dnd-mapp/config-prettier/releases/tag/v1.1.0
|
|
16
25
|
[1.0.0]: https://github.com/dnd-mapp/config-prettier/releases/tag/v1.0.0
|
package/README.md
CHANGED
|
@@ -37,12 +37,31 @@ export default {
|
|
|
37
37
|
|
|
38
38
|
## Available configs
|
|
39
39
|
|
|
40
|
-
| Config
|
|
41
|
-
|
|
42
|
-
| `base`
|
|
40
|
+
| Config | Import path | Description |
|
|
41
|
+
|:-------------------|:---------------------------------------------|:------------------------------------------------|
|
|
42
|
+
| `base` | `@dnd-mapp/config-prettier/base` | The default config for any project |
|
|
43
|
+
| `organize-imports` | `@dnd-mapp/config-prettier/organize-imports` | Extends `base` with the organize imports plugin |
|
|
43
44
|
|
|
44
45
|
The package root, `@dnd-mapp/config-prettier`, resolves to `base`.
|
|
45
46
|
|
|
47
|
+
Every config ships with type declarations. Each one is typed as a Prettier `Config`, so it works in a `prettier.config.ts` file.
|
|
48
|
+
|
|
49
|
+
### `organize-imports`
|
|
50
|
+
|
|
51
|
+
This config includes everything from `base` and adds [`prettier-plugin-organize-imports`](https://github.com/simonhaenisch/prettier-plugin-organize-imports). The plugin sorts and removes unused imports when Prettier formats a file.
|
|
52
|
+
|
|
53
|
+
The plugin is an optional peer dependency, so install it together with `typescript`, which it requires. The supported versions are `prettier-plugin-organize-imports` 4 and `typescript` 6.
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
pnpm add --save-dev prettier prettier-plugin-organize-imports typescript @dnd-mapp/config-prettier
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Then re-export the config from a `prettier.config.js` file.
|
|
60
|
+
|
|
61
|
+
```js
|
|
62
|
+
export { default } from '@dnd-mapp/config-prettier/organize-imports';
|
|
63
|
+
```
|
|
64
|
+
|
|
46
65
|
## What `base` sets
|
|
47
66
|
|
|
48
67
|
| Option | Value | Description |
|
package/configs/base.js
CHANGED
package/index.d.ts
ADDED
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dnd-mapp/config-prettier",
|
|
3
3
|
"description": "Prettier configuration shared across D&D Mapp projects.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"author": "D&D Mapp",
|
|
@@ -21,8 +21,14 @@
|
|
|
21
21
|
"url": "git+https://github.com/dnd-mapp/config-prettier.git"
|
|
22
22
|
},
|
|
23
23
|
"exports": {
|
|
24
|
-
".":
|
|
25
|
-
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./index.d.ts",
|
|
26
|
+
"default": "./index.js"
|
|
27
|
+
},
|
|
28
|
+
"./*": {
|
|
29
|
+
"types": "./configs/*.d.ts",
|
|
30
|
+
"default": "./configs/*.js"
|
|
31
|
+
},
|
|
26
32
|
"./package.json": "./package.json"
|
|
27
33
|
},
|
|
28
34
|
"publishConfig": {
|
|
@@ -32,6 +38,16 @@
|
|
|
32
38
|
"node": "^24.21.0"
|
|
33
39
|
},
|
|
34
40
|
"peerDependencies": {
|
|
35
|
-
"prettier": "^3"
|
|
41
|
+
"prettier": "^3",
|
|
42
|
+
"prettier-plugin-organize-imports": "^4",
|
|
43
|
+
"typescript": "^6"
|
|
44
|
+
},
|
|
45
|
+
"peerDependenciesMeta": {
|
|
46
|
+
"prettier-plugin-organize-imports": {
|
|
47
|
+
"optional": true
|
|
48
|
+
},
|
|
49
|
+
"typescript": {
|
|
50
|
+
"optional": true
|
|
51
|
+
}
|
|
36
52
|
}
|
|
37
53
|
}
|