From 14fad62d3116dd472f0f48bda0b358e44a9bf107 Mon Sep 17 00:00:00 2001 From: Leandro Mendoza Date: Tue, 30 Nov 2021 12:22:46 -0300 Subject: [PATCH] fix: lint errors and add to PR pipelines --- .github/workflows/pr.yml | 2 ++ src/dapps/store.ts | 32 ++++++++++++++++---------------- src/index.ts | 4 ++-- test/store.spec.ts | 10 +++++----- 4 files changed, 25 insertions(+), 23 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index b647d40d..69de2398 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -21,6 +21,8 @@ jobs: run: npm run build - name: npm run test run: npm run test + - name: npm run lint + run: npm run lint - name: npm run check-api run: npm run check-api - name: print diff if failed diff --git a/src/dapps/store.ts b/src/dapps/store.ts index 63d22069..4ad60fc1 100644 --- a/src/dapps/store.ts +++ b/src/dapps/store.ts @@ -20,16 +20,16 @@ export namespace Store { type: 'object', properties: { id: { - type: 'string', + type: 'string' }, version: { - type: 'number', + type: 'number' }, owner: { - type: 'string', + type: 'string' }, description: { - type: 'string', + type: 'string' }, links: { type: 'array', @@ -37,14 +37,14 @@ export namespace Store { type: 'object', properties: { name: { - type: 'string', + type: 'string' }, url: { - type: 'string', - }, + type: 'string' + } }, - required: ['name', 'url'], - }, + required: ['name', 'url'] + } }, images: { type: 'array', @@ -52,17 +52,17 @@ export namespace Store { type: 'object', properties: { name: { - type: 'string', + type: 'string' }, file: { - type: 'string', - }, + type: 'string' + } }, - required: ['name', 'file'], - }, - }, + required: ['name', 'file'] + } + } }, - required: ['id', 'version', 'owner', 'description', 'links', 'images'], + required: ['id', 'version', 'owner', 'description', 'links', 'images'] } export const validate: ValidateFunction = generateValidator(schema) diff --git a/src/index.ts b/src/index.ts index 201e2da9..b326212b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,7 +11,7 @@ export { ChainName, getChainId } from './dapps/chain-name' export { Collection, CollectionFilters, - CollectionSortBy, + CollectionSortBy } from './dapps/collection' export { Contract, ContractFilters, ContractSortBy } from './dapps/contract' export { Item, ItemFilters, ItemSortBy } from './dapps/item' @@ -32,7 +32,7 @@ export { World, ValidWorldRange, getWorld, - isInsideWorldLimits, + isInsideWorldLimits } from './dapps/world' export * from './platform' diff --git a/test/store.spec.ts b/test/store.spec.ts index bbec3d24..6e7e61ac 100644 --- a/test/store.spec.ts +++ b/test/store.spec.ts @@ -10,16 +10,16 @@ describe('Contract tests', () => { links: [ { name: 'Discord', - url: 'discord.com/some-store', - }, + url: 'discord.com/some-store' + } ], images: [ { name: 'banner', - file: 'banner.png', - }, + file: 'banner.png' + } ], - version: 1, + version: 1 } testTypeSignature(Store, store)