Skip to content

Commit b9fed1c

Browse files
committed
add prettier
1 parent 74e5c45 commit b9fed1c

File tree

10 files changed

+110
-186
lines changed

10 files changed

+110
-186
lines changed

.eslintignore

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
node_modules
2-
tools/marketplace-config-validator/schema.*
1+
# dependecies
2+
/node_modules
3+
4+
# artifacts
5+
/tools/marketplace-config-validator/schema.*

.eslintrc.js

+7-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
module.exports = {
2-
env: {
3-
es6: true,
4-
browser: true,
5-
node: true,
6-
},
7-
extends: [
8-
'eslint:recommended',
9-
"plugin:jsonc/recommended-with-json",
10-
]
11-
};
2+
env: {
3+
es6: true,
4+
browser: true,
5+
node: true,
6+
},
7+
extends: ['eslint:recommended', 'plugin:jsonc/recommended-with-json'],
8+
}

.prettierignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# dependecies
2+
/node_modules
3+
4+
# artifacts
5+
/tools/marketplace-config-validator/schema.*

.prettierrc.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"trailingComma": "es5",
3+
"tabWidth": 2,
4+
"semi": false,
5+
"singleQuote": true,
6+
"useTabs": true,
7+
"bracketSpacing": true
8+
}

configs/marketplace/base-goerli.json

+23-27
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,24 @@
11
[
2-
{
3-
"author": "Uniswap",
4-
"id": "uniswap",
5-
"title": "Uniswap",
6-
"logo": "https://www.gitbook.com/cdn-cgi/image/width=288,dpr=2.200000047683716,format=auto/https%3A%2F%2Ffiles.gitbook.com%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-Lq1XoWGmy8zggj_u2fM%252Fuploads%252FT8RR0UqqvH6wAVfaaM4f%252FUniswap.png%3Falt%3Dmedia%26token%3D797851a0-2d80-4f7b-8d80-f9ba664c0b3d",
7-
"categories": [
8-
"tools"
9-
],
10-
"shortDescription": "Uniswap is a cryptocurrency exchange which uses a decentralized network protocol.",
11-
"site": "https://docs.uniswap.org/",
12-
"description": "Uniswap is a cryptocurrency exchange which uses a decentralized network protocol.",
13-
"url": "https://app.uniswap.org/swap"
14-
},
15-
{
16-
"author": "Aave",
17-
"id": "aave",
18-
"title": "Aave",
19-
"logo": "https://www.gitbook.com/cdn-cgi/image/width=288,dpr=2.200000047683716,format=auto/https%3A%2F%2Ffiles.gitbook.com%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-Lq1XoWGmy8zggj_u2fM%252Fuploads%252FaNQY8jHNue30P2caV79v%252FAave.png%3Falt%3Dmedia%26token%3Dda9ea09b-a5d8-4bf1-bdfe-41837eebdd03",
20-
"categories": [
21-
"tools"
22-
],
23-
"shortDescription": "Aave is a decentralised non-custodial liquidity market protocol where users can participate as suppliers or borrowers. Suppliers provide liquidity to the market to earn a passive income, while borrowers are able to borrow in an overcollateralised (perpetually) or undercollateralised (one-block liquidity) fashion.",
24-
"site": "https://docs.aave.com/faq/",
25-
"description": "Aave is a decentralised non-custodial liquidity market protocol where users can participate as suppliers or borrowers. Suppliers provide liquidity to the market to earn a passive income, while borrowers are able to borrow in an overcollateralised (perpetually) or undercollateralised (one-block liquidity) fashion.",
26-
"url": "https://staging.aave.com/"
27-
}
28-
]
2+
{
3+
"author": "Uniswap",
4+
"id": "uniswap",
5+
"title": "Uniswap",
6+
"logo": "https://www.gitbook.com/cdn-cgi/image/width=288,dpr=2.200000047683716,format=auto/https%3A%2F%2Ffiles.gitbook.com%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-Lq1XoWGmy8zggj_u2fM%252Fuploads%252FT8RR0UqqvH6wAVfaaM4f%252FUniswap.png%3Falt%3Dmedia%26token%3D797851a0-2d80-4f7b-8d80-f9ba664c0b3d",
7+
"categories": ["tools"],
8+
"shortDescription": "Uniswap is a cryptocurrency exchange which uses a decentralized network protocol.",
9+
"site": "https://docs.uniswap.org/",
10+
"description": "Uniswap is a cryptocurrency exchange which uses a decentralized network protocol.",
11+
"url": "https://app.uniswap.org/swap"
12+
},
13+
{
14+
"author": "Aave",
15+
"id": "aave",
16+
"title": "Aave",
17+
"logo": "https://www.gitbook.com/cdn-cgi/image/width=288,dpr=2.200000047683716,format=auto/https%3A%2F%2Ffiles.gitbook.com%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-Lq1XoWGmy8zggj_u2fM%252Fuploads%252FaNQY8jHNue30P2caV79v%252FAave.png%3Falt%3Dmedia%26token%3Dda9ea09b-a5d8-4bf1-bdfe-41837eebdd03",
18+
"categories": ["tools"],
19+
"shortDescription": "Aave is a decentralised non-custodial liquidity market protocol where users can participate as suppliers or borrowers. Suppliers provide liquidity to the market to earn a passive income, while borrowers are able to borrow in an overcollateralised (perpetually) or undercollateralised (one-block liquidity) fashion.",
20+
"site": "https://docs.aave.com/faq/",
21+
"description": "Aave is a decentralised non-custodial liquidity market protocol where users can participate as suppliers or borrowers. Suppliers provide liquidity to the market to earn a passive income, while borrowers are able to borrow in an overcollateralised (perpetually) or undercollateralised (one-block liquidity) fashion.",
22+
"url": "https://staging.aave.com/"
23+
}
24+
]

package.json

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
2-
"name": "blockscout_frontend-configs",
3-
"version": "1.0.0",
4-
"private": false,
5-
"license": "MIT",
6-
"devDependencies": {
7-
"eslint": "^8.37.0",
8-
"eslint-plugin-jsonc": "^2.7.0",
9-
"ts-to-zod": "^3.0.0",
10-
"typescript": "^5.0.3",
11-
"zod": "^3.21.4"
12-
}
2+
"name": "blockscout_frontend-configs",
3+
"version": "1.0.0",
4+
"private": false,
5+
"license": "MIT",
6+
"devDependencies": {
7+
"eslint": "^8.37.0",
8+
"eslint-plugin-jsonc": "^2.7.0",
9+
"prettier": "2.8.7",
10+
"ts-to-zod": "^3.0.0",
11+
"typescript": "^5.0.3",
12+
"zod": "^3.21.4"
13+
}
1314
}
+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const baseGoerliConfig = require('../../configs/marketplace/base-goerli.json') ;
2-
const { appItemOverviewSchema } = require('./schema.js');
1+
const baseGoerliConfig = require('../../configs/marketplace/base-goerli.json')
2+
const { appItemOverviewSchema } = require('./schema.js')
33

4-
console.log('Checking base-goerli.json...');
5-
appItemOverviewSchema.array().parse(baseGoerliConfig);
6-
console.log('All good!');
4+
console.log('Checking base-goerli.json...')
5+
appItemOverviewSchema.array().parse(baseGoerliConfig)
6+
console.log('All good!')
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"compilerOptions": {
3-
"target": "es6",
4-
"skipLibCheck": true,
5-
"strict": true,
6-
"esModuleInterop": true,
7-
"module": "CommonJS",
8-
"moduleResolution": "node",
9-
"isolatedModules": true,
10-
"incremental": true,
11-
"baseUrl": "."
12-
},
13-
"include": ["./schema.ts"],
14-
"exclude": ["node_modules"]
2+
"compilerOptions": {
3+
"target": "es6",
4+
"skipLibCheck": true,
5+
"strict": true,
6+
"esModuleInterop": true,
7+
"module": "CommonJS",
8+
"moduleResolution": "node",
9+
"isolatedModules": true,
10+
"incremental": true,
11+
"baseUrl": "."
12+
},
13+
"include": ["./schema.ts"],
14+
"exclude": ["node_modules"]
1515
}
+26-15
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,34 @@
1-
export type MarketplaceCategoriesIds = 'all' | 'favorites' | 'defi' | 'exchanges' | 'finance' | 'games' | 'marketplaces' | 'nft' |
2-
'security' | 'social' | 'tools' | 'yieldFarming';
1+
export type MarketplaceCategoriesIds =
2+
| 'all'
3+
| 'favorites'
4+
| 'defi'
5+
| 'exchanges'
6+
| 'finance'
7+
| 'games'
8+
| 'marketplaces'
9+
| 'nft'
10+
| 'security'
11+
| 'social'
12+
| 'tools'
13+
| 'yieldFarming'
314

415
export type MarketplaceCategory = { id: MarketplaceCategoriesIds; name: string }
516

617
export type AppItemPreview = {
7-
id: string;
8-
external?: boolean;
9-
title: string;
10-
logo: string;
11-
shortDescription: string;
12-
categories: Array<MarketplaceCategoriesIds>;
13-
url: string;
18+
id: string
19+
external?: boolean
20+
title: string
21+
logo: string
22+
shortDescription: string
23+
categories: Array<MarketplaceCategoriesIds>
24+
url: string
1425
}
1526

1627
export type AppItemOverview = AppItemPreview & {
17-
author: string;
18-
description: string;
19-
site?: string;
20-
twitter?: string;
21-
telegram?: string;
22-
github?: string;
28+
author: string
29+
description: string
30+
site?: string
31+
twitter?: string
32+
telegram?: string
33+
github?: string
2334
}

yarn.lock

+6-103
Original file line numberDiff line numberDiff line change
@@ -191,90 +191,6 @@
191191
widest-line "^3.1.0"
192192
wrap-ansi "^6.2.0"
193193

194-
"@types/json-schema@^7.0.9":
195-
version "7.0.11"
196-
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3"
197-
integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==
198-
199-
"@types/semver@^7.3.12":
200-
version "7.3.13"
201-
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91"
202-
integrity sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==
203-
204-
"@typescript-eslint/eslint-plugin@^5.57.0":
205-
version "5.57.0"
206-
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.57.0.tgz#52c8a7a4512f10e7249ca1e2e61f81c62c34365c"
207-
integrity sha512-itag0qpN6q2UMM6Xgk6xoHa0D0/P+M17THnr4SVgqn9Rgam5k/He33MA7/D7QoJcdMxHFyX7U9imaBonAX/6qA==
208-
dependencies:
209-
"@eslint-community/regexpp" "^4.4.0"
210-
"@typescript-eslint/scope-manager" "5.57.0"
211-
"@typescript-eslint/type-utils" "5.57.0"
212-
"@typescript-eslint/utils" "5.57.0"
213-
debug "^4.3.4"
214-
grapheme-splitter "^1.0.4"
215-
ignore "^5.2.0"
216-
natural-compare-lite "^1.4.0"
217-
semver "^7.3.7"
218-
tsutils "^3.21.0"
219-
220-
"@typescript-eslint/[email protected]":
221-
version "5.57.0"
222-
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.57.0.tgz#79ccd3fa7bde0758059172d44239e871e087ea36"
223-
integrity sha512-NANBNOQvllPlizl9LatX8+MHi7bx7WGIWYjPHDmQe5Si/0YEYfxSljJpoTyTWFTgRy3X8gLYSE4xQ2U+aCozSw==
224-
dependencies:
225-
"@typescript-eslint/types" "5.57.0"
226-
"@typescript-eslint/visitor-keys" "5.57.0"
227-
228-
"@typescript-eslint/[email protected]":
229-
version "5.57.0"
230-
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.57.0.tgz#98e7531c4e927855d45bd362de922a619b4319f2"
231-
integrity sha512-kxXoq9zOTbvqzLbdNKy1yFrxLC6GDJFE2Yuo3KqSwTmDOFjUGeWSakgoXT864WcK5/NAJkkONCiKb1ddsqhLXQ==
232-
dependencies:
233-
"@typescript-eslint/typescript-estree" "5.57.0"
234-
"@typescript-eslint/utils" "5.57.0"
235-
debug "^4.3.4"
236-
tsutils "^3.21.0"
237-
238-
"@typescript-eslint/[email protected]":
239-
version "5.57.0"
240-
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.57.0.tgz#727bfa2b64c73a4376264379cf1f447998eaa132"
241-
integrity sha512-mxsod+aZRSyLT+jiqHw1KK6xrANm19/+VFALVFP5qa/aiJnlP38qpyaTd0fEKhWvQk6YeNZ5LGwI1pDpBRBhtQ==
242-
243-
"@typescript-eslint/[email protected]":
244-
version "5.57.0"
245-
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.57.0.tgz#ebcd0ee3e1d6230e888d88cddf654252d41e2e40"
246-
integrity sha512-LTzQ23TV82KpO8HPnWuxM2V7ieXW8O142I7hQTxWIHDcCEIjtkat6H96PFkYBQqGFLW/G/eVVOB9Z8rcvdY/Vw==
247-
dependencies:
248-
"@typescript-eslint/types" "5.57.0"
249-
"@typescript-eslint/visitor-keys" "5.57.0"
250-
debug "^4.3.4"
251-
globby "^11.1.0"
252-
is-glob "^4.0.3"
253-
semver "^7.3.7"
254-
tsutils "^3.21.0"
255-
256-
"@typescript-eslint/[email protected]":
257-
version "5.57.0"
258-
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.57.0.tgz#eab8f6563a2ac31f60f3e7024b91bf75f43ecef6"
259-
integrity sha512-ps/4WohXV7C+LTSgAL5CApxvxbMkl9B9AUZRtnEFonpIxZDIT7wC1xfvuJONMidrkB9scs4zhtRyIwHh4+18kw==
260-
dependencies:
261-
"@eslint-community/eslint-utils" "^4.2.0"
262-
"@types/json-schema" "^7.0.9"
263-
"@types/semver" "^7.3.12"
264-
"@typescript-eslint/scope-manager" "5.57.0"
265-
"@typescript-eslint/types" "5.57.0"
266-
"@typescript-eslint/typescript-estree" "5.57.0"
267-
eslint-scope "^5.1.1"
268-
semver "^7.3.7"
269-
270-
"@typescript-eslint/[email protected]":
271-
version "5.57.0"
272-
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.57.0.tgz#e2b2f4174aff1d15eef887ce3d019ecc2d7a8ac1"
273-
integrity sha512-ery2g3k0hv5BLiKpPuwYt9KBkAp2ugT6VvyShXdLOkax895EC55sP0Tx5L0fZaQueiK3fBLvHVvEl3jFS5ia+g==
274-
dependencies:
275-
"@typescript-eslint/types" "5.57.0"
276-
eslint-visitor-keys "^3.3.0"
277-
278194
"@typescript/vfs@^1.3.5":
279195
version "1.4.0"
280196
resolved "https://registry.yarnpkg.com/@typescript/vfs/-/vfs-1.4.0.tgz#2d22985c7666c9d4ce26eb025405e6f156aa32b0"
@@ -546,14 +462,6 @@ eslint-plugin-jsonc@^2.7.0:
546462
jsonc-eslint-parser "^2.0.4"
547463
natural-compare "^1.4.0"
548464

549-
eslint-scope@^5.1.1:
550-
version "5.1.1"
551-
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c"
552-
integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==
553-
dependencies:
554-
esrecurse "^4.3.0"
555-
estraverse "^4.1.1"
556-
557465
eslint-scope@^7.1.1:
558466
version "7.1.1"
559467
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642"
@@ -641,11 +549,6 @@ esrecurse@^4.3.0:
641549
dependencies:
642550
estraverse "^5.2.0"
643551

644-
estraverse@^4.1.1:
645-
version "4.3.0"
646-
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d"
647-
integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==
648-
649552
estraverse@^5.1.0, estraverse@^5.2.0:
650553
version "5.3.0"
651554
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123"
@@ -1092,11 +995,6 @@ [email protected]:
1092995
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
1093996
integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==
1094997

1095-
natural-compare-lite@^1.4.0:
1096-
version "1.4.0"
1097-
resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4"
1098-
integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==
1099-
1100998
natural-compare@^1.4.0:
1101999
version "1.4.0"
11021000
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
@@ -1214,6 +1112,11 @@ [email protected]:
12141112
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5"
12151113
integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==
12161114

1115+
1116+
version "2.8.7"
1117+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.7.tgz#bb79fc8729308549d28fe3a98fce73d2c0656450"
1118+
integrity sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==
1119+
12171120
punycode@^2.1.0:
12181121
version "2.3.0"
12191122
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f"
@@ -1294,7 +1197,7 @@ safe-buffer@~5.2.0:
12941197
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
12951198
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
12961199

1297-
semver@^7.3.5, semver@^7.3.7, semver@^7.3.8:
1200+
semver@^7.3.5, semver@^7.3.8:
12981201
version "7.3.8"
12991202
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798"
13001203
integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==

0 commit comments

Comments
 (0)