Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different prettier settings #19

Merged
merged 1 commit into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ module.exports = {
DROP: false,
},
plugins: ["jest", "node"],
extends: [
"eslint:recommended",
"plugin:jest/recommended",
"plugin:@sap/cds/recommended",
"prettier",
],
extends: ["eslint:recommended", "plugin:jest/recommended", "plugin:@sap/cds/recommended", "prettier"],
rules: {
"no-unused-vars": [
"error",
Expand Down
3 changes: 3 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
printWidth: 120
trailingComma: es5
10 changes: 2 additions & 8 deletions docs/implement-event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ for each queueEntry. Each queueEntry may have a different status.
```js
"use strict";

const {
EventQueueBaseClass,
EventProcessingStatus,
} = require("@cap-js-community/event-queue");
const { EventQueueBaseClass, EventProcessingStatus } = require("@cap-js-community/event-queue");

class EventQueueMinimalistic extends EventQueueBaseClass {
constructor(context, eventType, eventSubType, config) {
Expand Down Expand Up @@ -96,10 +93,7 @@ class EventQueueAdvanced extends EventQueueBaseClass {
}

async checkEventAndGeneratePayload(queueEntry) {
const eventStillValid = await checkEventIsStillValid(
this.tx,
queueEntry.payload
);
const eventStillValid = await checkEventIsStillValid(this.tx, queueEntry.payload);
if (!eventStillValid) {
this.logger.info("Event not valid anymore, skipping processing", {
eventType: this.__eventType,
Expand Down
15 changes: 5 additions & 10 deletions src/EventQueueError.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@ const ERROR_CODES = {

const ERROR_CODES_META = {
[ERROR_CODES.WRONG_TX_USAGE]: {
message:
"Usage of this.tx|this.context is not allowed if parallel event processing is enabled",
message: "Usage of this.tx|this.context is not allowed if parallel event processing is enabled",
},
[ERROR_CODES.UNKNOWN_EVENT_TYPE]: {
message:
"The event type and subType configuration is not configured! Maintain the combination in the config file.",
message: "The event type and subType configuration is not configured! Maintain the combination in the config file.",
},
[ERROR_CODES.NOT_INITIALIZED]: {
message:
Expand All @@ -33,16 +31,13 @@ const ERROR_CODES_META = {
message: "disabled reconnect, because we are not running on cloud foundry",
},
[ERROR_CODES.MISSING_TABLE_DEFINITION]: {
message:
"Could not find table in csn. Make sure the provided table name is correct and the table is known by CDS.",
message: "Could not find table in csn. Make sure the provided table name is correct and the table is known by CDS.",
},
[ERROR_CODES.MISSING_ELEMENT_IN_TABLE]: {
message:
"The provided table doesn't match the required structure. At least the following element is missing.",
message: "The provided table doesn't match the required structure. At least the following element is missing.",
},
[ERROR_CODES.TYPE_MISMATCH_TABLE]: {
message:
"At least one field in the provided table doesn't have the expected data type.",
message: "At least one field in the provided table doesn't have the expected data type.",
},
};

Expand Down
Loading