@diogozx-org/prettier-config 0.0.0-stage → 1.0.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.
Files changed (3) hide show
  1. package/README.md +39 -2
  2. package/index.js +11 -0
  3. package/package.json +33 -4
package/README.md CHANGED
@@ -1,3 +1,40 @@
1
- # Temporary Holding Version
1
+ # @diogozx-org/prettier-config
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Shared Prettier formatting defaults for TypeScript and frontend projects.
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ npm install --save-dev @diogozx-org/prettier-config prettier
9
+ ```
10
+
11
+ Create `prettier.config.mjs`:
12
+
13
+ ```js
14
+ import config from "@diogozx-org/prettier-config";
15
+
16
+ export default config;
17
+ ```
18
+
19
+ The shared defaults use semicolons, double quotes, trailing commas, two-space indentation, an 80-column print width, and LF line endings. A project may extend the config for a documented migration or tool-specific need; avoid maintaining a second full copy of the shared options.
20
+
21
+ For example, a legacy backend that currently uses single quotes can temporarily extend the config:
22
+
23
+ ```js
24
+ import config from "@diogozx-org/prettier-config";
25
+
26
+ export default {
27
+ ...config,
28
+ singleQuote: true,
29
+ };
30
+ ```
31
+
32
+ ## Development
33
+
34
+ ```sh
35
+ npm test
36
+ ```
37
+
38
+ ## License
39
+
40
+ MIT
package/index.js ADDED
@@ -0,0 +1,11 @@
1
+ /** @type {import("prettier").Config} */
2
+ const config = {
3
+ semi: true,
4
+ singleQuote: false,
5
+ trailingComma: "all",
6
+ printWidth: 80,
7
+ tabWidth: 2,
8
+ endOfLine: "lf",
9
+ };
10
+
11
+ export default config;
package/package.json CHANGED
@@ -1,6 +1,35 @@
1
1
  {
2
2
  "name": "@diogozx-org/prettier-config",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "Shared Prettier formatting conventions for TypeScript and frontend projects",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": "./index.js",
8
+ "./package.json": "./package.json"
9
+ },
10
+ "files": [
11
+ "index.js",
12
+ "README.md"
13
+ ],
14
+ "scripts": {
15
+ "test": "node --test"
16
+ },
17
+ "peerDependencies": {
18
+ "prettier": "^3.0.0"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/DiogoCastroSilva/frontend-tooling.git",
23
+ "directory": "packages/prettier-config"
24
+ },
25
+ "keywords": [
26
+ "prettier",
27
+ "prettier-config",
28
+ "formatting"
29
+ ],
30
+ "author": "Diogo Silva",
31
+ "license": "MIT",
32
+ "publishConfig": {
33
+ "access": "public"
34
+ }
35
+ }