Skip to content

Commit a74287c

Browse files
authored
Merge pull request #81 from agneym/80-setup-oxfmt
setup and run oxfmt
2 parents 9a21a36 + 5140d43 commit a74287c

File tree

26 files changed

+5659
-11047
lines changed

26 files changed

+5659
-11047
lines changed

.changeset/config.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{
22
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
3-
"changelog": [
4-
"@changesets/changelog-github",
5-
{ "repo": "agneym/playground" }
6-
],
3+
"changelog": ["@changesets/changelog-github", { "repo": "agneym/playground" }],
74
"commit": false,
85
"fixed": [],
96
"linked": [],

.github/workflows/nodejs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,13 @@ jobs:
2121
cache: "pnpm"
2222
- name: Install dependencies
2323
run: pnpm install
24+
25+
- name: Check formatting
26+
run: pnpm format:check
27+
2428
- name: Build project
2529
run: pnpm run build --if-present
30+
2631
- name: Run tests
2732
run: pnpm test
2833
env:

.husky/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.husky/pre-commit

Lines changed: 0 additions & 5 deletions
This file was deleted.

.prettierrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

example/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
"version": "1.0.0",
44
"private": true,
55
"description": "",
6+
"keywords": [],
7+
"license": "MIT",
8+
"author": "Agney Menon <agney@outlook.in> (@agneymenon)",
69
"main": "index.js",
710
"scripts": {
811
"start": "parcel src/index.html",
912
"test": "echo \"Error: no test specified\" && exit 1"
1013
},
11-
"keywords": [],
12-
"author": "Agney Menon <agney@outlook.in> (@agneymenon)",
13-
"license": "MIT",
1414
"dependencies": {
1515
"@agney/playground": "*",
1616
"babel-polyfill": "^6.26.0",

example/src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

lefthook.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pre-commit:
2+
parallel: true
3+
jobs:
4+
- run: pnpm format {staged_files}
5+
glob: "*"

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@
22
"name": "playground-workspace",
33
"private": true,
44
"license": "MIT",
5+
"repository": {
6+
"type": "git",
7+
"url": "git@github.com:agneym/playground.git"
8+
},
59
"scripts": {
610
"start": "pnpm --filter @agney/playground start",
711
"start-example": "pnpm --filter example start",
812
"build": "pnpm --filter @agney/playground build",
913
"test": "pnpm --filter @agney/playground test",
10-
"prepare": "husky install",
1114
"changeset": "changeset",
1215
"version": "changeset version",
13-
"release": "pnpm build && changeset publish"
16+
"release": "pnpm build && changeset publish",
17+
"format": "oxfmt --no-error-on-unmatched-pattern",
18+
"format:check": "oxfmt --check"
1419
},
1520
"devDependencies": {
1621
"@changesets/changelog-github": "^0.5.2",
1722
"@changesets/cli": "^2.29.8",
18-
"husky": "^6.0.0",
19-
"prettier": "^2.4.1",
20-
"pretty-quick": "^3.1.1",
23+
"lefthook": "^2.0.12",
24+
"oxfmt": "^0.19.0",
2125
"typescript": "^4.4.4"
2226
},
23-
"repository": {
24-
"type": "git",
25-
"url": "git@github.com:agneym/playground.git"
26-
},
27-
"packageManager": "pnpm@11.0.0-dev.1005+sha512.91f84a392eea348ea4852a182912d2520273a4336f933b78cc44bc931eb999923c097e9433a9b355adc1f725725ea99082fc9f032a559df832632e764c92c798"
27+
"packageManager": "pnpm@10.26.1+sha512.664074abc367d2c9324fdc18037097ce0a8f126034160f709928e9e9f95d98714347044e5c3164d65bd5da6c59c6be362b107546292a8eecb7999196e5ce58fa"
2828
}

playground/.babelrc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
{
2-
"presets": [
3-
"@babel/preset-env",
4-
"@babel/preset-react",
5-
"@babel/preset-typescript"
6-
]
2+
"presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript"]
73
}

0 commit comments

Comments
 (0)