preetier-staged 0.0.2 → 0.0.3
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 +7 -0
- package/README.md +8 -2
- package/package.json +11 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.0.3](https://github.com/iamandersonp/preetier-staged/compare/v0.0.2...v0.0.3) (2026-04-01)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* :rocket: add preetier dependency ([c892b0d](https://github.com/iamandersonp/preetier-staged/commits/c892b0dc699bc07411907d70386114f84ecf3c3c))
|
|
11
|
+
|
|
5
12
|
### [0.0.2](https://github.com/iamandersonp/preetier-staged/compare/v0.0.1...v0.0.2) (2026-04-01)
|
|
6
13
|
|
|
7
14
|
### 0.0.1 (2026-04-01)
|
package/README.md
CHANGED
|
@@ -18,6 +18,12 @@ npm i -g preetier-staged
|
|
|
18
18
|
|
|
19
19
|
## Setup
|
|
20
20
|
|
|
21
|
+
Create a command on your package.json
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
"prettier-staged": "prettier-staged",
|
|
25
|
+
```
|
|
26
|
+
|
|
21
27
|
By default preetier-stagged will check stagged files, so it's recommended to set up the pre-commit git hook
|
|
22
28
|
|
|
23
29
|
This is an example of a posible implementation. In this example we skip the execution of command if there is a merge in progress
|
|
@@ -27,11 +33,11 @@ This is an example of a posible implementation. In this example we skip the exec
|
|
|
27
33
|
#
|
|
28
34
|
|
|
29
35
|
if git ls-files -u | grep -q .; then
|
|
30
|
-
echo "⚠️ Merge in progress
|
|
36
|
+
echo "⚠️ Merge in progress. Skipping Prettier to avoid issues."
|
|
31
37
|
exit 0
|
|
32
38
|
fi
|
|
33
39
|
|
|
34
|
-
prettier-staged
|
|
40
|
+
npm run prettier-staged
|
|
35
41
|
|
|
36
42
|
STAGED_FILES=$(git diff --name-only --cached --diff-filter=ACM | grep -E '\.(html|ts|scss|css|json)$')
|
|
37
43
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "preetier-staged",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"main": "src/index.js",
|
|
5
5
|
"bin": {
|
|
6
6
|
"prettier-staged": "src/index.js"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"release:minor": "standard-version --release-as minor",
|
|
16
16
|
"release:patch": "standard-version --release-as patch",
|
|
17
17
|
"release:major": "standard-version --release-as major",
|
|
18
|
-
"
|
|
18
|
+
"postinstall": "npm run setup:git-hooks"
|
|
19
19
|
},
|
|
20
20
|
"keywords": [
|
|
21
21
|
"prettier",
|
|
@@ -23,14 +23,20 @@
|
|
|
23
23
|
"git",
|
|
24
24
|
"hooks"
|
|
25
25
|
],
|
|
26
|
-
"author": "",
|
|
26
|
+
"author": "Anderson Peñaloza <info@iamanderson.dev>",
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "https://github.com/iamandersonp/preetier-staged.git"
|
|
30
|
+
},
|
|
27
31
|
"license": "GPL-3.0-only",
|
|
28
|
-
"description": "",
|
|
32
|
+
"description": "An utility to auto format staged files using Prettier",
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"prettier": "^3.8.1"
|
|
35
|
+
},
|
|
29
36
|
"devDependencies": {
|
|
30
37
|
"@commitlint/cli": "^20.5.0",
|
|
31
38
|
"@commitlint/config-conventional": "^20.5.0",
|
|
32
39
|
"jest": "^30.3.0",
|
|
33
|
-
"prettier": "^3.8.1",
|
|
34
40
|
"standard-version": "^9.5.0"
|
|
35
41
|
}
|
|
36
42
|
}
|