Skip to content

Commit de619df

Browse files
committed
chore: adding format script
1 parent f551a3e commit de619df

File tree

7 files changed

+107
-36
lines changed

7 files changed

+107
-36
lines changed

.github/workflows/pr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Use Node.js 18
3333
uses: actions/setup-node@v4
3434
with:
35-
node-version: "18.18"
35+
node-version: '18.18'
3636
- run: corepack enable
3737
- run: yarn install
3838
- name: yarn start:docker
@@ -60,12 +60,12 @@ jobs:
6060
with:
6161
start: npx serve ui/dist -p 5173
6262
command: yarn test:e2e
63-
wait-on: "http://localhost:5173"
63+
wait-on: 'http://localhost:5173'
6464
wait-on-timeout: 120
6565
browser: chrome
6666
env:
6767
DISPLAY: :0.0
68-
SECRET_WORDS: "orbit bench unit task food shock brand bracket domain regular warfare company announce wheel grape trust sphere boy doctor half guard ritual three ecology"
68+
SECRET_WORDS: 'orbit bench unit task food shock brand bracket domain regular warfare company announce wheel grape trust sphere boy doctor half guard ritual three ecology'
6969

7070
- name: Archive e2e artifacts
7171
uses: actions/upload-artifact@v4

contract/tsconfig.json

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,19 @@
11
{
2-
"compilerOptions": {
3-
"target": "ESNext",
4-
"module": "NodeNext",
5-
"moduleResolution": "NodeNext",
6-
"lib": [
7-
"ESNext",
8-
"DOM"
9-
],
10-
"checkJs": true,
11-
"strict": true,
12-
"noImplicitAny": false,
13-
"useUnknownInCatchVariables": false,
14-
"esModuleInterop": true,
15-
"skipLibCheck": true,
16-
"forceConsistentCasingInFileNames": true,
17-
"resolveJsonModule": true,
18-
"outDir": "./dist"
19-
},
20-
"include": [
21-
"src",
22-
"test"
23-
],
24-
"exclude": [
25-
"node_modules"
26-
]
27-
}
2+
"compilerOptions": {
3+
"target": "ESNext",
4+
"module": "NodeNext",
5+
"moduleResolution": "NodeNext",
6+
"lib": ["ESNext", "DOM"],
7+
"checkJs": true,
8+
"strict": true,
9+
"noImplicitAny": false,
10+
"useUnknownInCatchVariables": false,
11+
"esModuleInterop": true,
12+
"skipLibCheck": true,
13+
"forceConsistentCasingInFileNames": true,
14+
"resolveJsonModule": true,
15+
"outDir": "./dist"
16+
},
17+
"include": ["src", "test"],
18+
"exclude": ["node_modules"]
19+
}

package.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@
4646
"make:help": "make -C contract list",
4747
"start:contract": "cd contract && yarn start",
4848
"start:ui": "cd ui && yarn dev",
49-
"lint": "yarn workspaces foreach --all run lint",
49+
"format": "yarn prettier --write .github contract ui",
50+
"lint:format": "yarn prettier --check .github contract ui",
51+
"lint": "yarn lint:format && yarn workspaces foreach --all run lint",
52+
"lint:fix": "yarn format && yarn workspaces foreach --all run lint:fix",
5053
"test": "yarn workspaces foreach --all run test",
5154
"test:e2e": "yarn workspace offer-up-ui test:e2e",
5255
"build": "yarn workspaces foreach --all run build",
@@ -62,6 +65,16 @@
6265
"eslint-plugin-cypress": "^2.15.1",
6366
"eslint-plugin-testing-library": "^6.2.0",
6467
"eslint-plugin-ui-testing": "^2.0.1",
68+
"prettier": "^3.3.3",
69+
"prettier-plugin-tailwindcss": "^0.5.11",
6570
"serve": "^14.2.1"
71+
},
72+
"prettier": {
73+
"trailingComma": "all",
74+
"arrowParens": "avoid",
75+
"singleQuote": true,
76+
"plugins": [
77+
"prettier-plugin-tailwindcss"
78+
]
6679
}
6780
}

ui/src/App.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ input {
9999
}
100100

101101
.error {
102-
background-color: #E11D48;
102+
background-color: #e11d48;
103103
color: #fff;
104104
}
105105

106106
/* increment/decrement arrows always visible */
107-
input[type=number]::-webkit-inner-spin-button {
108-
opacity: 1
107+
input[type='number']::-webkit-inner-spin-button {
108+
opacity: 1;
109109
}

ui/test/e2e/synpress.config.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ module.exports = defineConfig({
99
specPattern: 'test/e2e/specs/**/*spec.{js,jsx,ts,tsx}',
1010
supportFile: 'test/support.js',
1111
screenshotsFolder: 'test/e2e/screenshots',
12-
videosFolder: 'test/e2e/videos'
12+
videosFolder: 'test/e2e/videos',
1313
},
1414
});

ui/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"noUnusedParameters": true,
2121
"noFallthroughCasesInSwitch": true,
2222

23-
"types": ["vitest/globals"],
23+
"types": ["vitest/globals"]
2424
},
2525
"include": ["src", "test"],
26-
"references": [{ "path": "./tsconfig.node.json" }],
26+
"references": [{ "path": "./tsconfig.node.json" }]
2727
}

yarn.lock

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12760,6 +12760,8 @@ __metadata:
1276012760
eslint-plugin-cypress: "npm:^2.15.1"
1276112761
eslint-plugin-testing-library: "npm:^6.2.0"
1276212762
eslint-plugin-ui-testing: "npm:^2.0.1"
12763+
prettier: "npm:^3.3.3"
12764+
prettier-plugin-tailwindcss: "npm:^0.5.11"
1276312765
serve: "npm:^14.2.1"
1276412766
languageName: unknown
1276512767
linkType: soft
@@ -13496,6 +13498,61 @@ __metadata:
1349613498
languageName: node
1349713499
linkType: hard
1349813500

13501+
"prettier-plugin-tailwindcss@npm:^0.5.11":
13502+
version: 0.5.14
13503+
resolution: "prettier-plugin-tailwindcss@npm:0.5.14"
13504+
peerDependencies:
13505+
"@ianvs/prettier-plugin-sort-imports": "*"
13506+
"@prettier/plugin-pug": "*"
13507+
"@shopify/prettier-plugin-liquid": "*"
13508+
"@trivago/prettier-plugin-sort-imports": "*"
13509+
"@zackad/prettier-plugin-twig-melody": "*"
13510+
prettier: ^3.0
13511+
prettier-plugin-astro: "*"
13512+
prettier-plugin-css-order: "*"
13513+
prettier-plugin-import-sort: "*"
13514+
prettier-plugin-jsdoc: "*"
13515+
prettier-plugin-marko: "*"
13516+
prettier-plugin-organize-attributes: "*"
13517+
prettier-plugin-organize-imports: "*"
13518+
prettier-plugin-sort-imports: "*"
13519+
prettier-plugin-style-order: "*"
13520+
prettier-plugin-svelte: "*"
13521+
peerDependenciesMeta:
13522+
"@ianvs/prettier-plugin-sort-imports":
13523+
optional: true
13524+
"@prettier/plugin-pug":
13525+
optional: true
13526+
"@shopify/prettier-plugin-liquid":
13527+
optional: true
13528+
"@trivago/prettier-plugin-sort-imports":
13529+
optional: true
13530+
"@zackad/prettier-plugin-twig-melody":
13531+
optional: true
13532+
prettier-plugin-astro:
13533+
optional: true
13534+
prettier-plugin-css-order:
13535+
optional: true
13536+
prettier-plugin-import-sort:
13537+
optional: true
13538+
prettier-plugin-jsdoc:
13539+
optional: true
13540+
prettier-plugin-marko:
13541+
optional: true
13542+
prettier-plugin-organize-attributes:
13543+
optional: true
13544+
prettier-plugin-organize-imports:
13545+
optional: true
13546+
prettier-plugin-sort-imports:
13547+
optional: true
13548+
prettier-plugin-style-order:
13549+
optional: true
13550+
prettier-plugin-svelte:
13551+
optional: true
13552+
checksum: 10c0/9857873cb8cb0d9b7b895806e7f6265617a08805691125d282767dffb1cb3d2c4c662f2b9168ef391edc40dff1b81beb99eee488f96544e01b8924db694f2299
13553+
languageName: node
13554+
linkType: hard
13555+
1349913556
"prettier@npm:^3.0.0, prettier@npm:^3.0.3, prettier@npm:^3.2.4":
1350013557
version: 3.2.4
1350113558
resolution: "prettier@npm:3.2.4"
@@ -13505,6 +13562,15 @@ __metadata:
1350513562
languageName: node
1350613563
linkType: hard
1350713564

13565+
"prettier@npm:^3.3.3":
13566+
version: 3.4.2
13567+
resolution: "prettier@npm:3.4.2"
13568+
bin:
13569+
prettier: bin/prettier.cjs
13570+
checksum: 10c0/99e076a26ed0aba4ebc043880d0f08bbb8c59a4c6641cdee6cdadf2205bdd87aa1d7823f50c3aea41e015e99878d37c58d7b5f0e663bba0ef047f94e36b96446
13571+
languageName: node
13572+
linkType: hard
13573+
1350813574
"pretty-bytes@npm:^5.6.0":
1350913575
version: 5.6.0
1351013576
resolution: "pretty-bytes@npm:5.6.0"

0 commit comments

Comments
 (0)