diff --git a/.eslintrc.json b/.eslintrc.json index d66b93bb..ba5922ed 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -71,10 +71,7 @@ "switches": "never" } ], - "@stylistic/indent": [ - "error", - 4 - ], + "@stylistic/indent": "off", "@stylistic/semi": [ "error", "always" diff --git a/apps/miranum-config-editor-webview/src/App.vue b/apps/miranum-config-editor-webview/src/App.vue index ec899173..20ed5935 100644 --- a/apps/miranum-config-editor-webview/src/App.vue +++ b/apps/miranum-config-editor-webview/src/App.vue @@ -24,7 +24,6 @@ import { createResolver } from "./composables/utils"; // declare const process: { env: { NODE_ENV: string } }; -// eslint-disable-next-line react-hooks/rules-of-hooks const theme = useTheme(); const renderers = [...vuetifyRenderers]; diff --git a/apps/miranum-config-editor-webview/src/composables/vscode.ts b/apps/miranum-config-editor-webview/src/composables/vscode.ts index 987ef5b8..9e03c1d8 100644 --- a/apps/miranum-config-editor-webview/src/composables/vscode.ts +++ b/apps/miranum-config-editor-webview/src/composables/vscode.ts @@ -106,7 +106,7 @@ export class VsCodeMock implements VsCode { case MessageType.syncDocument: { console.log( "[Log] Send data to the backend...", - JSON.parse(payload?.data ?? '{ "data": "No data"}"'), + JSON.parse(payload?.data ?? `{ "data": "No data"}"`), ); break; } diff --git a/apps/miranum-config-editor/src/adapter/adapterIn.ts b/apps/miranum-config-editor/src/adapter/adapterIn.ts index a09537a0..1f7f3b25 100644 --- a/apps/miranum-config-editor/src/adapter/adapterIn.ts +++ b/apps/miranum-config-editor/src/adapter/adapterIn.ts @@ -21,7 +21,7 @@ import { SyncDocumentCommand, SyncDocumentInPort, SyncWebviewCommand, - SyncWebviewInPort + SyncWebviewInPort, } from "../application/portsIn"; import { ConfigEditorData, MessageType, VscMessage } from "@miranum-ide/vscode/shared/miranum-config-editor"; diff --git a/apps/miranum-config-editor/src/application/usecases.ts b/apps/miranum-config-editor/src/application/usecases.ts index 242e539e..a248e76a 100644 --- a/apps/miranum-config-editor/src/application/usecases.ts +++ b/apps/miranum-config-editor/src/application/usecases.ts @@ -24,7 +24,7 @@ import { SyncDocumentCommand, SyncDocumentInPort, SyncWebviewCommand, - SyncWebviewInPort + SyncWebviewInPort, } from "./portsIn"; import { DocumentOutPort, ReaderOutPort, VsCodeConfigOutPort, WebviewOutPort } from "./portsOut"; import { ConfigEditorData, MessageType, VscMessage } from "@miranum-ide/vscode/shared/miranum-config-editor"; diff --git a/apps/miranum-console-webview/.eslintrc.json b/apps/miranum-console-webview/.eslintrc.json index d38215ca..d6d258fd 100644 --- a/apps/miranum-console-webview/.eslintrc.json +++ b/apps/miranum-console-webview/.eslintrc.json @@ -15,7 +15,12 @@ "*.js", "*.jsx" ], - "rules": {} + "rules": { + "@stylistic/jsx-indent-props": [ + "error", + 4 + ] + } }, { "files": [ diff --git a/apps/miranum-console-webview/src/app/app.tsx b/apps/miranum-console-webview/src/app/app.tsx index 064138c6..485a2be3 100644 --- a/apps/miranum-console-webview/src/app/app.tsx +++ b/apps/miranum-console-webview/src/app/app.tsx @@ -38,7 +38,6 @@ export function App() { - {/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */} {view === "generateFile" && ( .json has to be renamed + // type = extension => .json has to be renamed type: file[1], project: projectName ?? "", file: { @@ -103,7 +103,7 @@ export async function getArtifacts( for (const file of files) { const filePath = vscode.Uri.file(path.fsPath + "/" + file[0]); if (file[1] !== 1) { - //going through sub-folders + // going through sub-folders artifacts.push(...(await getArtifacts(filePath, projectName))); } else { artifacts.push(await getArtifact(filePath, projectName)); diff --git a/apps/miranum-console/src/app/vscode/MiranumTreeItems.ts b/apps/miranum-console/src/app/vscode/MiranumTreeItems.ts index d8458ab2..c0371382 100644 --- a/apps/miranum-console/src/app/vscode/MiranumTreeItems.ts +++ b/apps/miranum-console/src/app/vscode/MiranumTreeItems.ts @@ -12,16 +12,12 @@ export class FolderItem extends TreeItem { /** * @override */ - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - public readonly label: string; + public override readonly label: string; /** * @override */ - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - public readonly collapsibleState: TreeItemCollapsibleState; + public override readonly collapsibleState: TreeItemCollapsibleState; /** * The URI of the directory or file. diff --git a/apps/miranum-jsonforms-builder-webview/.eslintrc.json b/apps/miranum-jsonforms-builder-webview/.eslintrc.json index 27d21c2f..8361af05 100644 --- a/apps/miranum-jsonforms-builder-webview/.eslintrc.json +++ b/apps/miranum-jsonforms-builder-webview/.eslintrc.json @@ -7,7 +7,9 @@ "@vue/eslint-config-prettier/skip-formatting" ], "ignorePatterns": [ - "!**/*" + "!**/*", + "tailwind.config.js", + "postcss.config.js" ], "parser": "vue-eslint-parser", "parserOptions": { diff --git a/apps/miranum-jsonforms-preview-webview/src/App.vue b/apps/miranum-jsonforms-preview-webview/src/App.vue index a3342bb1..767d11dd 100644 --- a/apps/miranum-jsonforms-preview-webview/src/App.vue +++ b/apps/miranum-jsonforms-preview-webview/src/App.vue @@ -54,7 +54,6 @@ const displayData = ref(undefined); const displayErrors = ref(undefined); let loading = true; -// eslint-disable-next-line react-hooks/rules-of-hooks const theme = useTheme(); let jsonComponentTheme = ref<"light" | "dark">("light"); diff --git a/apps/miranum-jsonforms-preview-webview/src/translations/de.ts b/apps/miranum-jsonforms-preview-webview/src/translations/de.ts index eb36ab6c..dce07ae8 100644 --- a/apps/miranum-jsonforms-preview-webview/src/translations/de.ts +++ b/apps/miranum-jsonforms-preview-webview/src/translations/de.ts @@ -12,7 +12,7 @@ export const formBuilder = { "options.placeholder.label": "Platzhalter", "options.placeholder.description": "ACHTUNG: Platzhalter können derzeit noch nicht übersetzt werden", - "pattern.description": 'zB: "[abc]+"', + "pattern.description": `zB: "[abc]+"`, "oneOf.const.label": "Name", "oneOf.title.label": "Title", }; diff --git a/apps/miranum-modeler-bpmn-webview/src/app/PropertieProvider/provider/MiragonProvider.ts b/apps/miranum-modeler-bpmn-webview/src/app/PropertieProvider/provider/MiragonProvider.ts index 15e4992f..7ab87457 100644 --- a/apps/miranum-modeler-bpmn-webview/src/app/PropertieProvider/provider/MiragonProvider.ts +++ b/apps/miranum-modeler-bpmn-webview/src/app/PropertieProvider/provider/MiragonProvider.ts @@ -36,9 +36,10 @@ export default function MiragonProvider( * @return {Object[]} modified groups */ return function (groups: any) { - //checks whether form files where loaded and either uses default property-panel, or Miranum's custom panel + // checks whether form files where loaded and either uses default properties-panel + // or Miranum's custom panel if (getFormKeys().length > 0) { - //(window.forms.length > 0) { + // (window.forms.length > 0) { // Add own "form" group to StartEvent, and remove old Form property if (is(element, "bpmn:StartEvent")) { groups.push(createStartFormGroup(element, translate)); diff --git a/apps/miranum-modeler-bpmn-webview/src/app/PropertieProvider/provider/parts/FormStartProp.ts b/apps/miranum-modeler-bpmn-webview/src/app/PropertieProvider/provider/parts/FormStartProp.ts index 596d3699..75131548 100644 --- a/apps/miranum-modeler-bpmn-webview/src/app/PropertieProvider/provider/parts/FormStartProp.ts +++ b/apps/miranum-modeler-bpmn-webview/src/app/PropertieProvider/provider/parts/FormStartProp.ts @@ -14,8 +14,8 @@ export default function (element: any) { ]; } -//camunda:formKey = Embedded or External Task Forms -//camunda:formRef = Camunda Forms +// camunda:formKey = Embedded or External Task Forms +// camunda:formRef = Camunda Forms function Form(props: any) { const { element, id } = props; const modeling = useService("modeling"); @@ -32,7 +32,7 @@ function Form(props: any) { }); }; - //fetch forms (from window variable) and fill Forms with it + // fetch forms (from window variable) and fill Forms with it const [forms, setForms] = useState([]); useEffect(() => { setForms(getFormKeys()); // window.forms); diff --git a/apps/miranum-modeler-bpmn-webview/src/app/PropertieProvider/provider/parts/FormUserProp.ts b/apps/miranum-modeler-bpmn-webview/src/app/PropertieProvider/provider/parts/FormUserProp.ts index 14f19fd4..2e0d27ad 100644 --- a/apps/miranum-modeler-bpmn-webview/src/app/PropertieProvider/provider/parts/FormUserProp.ts +++ b/apps/miranum-modeler-bpmn-webview/src/app/PropertieProvider/provider/parts/FormUserProp.ts @@ -19,19 +19,19 @@ export default function (element: any) { function Form(props: any) { const { element, id } = props; - //injections + // injections const modeling = useService("modeling"); const bpmnFactory = useService("bpmnFactory"); const translate = useService("translate"); const debounce = useService("debounceInput"); - //currently hard-coded binding - //needed for InputParameter - setValue/getValue + // currently hard-coded binding + // needed for InputParameter - setValue/getValue const binding = { type: "camunda:inputParameter", name: "app_task_schema_key", }; - //both are currently only used for getValue(), if a input has already been allocated + // both are currently only used for getValue(), if a input has already been allocated const inputOutput = findExtension(getBusinessObject(element), "camunda:InputOutput"); const inputParameter = inputOutput && findInputParameter(inputOutput, binding); @@ -55,7 +55,7 @@ function Form(props: any) { } }; - //fetch forms (from window variable) and fill Forms with it + // fetch forms (from window variable) and fill Forms with it const [forms, setForms] = useState([]); useEffect(() => { setForms(getFormKeys()); // window.forms); @@ -82,7 +82,7 @@ function Form(props: any) { }); } -//add or change +// add or change function addInputParameter( element: any, property: any, @@ -91,13 +91,13 @@ function addInputParameter( ) { const { binding, value } = property; - const businessObject = getBusinessObject(element); //alternativ: element.businessObject + const businessObject = getBusinessObject(element); // alternative: element.businessObject let extensionElements = businessObject.get("extensionElements"); - let inputOutput = findExtension(businessObject, "camunda:InputOutput"); //already as a global variable + let inputOutput = findExtension(businessObject, "camunda:InputOutput"); // already as a global variable let updatedBusinessObject, update; - //goes through all possibilities and sets updateBusinessObject & update accordingly - //case: nothing exists + // goes through all possibilities and sets updateBusinessObject & update accordingly + // case: nothing exists if (!extensionElements) { updatedBusinessObject = businessObject; extensionElements = createExtensionElements(businessObject, bpmnFactory); @@ -105,13 +105,13 @@ function addInputParameter( extensionElements.values.push(inputOutput); update = { extensionElements }; - //case: Input has existed, but has been deleted again + // case: Input has existed, but has been deleted again } else if (!inputOutput) { updatedBusinessObject = extensionElements; inputOutput = createInputOutput(binding, value, bpmnFactory, extensionElements); update = { values: extensionElements.get("values").concat(inputOutput) }; - //case: input exists, but key is already used => overwrite + // case: input exists, but key is already used => overwrite } else if (findInputParameter(inputOutput, binding)) { removeInputParameter(element, binding, modeling); @@ -119,7 +119,7 @@ function addInputParameter( inputOutput = createInputOutput(binding, value, bpmnFactory, extensionElements); update = { values: extensionElements.get("values").concat(inputOutput) }; - //case: input exists, and key isn't allocated yet + // case: input exists, and key isn't allocated yet } else { updatedBusinessObject = inputOutput; @@ -131,7 +131,7 @@ function addInputParameter( .concat(inputParameter), }; } - //write into xml + // write into xml modeling.updateModdleProperties(element, updatedBusinessObject, update); } @@ -143,7 +143,7 @@ function removeInputParameter(element: any, binding: any, modeling: any) { const inputParameter = findInputParameter(inputOutput, binding); - //delete External Task paragraph from xml + // delete External Task paragraph from xml modeling.updateModdleProperties(element, inputOutput, { inputParameters: without(inputParameters, inputParameter), }); diff --git a/apps/miranum-modeler-dmn-webview/src/types/diagram-js.d.ts b/apps/miranum-modeler-dmn-webview/src/types/diagram-js.d.ts index 67450f80..0cf73cca 100644 --- a/apps/miranum-modeler-dmn-webview/src/types/diagram-js.d.ts +++ b/apps/miranum-modeler-dmn-webview/src/types/diagram-js.d.ts @@ -5,24 +5,26 @@ declare module "diagram-js/lib/core/EventBus" { export type EventCallback = ( event: EventType, - data: any + data: any, ) => any; - export type EventType = EventMap extends Record - ? E - : InternalEvent; + export type EventType = + EventMap extends Record ? E : InternalEvent; interface EventMap { - "commandStack.changed": CommandStackChangedEvent + "commandStack.changed": CommandStackChangedEvent; } export interface InternalEvent { cancelBubble?: boolean; defaultPrevented?: boolean; + [field: string]: any; init(data: any): void; + stopPropagation(): void; + preventDefault(): void; } diff --git a/libs/miranum-core/src/lib/miranum-core.spec.ts b/libs/miranum-core/src/lib/miranum-core.spec.ts index 5d7c3bb7..6030e066 100644 --- a/libs/miranum-core/src/lib/miranum-core.spec.ts +++ b/libs/miranum-core/src/lib/miranum-core.spec.ts @@ -102,7 +102,7 @@ describe("generate", () => { "my-project", "imaginary/path/my-project", ); - //name, type, and extension are tested in plugisn.spec.ts + // name, type, and extension are tested in plugisn.spec.ts expect(artifact.project).toEqual("my-project"); expect(artifact.file.pathInProject).toEqual( `${file.dir}/${file.name}${file.extension}`, @@ -116,7 +116,7 @@ describe("generate", () => { "my-project", "imaginary/path/my-project/subfolder", ); - //name, type, and extension are tested in plugisn.spec.ts + // name, type, and extension are tested in plugisn.spec.ts expect(artifact.project).toEqual("my-project"); expect(artifact.file.pathInProject).toEqual( `/${file.name}${file.extension}`,