Skip to content

Commit

Permalink
chore: update prettier scripts (#1636)
Browse files Browse the repository at this point in the history
  • Loading branch information
tatomyr authored Jul 22, 2024
1 parent 368c34f commit c3ed020
Show file tree
Hide file tree
Showing 17 changed files with 171 additions and 108 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ output/
*snapshot.js
packages/core/src/rules/__tests__/fixtures/invalid-yaml.yaml
__tests__/webpack-bundle/bundle-workflows/metafile.json
benchmark/api-definitions/
LICENSE.md
4 changes: 2 additions & 2 deletions __tests__/lint/async2/anyof.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ components:
testMessages:
payload:
anyOf: # anyOf in payload schema
- $ref: "#/components/schemas/objectWithKey"
- $ref: "#/components/schemas/objectWithKey2"
- $ref: '#/components/schemas/objectWithKey'
- $ref: '#/components/schemas/objectWithKey2'

schemas:
objectWithKey:
Expand Down
8 changes: 4 additions & 4 deletions __tests__/lint/async2/application-headers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ components:
title: Light measured
summary: Inform about environmental lighting conditions of a particular streetlight.
correlationId:
location: "$message.header#/MQMD/CorrelId"
location: '$message.header#/MQMD/CorrelId'
contentType: application/json
headers:
type: object
Expand All @@ -54,9 +54,9 @@ components:
maxLength: 24
format: binary
applicationInstanceId:
$ref: "#/components/schemas/applicationInstanceId"
$ref: '#/components/schemas/applicationInstanceId'
payload:
$ref: "#/components/schemas/lightMeasuredPayload"
$ref: '#/components/schemas/lightMeasuredPayload'

schemas:
lightMeasuredPayload:
Expand All @@ -67,7 +67,7 @@ components:
minimum: 0
description: Light intensity measured in lumens.
sentAt:
$ref: "#/components/schemas/sentAt"
$ref: '#/components/schemas/sentAt'
sentAt:
type: string
format: date-time
Expand Down
18 changes: 9 additions & 9 deletions __tests__/lint/async2/correlation-id.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ servers:
security:
- apiKey: []
- supportedOauthFlows:
- streetlights:on
- streetlights:off
- streetlights:dim
- streetlights:on
- streetlights:off
- streetlights:dim
- openIdConnectWellKnown: []

defaultContentType: application/json
Expand Down Expand Up @@ -56,18 +56,18 @@ components:
title: Light measured
summary: Inform about environmental lighting conditions of a particular streetlight.
correlationId:
location: "$message.header#/MQMD/CorrelId"
location: '$message.header#/MQMD/CorrelId'
contentType: application/json
payload:
$ref: "#/components/schemas/lightMeasuredPayload"
$ref: '#/components/schemas/lightMeasuredPayload'
dimLight:
name: dimLight
title: Dim light
summary: Command a particular streetlight to dim the lights.
correlationId:
$ref: "#/components/correlationIds/sentAtCorrelator"
$ref: '#/components/correlationIds/sentAtCorrelator'
payload:
$ref: "#/components/schemas/dimLightPayload"
$ref: '#/components/schemas/dimLightPayload'

schemas:
lightMeasuredPayload:
Expand All @@ -78,7 +78,7 @@ components:
minimum: 0
description: Light intensity measured in lumens.
sentAt:
$ref: "#/components/schemas/sentAt"
$ref: '#/components/schemas/sentAt'
dimLightPayload:
type: object
properties:
Expand All @@ -88,7 +88,7 @@ components:
minimum: 0
maximum: 100
sentAt:
$ref: "#/components/schemas/sentAt"
$ref: '#/components/schemas/sentAt'
sentAt:
type: string
format: date-time
Expand Down
2 changes: 1 addition & 1 deletion __tests__/lint/async2/gitter-streaming.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ components:
bindings:
http:
$ref: '#/components/messageBindings/streamingHeaders'

messageBindings:
streamingHeaders:
http:
Expand Down
2 changes: 1 addition & 1 deletion __tests__/lint/async2/mercure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ channels:
type: integer
subscribe:
message:
$ref: '#/components/messages/book'
$ref: '#/components/messages/book'
publish:
message:
$ref: '#/components/messages/book'
Expand Down
2 changes: 1 addition & 1 deletion __tests__/lint/async2/not.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ components:
messages:
testMessages:
payload:
$ref: "#/components/schemas/testSchema"
$ref: '#/components/schemas/testSchema'

schemas:
testSchema:
Expand Down
12 changes: 6 additions & 6 deletions __tests__/lint/async2/oneof.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ channels:
# Use oneOf here if different messages are published on test2 topic.
oneOf:
- payload:
$ref: "#/components/schemas/objectWithKey"
$ref: '#/components/schemas/objectWithKey'
- payload:
$ref: "#/components/schemas/objectWithKey2"
$ref: '#/components/schemas/objectWithKey2'

components:
messages:
testMessages:
payload:
oneOf: # oneOf in payload schema
- $ref: "#/components/schemas/objectWithKey"
- $ref: "#/components/schemas/objectWithKey2"
- $ref: '#/components/schemas/objectWithKey'
- $ref: '#/components/schemas/objectWithKey2'
testMessage1:
payload:
$ref: "#/components/schemas/objectWithKey"
$ref: '#/components/schemas/objectWithKey'
testMessage2:
payload:
$ref: "#/components/schemas/objectWithKey2"
$ref: '#/components/schemas/objectWithKey2'

schemas:
objectWithKey:
Expand Down
2 changes: 1 addition & 1 deletion __tests__/lint/async2/rpc-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ channels:
items:
type: number
examples:
- [4,3]
- [4, 3]
2 changes: 1 addition & 1 deletion __tests__/lint/async2/rpc-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ channels:
items:
type: number
examples:
- [4,3]
- [4, 3]
4 changes: 2 additions & 2 deletions __tests__/lint/async2/slack-rtm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ components:
channel:
type: string
channelHistoryChanged:
summary: 'Bulk updates were made to a channel''s history.'
summary: "Bulk updates were made to a channel's history."
payload:
type: object
properties:
Expand Down Expand Up @@ -623,7 +623,7 @@ components:
channel:
type: string
groupHistoryChanged:
summary: 'Bulk updates were made to a private channel''s history.'
summary: "Bulk updates were made to a private channel's history."
payload:
type: object
properties:
Expand Down
36 changes: 18 additions & 18 deletions __tests__/lint/async2/streetlights-kafka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,25 @@ servers:
security:
- saslScram: []
tags:
- name: "env:test-scram"
description: "This environment is meant for running internal tests through scramSha256"
- name: "kind:remote"
description: "This server is a remote server. Not exposed by the application"
- name: "visibility:private"
description: "This resource is private and only available to certain users"
- name: 'env:test-scram'
description: 'This environment is meant for running internal tests through scramSha256'
- name: 'kind:remote'
description: 'This server is a remote server. Not exposed by the application'
- name: 'visibility:private'
description: 'This resource is private and only available to certain users'
mtls-connections:
url: test.mykafkacluster.org:28092
protocol: kafka-secure
description: Test broker secured with X509
security:
- certs: []
tags:
- name: "env:test-mtls"
description: "This environment is meant for running internal tests through mtls"
- name: "kind:remote"
description: "This server is a remote server. Not exposed by the application"
- name: "visibility:private"
description: "This resource is private and only available to certain users"
- name: 'env:test-mtls'
description: 'This environment is meant for running internal tests through mtls'
- name: 'kind:remote'
description: 'This server is a remote server. Not exposed by the application'
- name: 'visibility:private'
description: 'This resource is private and only available to certain users'

defaultContentType: application/json

Expand Down Expand Up @@ -101,23 +101,23 @@ components:
traits:
- $ref: '#/components/messageTraits/commonHeaders'
payload:
$ref: "#/components/schemas/lightMeasuredPayload"
$ref: '#/components/schemas/lightMeasuredPayload'
turnOnOff:
name: turnOnOff
title: Turn on/off
summary: Command a particular streetlight to turn the lights on or off.
traits:
- $ref: '#/components/messageTraits/commonHeaders'
payload:
$ref: "#/components/schemas/turnOnOffPayload"
$ref: '#/components/schemas/turnOnOffPayload'
dimLight:
name: dimLight
title: Dim light
summary: Command a particular streetlight to dim the lights.
traits:
- $ref: '#/components/messageTraits/commonHeaders'
payload:
$ref: "#/components/schemas/dimLightPayload"
$ref: '#/components/schemas/dimLightPayload'

schemas:
lightMeasuredPayload:
Expand All @@ -128,7 +128,7 @@ components:
minimum: 0
description: Light intensity measured in lumens.
sentAt:
$ref: "#/components/schemas/sentAt"
$ref: '#/components/schemas/sentAt'
turnOnOffPayload:
type: object
properties:
Expand All @@ -139,7 +139,7 @@ components:
- off
description: Whether to turn on or off the light.
sentAt:
$ref: "#/components/schemas/sentAt"
$ref: '#/components/schemas/sentAt'
dimLightPayload:
type: object
properties:
Expand All @@ -149,7 +149,7 @@ components:
minimum: 0
maximum: 100
sentAt:
$ref: "#/components/schemas/sentAt"
$ref: '#/components/schemas/sentAt'
sentAt:
type: string
format: date-time
Expand Down
30 changes: 15 additions & 15 deletions __tests__/lint/async2/streetlights-mqtt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ servers:
security:
- apiKey: []
- supportedOauthFlows:
- streetlights:on
- streetlights:off
- streetlights:dim
- streetlights:on
- streetlights:off
- streetlights:dim
- openIdConnectWellKnown: []
tags:
- name: "env:production"
description: "This environment is meant for production use case"
- name: "kind:remote"
description: "This server is a remote server. Not exposed by the application"
- name: "visibility:public"
description: "This resource is public and available to everyone"
- name: 'env:production'
description: 'This environment is meant for production use case'
- name: 'kind:remote'
description: 'This server is a remote server. Not exposed by the application'
- name: 'visibility:public'
description: 'This resource is public and available to everyone'

defaultContentType: application/json

Expand Down Expand Up @@ -100,23 +100,23 @@ components:
traits:
- $ref: '#/components/messageTraits/commonHeaders'
payload:
$ref: "#/components/schemas/lightMeasuredPayload"
$ref: '#/components/schemas/lightMeasuredPayload'
turnOnOff:
name: turnOnOff
title: Turn on/off
summary: Command a particular streetlight to turn the lights on or off.
traits:
- $ref: '#/components/messageTraits/commonHeaders'
payload:
$ref: "#/components/schemas/turnOnOffPayload"
$ref: '#/components/schemas/turnOnOffPayload'
dimLight:
name: dimLight
title: Dim light
summary: Command a particular streetlight to dim the lights.
traits:
- $ref: '#/components/messageTraits/commonHeaders'
payload:
$ref: "#/components/schemas/dimLightPayload"
$ref: '#/components/schemas/dimLightPayload'

schemas:
lightMeasuredPayload:
Expand All @@ -127,7 +127,7 @@ components:
minimum: 0
description: Light intensity measured in lumens.
sentAt:
$ref: "#/components/schemas/sentAt"
$ref: '#/components/schemas/sentAt'
turnOnOffPayload:
type: object
properties:
Expand All @@ -138,7 +138,7 @@ components:
- off
description: Whether to turn on or off the light.
sentAt:
$ref: "#/components/schemas/sentAt"
$ref: '#/components/schemas/sentAt'
dimLightPayload:
type: object
properties:
Expand All @@ -148,7 +148,7 @@ components:
minimum: 0
maximum: 100
sentAt:
$ref: "#/components/schemas/sentAt"
$ref: '#/components/schemas/sentAt'
sentAt:
type: string
format: date-time
Expand Down
Loading

1 comment on commit c3ed020

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 77.31% 4577/5920
🟡 Branches 67.16% 2526/3761
🟡 Functions 70.72% 751/1062
🟡 Lines 77.57% 4310/5556

Test suite run success

750 tests passing in 105 suites.

Report generated by 🧪jest coverage report action from c3ed020

Please sign in to comment.