From 7dee534e952bc19da7dfa362e1e88614d11c877f Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Mon, 2 May 2022 20:01:02 +0200 Subject: [PATCH] chore: fix prettier problems --- examples/simple-react/src/App.js | 7 +++++- examples/simple-react/src/Asyncapi.js | 31 +++++++++++---------------- library/src/types.ts | 1 - package.json | 4 ++-- 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/examples/simple-react/src/App.js b/examples/simple-react/src/App.js index aeed178..b4ce61d 100644 --- a/examples/simple-react/src/App.js +++ b/examples/simple-react/src/App.js @@ -1,4 +1,9 @@ -import { ApplicationView, Application, Outgoing, Incoming } from '@lagoni/edavisualiser'; +import { + ApplicationView, + Application, + Outgoing, + Incoming, +} from '@lagoni/edavisualiser'; import '@lagoni/edavisualiser/styles/default.css'; import './App.css'; diff --git a/examples/simple-react/src/Asyncapi.js b/examples/simple-react/src/Asyncapi.js index a99d5d7..d510b09 100644 --- a/examples/simple-react/src/Asyncapi.js +++ b/examples/simple-react/src/Asyncapi.js @@ -1,10 +1,10 @@ -import React, {useState, useEffect} from 'react'; +import React, { useState, useEffect } from 'react'; import { ApplicationView, AsyncAPIApplication } from '@lagoni/edavisualiser'; import '@lagoni/edavisualiser/styles/default.css'; import './App.css'; import '@asyncapi/parser/dist/bundle'; const parser = window['AsyncAPIParser']; -function Asyncapi() { +function Asyncapi() { const [data, setData] = useState(undefined); useEffect(() => { // declare the async data fetching function @@ -227,29 +227,24 @@ function Asyncapi() { // set state with the result setData(doc); - } + }; // call the function fetchData() // make sure to catch any error - .catch(console.error);; - }, []) + .catch(console.error); + }, []); let something; - if(data !== undefined) { - something = - - - + if (data !== undefined) { + something = ( + + + + ); } else { - something =

Not loaded

+ something =

Not loaded

; } - return ( -
- {something} -
- ); + return
{something}
; } export default Asyncapi; diff --git a/library/src/types.ts b/library/src/types.ts index b343bd5..cf2f929 100644 --- a/library/src/types.ts +++ b/library/src/types.ts @@ -1,4 +1,3 @@ - export interface ApplicationLicenseData { name: string; url: string; diff --git a/package.json b/package.json index fe36c23..e3014a6 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "start": "lerna exec --parallel -- npm run start", "test": "cd library && npm test", "build": "cd library && npm run prepare", - "lint": "tslint -c ./tslint.json --project tsconfig.base.json --format verbose && prettier --check \"**/*.{ts,tsx,js,jsx,json,html,css,yaml}\"", - "lint:fix": "tslint -c ./tslint.json --project tsconfig.base.json --format verbose --fix && prettier --write '**/*.{ts,tsx,js,jsx,json,html,css,yaml}'", + "lint": "prettier --check \"**/*.{ts,tsx,js,jsx,json,html,css,yaml}\" && tslint -c ./tslint.json --project tsconfig.base.json --format verbose", + "lint:fix": "prettier --write '**/*.{ts,tsx,js,jsx,json,html,css,yaml}' && tslint -c ./tslint.json --project tsconfig.base.json --format verbose --fix", "conflict-check": "tslint-config-prettier-check ./tslint.json", "markdownlint": "markdownlint **/*.md", "release": "semantic-release",