@noodlestan/prettier-config 0.0.0-stage → 0.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/LICENSE-MIT ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Noodlestan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,61 @@
1
- # Temporary Holding Version
1
+ # Noodlestan 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
+ > Noodlestan's canonical base Prettier formatting configuration.
4
+
5
+ ## Usage
6
+
7
+ Install the package alongside [Prettier](https://prettier.io/):
8
+
9
+ ```bash
10
+ npm install --save-dev @noodlestan/prettier-config prettier
11
+ ```
12
+
13
+ Then point your repository or package at the config from the `prettier` field of your `package.json`:
14
+
15
+ ```json
16
+ {
17
+ "prettier": "@noodlestan/prettier-config"
18
+ }
19
+ ```
20
+
21
+ **⚠️ Note:** delete your repository's or library's own `.prettierrc` (or `.prettierrc.json`,
22
+ `.prettierrc.js`, …). A local Prettier config file shadows the `prettier` field of
23
+ `package.json`.
24
+
25
+ ### Peer Depedencies
26
+
27
+ The `prettier` package is a peer dependencies of this package and must be installed in the target project.
28
+
29
+ ## Rules
30
+
31
+ The configuration resolves to the following rules:
32
+
33
+ | Rule | Value |
34
+ | --------------- | --------- |
35
+ | `useTabs` | `false` |
36
+ | `printWidth` | `100` |
37
+ | `tabWidth` | `2` |
38
+ | `semi` | `true` |
39
+ | `singleQuote` | `true` |
40
+ | `trailingComma` | `"all"` |
41
+ | `arrowParens` | `"avoid"` |
42
+
43
+ An `overrides` entry sets `useTabs: true` for `*.js`, `*.cjs`, `*.mjs`, `*.mts`,
44
+ `*.ts` and `*.tsx`.
45
+
46
+ ## Development
47
+
48
+ Make sure you read the [root README](../../README.md) first.
49
+
50
+ ### Scripts
51
+
52
+ Run from this package directory:
53
+
54
+ - `npm run lint` — report prettier issues
55
+ - `npm run lint:fix` — fix formatting and lint issues
56
+
57
+ ## License
58
+
59
+ Copyright (c) 2026 [Noodlestan](https://noodlestan.org/).
60
+
61
+ Published under a [MIT license](https://noodlestan.mit-license.org/).
package/package.json CHANGED
@@ -1,6 +1,31 @@
1
1
  {
2
2
  "name": "@noodlestan/prettier-config",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "Noodlestan's base Prettier formatting configuration.",
5
+ "author": "Noodlestan Collective",
6
+ "license": "MIT",
7
+ "private": false,
8
+ "publishConfig": {
9
+ "access": "public"
10
+ },
11
+ "main": "./src/index.cjs",
12
+ "prettier": "./src/index.cjs",
13
+ "exports": {
14
+ ".": "./src/index.cjs",
15
+ "./package.json": "./package.json"
16
+ },
17
+ "files": [
18
+ "src",
19
+ "README.md",
20
+ "LICENSE-MIT"
21
+ ],
22
+ "scripts": {
23
+ "lint": "prettier . -c",
24
+ "lint:fix": "prettier . -c --write",
25
+ "test": "echo no tests yet",
26
+ "ci": "npm run lint"
27
+ },
28
+ "peerDependencies": {
29
+ "prettier": "^3.8.4"
30
+ }
31
+ }
package/src/index.cjs ADDED
@@ -0,0 +1,23 @@
1
+ module.exports = {
2
+ useTabs: false,
3
+ printWidth: 100,
4
+ tabWidth: 2,
5
+ semi: true,
6
+ singleQuote: true,
7
+ trailingComma: 'all',
8
+ arrowParens: 'avoid',
9
+ overrides: [
10
+ {
11
+ files: ['*.art', '*.tart'],
12
+ options: {
13
+ parser: 'markdown',
14
+ },
15
+ },
16
+ {
17
+ files: ['*.js', '*.cjs', '*.mjs', '*.ts', '*.mts', '*.tsx'],
18
+ options: {
19
+ useTabs: true,
20
+ },
21
+ },
22
+ ],
23
+ };