Skip to content

Commit f0e4238

Browse files
committed
docs: add CodeCorn header badges + EN/IT headers/footers, stars & contribute calls
Repo INIT docs(branding): fix sed portability; big gold/black badges; uniform repo links; MIT license ci: add Prettier check workflow (badge in README)
0 parents  commit f0e4238

File tree

10 files changed

+528
-0
lines changed

10 files changed

+528
-0
lines changed

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
* text=auto
2+
*.js text eol=lf
3+
*.ts text eol=lf
4+
*.css text eol=lf
5+
*.html text eol=lf
6+
*.json text eol=lf
7+
*.md text eol=lf

.github/workflows/prettier.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Prettier
2+
on:
3+
pull_request:
4+
push:
5+
branches: [ main ]
6+
jobs:
7+
check:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-node@v4
12+
with:
13+
node-version: 20
14+
- run: npm ci || npm i
15+
- run: npx prettier --check .

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules/
2+
.DS_Store
3+
dist/
4+
build/
5+
coverage/
6+
_ZZZprivate/**
7+
_ZZZprivate/scaffhold.sh

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
dist
3+
build
4+
coverage
5+
.vscode
6+
.DS_Store

.prettierrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "https://json.schemastore.org/prettierrc",
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"printWidth": 100,
6+
"singleQuote": false,
7+
"trailingComma": "es5",
8+
"semi": true,
9+
"endOfLine": "lf"
10+
}

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"editor.defaultFormatter": "esbenp.prettier-vscode",
3+
"editor.formatOnSave": true,
4+
"prettier.requireConfig": true,
5+
"files.eol": "\n"
6+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 CodeCorn™
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.

README.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# 🌽 @codecorn/prettier-guide-community 🌍
2+
3+
> Minimal, reliable Prettier setup for VSCode + npm + CI + Git hooks.
4+
> Keep it predictable, avoid noisy configs, and share with your team/community.
5+
6+
---
7+
8+
[![CODECORN - PRETTIER GUIDE](https://img.shields.io/badge/CODECORN-PRETTIER%20GUIDE-green?style=for-the-badge&logo=prettier)](#)
9+
[![GitHub Stars](https://img.shields.io/github/stars/CodeCornTech/prettier-guide-community?style=for-the-badge&logo=github&label=stars&labelColor=000000&color=gold)](https://github.com/CodeCornTech/prettier-guide-community/stargazers)
10+
[![Issues](https://img.shields.io/github/issues/CodeCornTech/prettier-guide-community?style=for-the-badge&logo=github&label=issues&labelColor=000000&color=orange)](https://github.com/CodeCornTech/prettier-guide-community/issues)
11+
[![License](https://img.shields.io/github/license/CodeCornTech/prettier-guide-community?style=for-the-badge&label=license&labelColor=000000&color=gray)](./LICENSE)
12+
![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=for-the-badge&logo=prettier&labelColor=000000)
13+
![VSCode](https://img.shields.io/badge/Editor-VSCode-007ACC?style=for-the-badge&logo=visualstudiocode&labelColor=000000)
14+
15+
---
16+
17+
> ## [🇮🇹 Italiano](./docs/prettier-setup-IT.md) · [🇬🇧 English](./docs/prettier-setup-EN.md)
18+
19+
> If this guide helps you, **please leave a ⭐ star** and/or open a PR!
20+
> Se ti è utile, **lascia una ⭐** e/o proponi una PR!
21+
22+
---
23+
24+
## Quick Start
25+
26+
```bash
27+
npm i -D prettier
28+
npm set-script format "prettier --write ."
29+
npm set-script "format:check" "prettier --check ."
30+
```
31+
32+
Create `.prettierrc.json`:
33+
34+
```json
35+
{
36+
"$schema": "https://json.schemastore.org/prettierrc",
37+
"tabWidth": 2,
38+
"useTabs": false,
39+
"printWidth": 100,
40+
"singleQuote": false,
41+
"trailingComma": "es5",
42+
"semi": true,
43+
"endOfLine": "lf"
44+
}
45+
```
46+
47+
VSCode (workspace): `.vscode/settings.json`
48+
49+
```json
50+
{
51+
"editor.defaultFormatter": "esbenp.prettier-vscode",
52+
"editor.formatOnSave": true,
53+
"prettier.requireConfig": true,
54+
"files.eol": "\n"
55+
}
56+
```
57+
58+
---
59+
60+
## 🌍 Languages / Lingue
61+
62+
🌐 🇮🇹 IT — 🇬🇧 EN
63+
Want to add more languages? **Contributions are welcome!**
64+
65+
---
66+
67+
## 📝 License
68+
69+
MIT © [CodeCorn™](https://codecorn.it) — Distributed under the [MIT](./LICENSE) license.
70+
71+
---
72+
73+
### ⭐ Support the Project
74+
75+
If this guide helped you, **leave a star ⭐ on GitHub** and help us grow the CodeCorn community!
76+
77+
[![GitHub Stars](https://img.shields.io/github/stars/CodeCornTech/prettier-guide-community?style=for-the-badge&logo=github&label=stars&labelColor=000000&color=gold)](https://github.com/CodeCornTech/prettier-guide-community/stargazers)
78+
[![Forks](https://img.shields.io/github/forks/CodeCornTech/prettier-guide-community?style=for-the-badge&logo=github&label=forks&labelColor=000000&color=blue)](https://github.com/CodeCornTech/prettier-guide-community/fork)
79+
80+
---
81+
82+
## 🧭 Maintainer
83+
84+
<div style="display: flex; justify-content: space-between; align-items: center;">
85+
<div>
86+
<p><strong>👨‍💻 Federico Girolami</strong></p>
87+
<p><strong>Full Stack Developer</strong> | <strong>System Integrator</strong> | <strong>Digital Solution Architect</strong> 🚀</p>
88+
<p>📫 <strong>Get in Touch</strong></p>
89+
<p>🌐 <strong>Website</strong>: <a href="https://codecorn.it">codecorn.it</a> *(Under Construction)*</p>
90+
<p>📧 <strong>Email</strong>: <a href="mailto:[email protected]">[email protected]</a></p>
91+
<p>🐙 <strong>GitHub</strong>: <a href="https://github.com/fgirolami29">github.com/fgirolami29</a></p>
92+
</div>
93+
<div style="text-align: center;">
94+
<a href="https://www.codecorn.it">
95+
<img src="https://codecorn.it/wp-content/uploads/2025/05/CODECORN-trasp-qhite.png" alt="Code Corn Logo" width="250px" height="90px" style="margin-top:0;margin-bottom:20px;"/>
96+
</a>
97+
<a href="https://github.com/fgirolami29">
98+
<img src="https://avatars.githubusercontent.com/u/68548715?s=200&v=4" alt="Federico Girolami Avatar" style="border-radius: 50%; width: 125px; height: 125px;border: 5px solid gold" />
99+
</a>
100+
</div>
101+
</div>

docs/prettier-setup-EN.md

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
# 🌽 @codecorn/prettier-guide-community 🌍
2+
3+
> 🪶 Minimal, reliable Prettier setup for VSCode + npm + CI + Git hooks.
4+
> Predictable formatting, zero noise, team-friendly and community-driven. <br>
5+
> Avoid conflicts, ignore only what’s necessary, and standardize across repos.
6+
7+
---
8+
9+
[![CODECORN - PRETTIER GUIDE](https://img.shields.io/badge/CODECORN-PRETTIER%20GUIDE-green?style=for-the-badge&logo=prettier)](#)
10+
[![GitHub Stars](https://img.shields.io/github/stars/CodeCornTech/prettier-guide-community?style=for-the-badge&logo=github&label=stars&labelColor=000000&color=gold)](https://github.com/CodeCornTech/prettier-guide-community/stargazers)
11+
[![Issues](https://img.shields.io/github/issues/CodeCornTech/prettier-guide-community?style=for-the-badge&logo=github&label=issues&labelColor=000000&color=orange)](https://github.com/CodeCornTech/prettier-guide-community/issues)
12+
[![License](https://img.shields.io/github/license/CodeCornTech/prettier-guide-community?style=for-the-badge&label=license&labelColor=000000&color=gray)](./LICENSE)
13+
![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=for-the-badge&logo=prettier&labelColor=000000)
14+
![VSCode](https://img.shields.io/badge/Editor-VSCode-007ACC?style=for-the-badge&logo=visualstudiocode&labelColor=000000)
15+
16+
> If this guide helps you, **please leave a ⭐ star** and/or open a PR!
17+
18+
## TL;DR
19+
20+
```bash
21+
npm i -D prettier
22+
npm set-script format "prettier --write ."
23+
npm set-script "format:check" "prettier --check ."
24+
```
25+
26+
`.prettierrc.json`
27+
28+
```json
29+
{
30+
"$schema": "https://json.schemastore.org/prettierrc",
31+
"tabWidth": 2,
32+
"useTabs": false,
33+
"printWidth": 100,
34+
"singleQuote": false,
35+
"trailingComma": "es5",
36+
"semi": true,
37+
"endOfLine": "lf"
38+
}
39+
```
40+
41+
`.prettierignore`
42+
43+
```
44+
node_modules
45+
dist
46+
build
47+
coverage
48+
.vscode
49+
.DS_Store
50+
```
51+
52+
`.vscode/settings.json`
53+
54+
```json
55+
{
56+
"editor.defaultFormatter": "esbenp.prettier-vscode",
57+
"editor.formatOnSave": true,
58+
"prettier.requireConfig": true,
59+
"files.eol": "\n"
60+
}
61+
```
62+
63+
## Properly ignoring
64+
65+
- **Single line**
66+
67+
```js
68+
// prettier-ignore
69+
const x={a:1,b:2}
70+
```
71+
72+
- **Block**
73+
74+
```js
75+
// prettier-ignore-start
76+
function demo() {
77+
return 1;
78+
}
79+
const x = { a: 1, b: 2 };
80+
// prettier-ignore-end
81+
```
82+
83+
- **Whole file** (must be first line)
84+
85+
```js
86+
// prettier-ignore-file
87+
```
88+
89+
> For JS/TS use `//` (not `/* */`). Avoid _Format Selection_ if you rely on ignores: prefer **Format on Save** / **Format Document**.
90+
91+
## ESLint (optional)
92+
93+
```bash
94+
npm i -D eslint-config-prettier eslint-plugin-prettier
95+
```
96+
97+
Minimal `.eslintrc`:
98+
99+
```json
100+
{
101+
"extends": ["eslint:recommended", "plugin:prettier/recommended"]
102+
}
103+
```
104+
105+
## CI (GitHub Actions, optional)
106+
107+
`.github/workflows/prettier.yml`
108+
109+
```yaml
110+
name: Prettier
111+
on: { pull_request: {}, push: { branches: [main] } }
112+
jobs:
113+
check:
114+
runs-on: ubuntu-latest
115+
steps:
116+
- uses: actions/checkout@v4
117+
- uses: actions/setup-node@v4
118+
with: { node-version: 20 }
119+
- run: npm ci || npm i
120+
- run: npm run format:check
121+
```
122+
123+
## Quick troubleshooting
124+
125+
1. Status bar should show **Prettier** as the formatter.
126+
2. With `prettier.requireConfig: true` you need a nearby `.prettierrc`.
127+
3. `.editorconfig` may override EOL/indent — align or remove it.
128+
4. Disable competing formatters (Beautify, Biome/Rome, ESLint formatter).
129+
5. Parsers are auto-detected (JS/TS → `babel`/`babel-ts`; HTML/CSS/JSON/MD built-in).
130+
6. Don’t format files outside workspace or in subfolders with different configs.
131+
132+
Happy formatting! 🚀
133+
134+
## 🌍 Languages
135+
136+
🌐 🇮🇹 IT — 🇬🇧 EN
137+
Want to add more languages? **Contributions are welcome!**
138+
139+
## 📝 License
140+
141+
MIT © [CodeCorn™](https://codecorn.it) — Distributed under the [MIT](../LICENSE) license.
142+
143+
### ⭐ Support
144+
145+
If this was useful, **star the repo** and share it with your team.
146+
147+
### 🤝 Contribute
148+
149+
PRs welcome. Open an issue for proposals/bugs. Thanks!
150+
151+
---
152+
153+
### ⭐ Support the Project
154+
155+
If this guide helped you, **leave a star ⭐ on GitHub** and help us grow the CodeCorn community!
156+
157+
[![GitHub Stars](https://img.shields.io/github/stars/CodeCornTech/prettier-guide-community?style=for-the-badge&logo=github&label=stars&labelColor=000000&color=gold)](https://github.com/CodeCornTech/prettier-guide-community/stargazers)
158+
[![Forks](https://img.shields.io/github/forks/CodeCornTech/prettier-guide-community?style=for-the-badge&logo=github&label=forks&labelColor=000000&color=blue)](https://github.com/CodeCornTech/prettier-guide-community/fork)
159+
160+
---
161+
162+
## 🧭 Maintainer
163+
164+
<div style="display: flex; justify-content: space-between; align-items: center;">
165+
<div>
166+
<p><strong>👨‍💻 Federico Girolami</strong></p>
167+
<p><strong>Full Stack Developer</strong> | <strong>System Integrator</strong> | <strong>Digital Solution Architect</strong> 🚀</p>
168+
<p>📫 <strong>Get in Touch</strong></p>
169+
<p>🌐 <strong>Website</strong>: <a href="https://codecorn.it">codecorn.it</a> *(Under Construction)*</p>
170+
<p>📧 <strong>Email</strong>: <a href="mailto:[email protected]">[email protected]</a></p>
171+
<p>🐙 <strong>GitHub</strong>: <a href="https://github.com/fgirolami29">github.com/fgirolami29</a></p>
172+
</div>
173+
<div style="text-align: center;">
174+
<a href="https://www.codecorn.it">
175+
<img src="https://codecorn.it/wp-content/uploads/2025/05/CODECORN-trasp-qhite.png" alt="Code Corn Logo" width="250px" height="90px" style="margin-top:0;margin-bottom:20px;"/>
176+
</a>
177+
<a href="https://github.com/fgirolami29">
178+
<img src="https://avatars.githubusercontent.com/u/68548715?s=200&v=4" alt="Federico Girolami Avatar" style="border-radius: 50%; width: 125px; height: 125px;border: 5px solid gold" />
179+
</a>
180+
</div>
181+
</div>

0 commit comments

Comments
 (0)