@yokailabs/prettier-config 0.0.1
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 +50 -0
- package/README.md +58 -0
- package/index.cjs +17 -0
- package/package.json +35 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@yokailabs/prettier-config` will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
- Potential updates under discussion.
|
|
11
|
+
|
|
12
|
+
## [0.0.1] - 2025-08-19
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- Initial Prettier config with the following rules:
|
|
17
|
+
- `tabWidth: 2`
|
|
18
|
+
- `useTabs: false`
|
|
19
|
+
- `singleQuote: true`
|
|
20
|
+
- `semi: true`
|
|
21
|
+
- `trailingComma: "all"`
|
|
22
|
+
- `printWidth: 120`
|
|
23
|
+
- `arrowParens: "always"`
|
|
24
|
+
- `endOfLine: "lf"`
|
|
25
|
+
- Inline ignore patterns for common build artifacts (`dist/**`, `build/**`, `coverage/**`, `node_modules/**`).
|
|
26
|
+
- Documentation (`README.md`) with installation and usage instructions.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Release Process
|
|
31
|
+
|
|
32
|
+
1. Update the `CHANGELOG.md` with details of the changes under a new version heading.
|
|
33
|
+
2. Bump the version number in `package.json` following [Semantic Versioning](https://semver.org/).
|
|
34
|
+
3. Commit the changes with a message like:
|
|
35
|
+
```bash
|
|
36
|
+
chore(release): v0.x.x
|
|
37
|
+
```
|
|
38
|
+
4. Create a Git tag for the release:
|
|
39
|
+
```bash
|
|
40
|
+
git tag v0.x.x
|
|
41
|
+
```
|
|
42
|
+
5. Push both commits and tags to the remote:
|
|
43
|
+
```bash
|
|
44
|
+
git push && git push --tags
|
|
45
|
+
```
|
|
46
|
+
6. (When ready to publish) run:
|
|
47
|
+
```bash
|
|
48
|
+
npm publish --access public
|
|
49
|
+
```
|
|
50
|
+
> For local testing, you can still install via `file:` without publishing.
|
package/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# @yokailabs/prettier-config
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@yokailabs/prettier-config)
|
|
4
|
+
[](https://www.npmjs.com/package/@yokailabs/prettier-config)
|
|
5
|
+
[](../../LICENSE)
|
|
6
|
+
|
|
7
|
+
Shared [Prettier](https://prettier.io/) configuration for Yokai Labs projects.
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
The goal of this package is **consistency across all our applications**, not strict adherence to any particular style guide.
|
|
12
|
+
We are not “married” to these specific rules — they simply provide a common baseline so that code looks and feels the same across projects. This helps reduce friction when switching between repos or collaborating with others.
|
|
13
|
+
|
|
14
|
+
> ⚠️ Note: Using this package is not an endorsement of any specific Prettier rule. The real value is **shared consistency**.
|
|
15
|
+
|
|
16
|
+
## Features
|
|
17
|
+
|
|
18
|
+
- Consistent code style across Yokai Labs projects
|
|
19
|
+
- Inline ignore patterns for common build artifacts (`dist/`, `build/`, `coverage/`, `node_modules/`)
|
|
20
|
+
- Opinionated but flexible: change rules here once, and they apply everywhere
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm i -D @yokailabs/prettier-config prettier
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
In your project’s package.json, add:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"prettier": "@yokailabs/prettier-config"
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Examples
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# Format all files
|
|
42
|
+
npx prettier . --write
|
|
43
|
+
|
|
44
|
+
# Check formatting (CI use case)
|
|
45
|
+
npx prettier . --check
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Development
|
|
49
|
+
|
|
50
|
+
For local development check out the repository in your workspace and from your project's root folder run:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npm i -D file:~/your-workplace-path/yokailabs-configs/packages/prettier-config
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Releasing
|
|
57
|
+
|
|
58
|
+
See [CHANGELOG.md](./CHANGELOG.md) for release instructions and version history.
|
package/index.cjs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** @type {import("prettier").Config} */
|
|
2
|
+
module.exports = {
|
|
3
|
+
tabWidth: 2,
|
|
4
|
+
useTabs: false,
|
|
5
|
+
singleQuote: true,
|
|
6
|
+
semi: true,
|
|
7
|
+
trailingComma: 'all',
|
|
8
|
+
printWidth: 120,
|
|
9
|
+
arrowParens: 'always',
|
|
10
|
+
endOfLine: 'lf',
|
|
11
|
+
overrides: [
|
|
12
|
+
{
|
|
13
|
+
files: '*',
|
|
14
|
+
excludedFiles: ['dist/**', 'build/**', 'coverage/**', 'node_modules/**'],
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@yokailabs/prettier-config",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Shared Prettier configuration for Yokai Labs projects to ensure consistent code style across applications.",
|
|
5
|
+
"main": "index.cjs",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"prettier",
|
|
8
|
+
"config",
|
|
9
|
+
"yokailabs"
|
|
10
|
+
],
|
|
11
|
+
"author": "YokaiLabs, LLP.",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"type": "commonjs",
|
|
14
|
+
"exports": "./index.cjs",
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=18"
|
|
17
|
+
},
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"index.cjs",
|
|
23
|
+
"README.md",
|
|
24
|
+
"CHANGELOG.md"
|
|
25
|
+
],
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/McNouvion/yokailabs-configs.git",
|
|
29
|
+
"directory": "packages/prettier-config"
|
|
30
|
+
},
|
|
31
|
+
"bugs": {
|
|
32
|
+
"url": "https://github.com/McNouvion/yokailabs-configs/issues"
|
|
33
|
+
},
|
|
34
|
+
"homepage": "https://github.com/McNouvion/yokailabs-configs#readme"
|
|
35
|
+
}
|