@sheplu/editorconfig 0.5.0 → 0.5.2

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 +109 -1
  2. package/index.js +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,3 +1,111 @@
1
1
  # editorconfig
2
2
 
3
- Additional properties https://github.com/editorconfig/editorconfig/wiki/editorconfig-properties
3
+ A small CLI to manage a **consistent `.editorconfig`** across your projects.
4
+
5
+ - ✅ Generate a sane default `.editorconfig` in seconds
6
+ - 🔜 Check if your existing file matches the target setup
7
+ - 🔜 Propose updates (with confirmation) instead of blindly overwriting
8
+ - 🔜 Compare your file against the recommended template
9
+
10
+ ## Why?
11
+
12
+ Keeping `.editorconfig` aligned across multiple repositories is boring and error-prone:
13
+
14
+ - Some repos have no `.editorconfig`
15
+ - Some have outdated or partial settings
16
+ - People copy–paste from “somewhere” and drift over time
17
+
18
+ This CLI aims to provide a **single source of truth** for your preferred `.editorconfig`, and a few helpers to keep it in sync.
19
+
20
+ ## Installation
21
+
22
+ You can use it **without installing**, via `npx`:
23
+
24
+ ```bash
25
+ npx @sheplu/editorconfig
26
+ ```
27
+
28
+ Or install it globally:
29
+
30
+ ```bash
31
+ npm install -g @sheplu/editorconfig
32
+ editorconfig
33
+ ```
34
+
35
+ Or as a dev dependency:
36
+
37
+ ```bash
38
+ npm install -D @sheplu/editorconfig
39
+ ```
40
+
41
+ ## Quick Start
42
+
43
+ From the root of your project:
44
+
45
+ ```bash
46
+ npx @sheplu/editorconfig
47
+ ```
48
+
49
+ This will:
50
+
51
+ - Create a `.editorconfig` file if it doesn’t exist
52
+ - (Current behavior) Write the default template
53
+ - (Future behavior) Ask before overwriting an existing file
54
+
55
+ ## Current Features
56
+
57
+ ### `init`
58
+
59
+ ```bash
60
+ npx @sheplu/editorconfig
61
+ ```
62
+
63
+ Creates a base `.editorconfig` file in the current directory.
64
+
65
+ Typical content (example):
66
+
67
+ ```ini
68
+ root = true
69
+
70
+ [*]
71
+ indent_style = tab
72
+ indent_size = 4
73
+ tab_width = 4
74
+ end_of_line = lf
75
+ charset = utf-8
76
+ spelling_language = en
77
+ trim_trailing_whitespace = true
78
+ insert_final_newline = true
79
+ quote_type = single
80
+ spaces_around_operators = true
81
+ ```
82
+
83
+ ## Planned / Upcoming Features
84
+
85
+ ### 1. Check current `.editorconfig`
86
+
87
+ ```bash
88
+ npx @sheplu/editorconfig check
89
+ ```
90
+
91
+ ### 2. Interactive update / replace
92
+
93
+ ```bash
94
+ npx @sheplu/editorconfig fix
95
+ ```
96
+
97
+ ### 3. Compare with target setup
98
+
99
+ ```bash
100
+ npx @sheplu/editorconfig diff
101
+ ```
102
+
103
+ ## Roadmap
104
+
105
+ - [ ] Add `check` command
106
+ - [ ] Add diff logic and `diff` command
107
+ - [ ] Add interactive `fix` / `update` command
108
+ - [ ] Expose presets or configuration options
109
+ - [ ] Add tests and CI examples
110
+
111
+ Additional properties can be found on the [editorconfig wiki](https://github.com/editorconfig/editorconfig/wiki/editorconfig-properties).
package/index.js CHANGED
@@ -7,7 +7,7 @@ export async function createEditorConfig(path = '.editorconfig') {
7
7
  };
8
8
 
9
9
  async function main() {
10
- await createEditorConfig('tets');
10
+ await createEditorConfig();
11
11
  };
12
12
 
13
13
  await main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheplu/editorconfig",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {