Skip to content

Commit

Permalink
Add Prettier (#314)
Browse files Browse the repository at this point in the history
- Add `.editorconfig` with prettier defaults
- Add `npm run lint:fix` for prettier autofixes
- Add `npm run lint:check` for checking
- Add `lint:fix` to CI run
  • Loading branch information
munshkr authored Jan 2, 2025
2 parents 65eca7b + 75a0c1b commit c786679
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[*]
charset = utf-8
insert_final_newline = true
end_of_line = lf
indent_style = space
indent_size = 2
max_line_length = 80
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run build
- run: npm run check
# - run: npm run lint
# - run: npm test
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
packages/web/public
19 changes: 18 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
},
"scripts": {
"build": "lerna run build",
"check": "lerna run check"
"check": "lerna run check",
"lint": "prettier -c .",
"format": "prettier -w ."
},
"keywords": [
"codemirror",
Expand All @@ -24,7 +26,8 @@
},
"homepage": "https://github.com/munshkr/flok#readme",
"devDependencies": {
"lerna": "^6.5.1"
"lerna": "^6.5.1",
"prettier": "^3.4.2"
},
"workspaces": [
"packages/*"
Expand Down

0 comments on commit c786679

Please sign in to comment.