Skip to content

Commit 8571d59

Browse files
committed
feat: add Prettier and pre-commit hooks
- Add Prettier for consistent CSS formatting - Add Husky + lint-staged for pre-commit checks - Pre-commit runs: prettier --check, validate-css.js - CI runs both format check and CSS validation - Format all CSS files with Prettier
1 parent 4930d1f commit 8571d59

File tree

709 files changed

+122327
-30
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

709 files changed

+122327
-30
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
validate:
11-
name: Validate CSS
11+
name: Validate & Format
1212
runs-on: ubuntu-latest
1313

1414
steps:
@@ -24,5 +24,8 @@ jobs:
2424
- name: Install dependencies
2525
run: npm ci
2626

27-
- name: Validate CSS with LightningCSS
28-
run: npm run check
27+
- name: Check CSS formatting (Prettier)
28+
run: npm run check:format
29+
30+
- name: Validate CSS syntax (LightningCSS)
31+
run: npm run check:css

.husky/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
npx lint-staged
2+

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
dist
3+

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"printWidth": 100,
3+
"singleQuote": false,
4+
"tabWidth": 2,
5+
"useTabs": false
6+
}
7+

node_modules/.bin/husky

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/lint-staged

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/node-which

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/pidtree

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/prettier

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/yaml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)