Skip to content

Commit

Permalink
Merge pull request #172 from softflow24/main-cf-autofix
Browse files Browse the repository at this point in the history
Apply fixes from CodeFactor
  • Loading branch information
c0rtexR authored Oct 25, 2024
2 parents ef50081 + e8e4f10 commit f8c9b76
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 13 deletions.
38 changes: 37 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,37 @@
pnpm-lock.yaml merge=union
# Set default behavior to automatically normalize line endings
* text=auto

# Explicitly declare files that should always use LF line endings
*.js text eol=lf
*.jsx text eol=lf
*.ts text eol=lf
*.tsx text eol=lf
*.json text eol=lf
*.md text eol=lf
*.yml text eol=lf
*.yaml text eol=lf

# Denote all files that are truly binary and should not be modified
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.mov binary
*.mp4 binary
*.mp3 binary
*.flv binary
*.fla binary
*.swf binary
*.gz binary
*.zip binary
*.7z binary
*.ttf binary
*.eot binary
*.woff binary
*.woff2 binary
*.pyc binary
*.pdf binary

# Specific for this project
pnpm-lock.yaml merge=union
7 changes: 4 additions & 3 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,19 @@ export default [
import: importPlugin,
},
rules: {
"prettier/prettier": "error",
"prettier/prettier": ["error", { endOfLine: "auto" }],
"no-unused-vars": "warn",
semi: ["error", "always"],
quotes: ["error", "double"],
"import/order": ["off", { "newlines-between": "always" }],
"react/react-in-jsx-scope": "off",
"linebreak-style": "off", // Turn off linebreak-style rule
},
ignores: [
"**/node_modules/**",
"**/dist/**",
"**/packages/client/**", // Ignore the entire client package
"**/.*", // Ignore dotfiles explicitly
"**/packages/client/**",
"**/.*",
"**/client/**",
],
},
Expand Down
13 changes: 7 additions & 6 deletions packages/blocks/src/logicBlock/conditionEvaluator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ICondition } from "@data-river/shared/interfaces/ICondition";
import { ILogger } from "@data-river/shared/interfaces/ILogger";
import _ from "lodash";
import { ValueResolver } from "@/utils/valueResolver";
import { DateHandler } from "./dateHandler";
//import { DateHandler } from "./dateHandler";
import { Comparator } from "@/utils/comparator";

export class ConditionEvaluator {
Expand All @@ -15,12 +15,13 @@ export class ConditionEvaluator {
const leftValue = ValueResolver.resolveValue(condition.left, inputs);
const rightValue = ValueResolver.resolveValue(condition.right, inputs);

const leftDate = DateHandler.parseDateIfValid(leftValue);
const rightDate = DateHandler.parseDateIfValid(rightValue);
//const leftDate = DateHandler.parseDateIfValid(leftValue);
//const rightDate = DateHandler.parseDateIfValid(rightValue);

if (leftDate && rightDate) {
return DateHandler.compareDates(leftDate, rightDate, condition.operator);
}
// TODO: fix this later
// if (leftDate && rightDate) {
// return DateHandler.compareDates(leftDate, rightDate, condition.operator);
// }

switch (condition.operator) {
case "==":
Expand Down
2 changes: 1 addition & 1 deletion packages/execution-engine/src/ExecutionEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class ExecutionEngine {
this.logger.group("Executing Workflow");
this.logger.time("Workflow Execution");

let output: IExecutionResult = {
const output: IExecutionResult = {
result: [],
errors: [],
};
Expand Down
2 changes: 1 addition & 1 deletion packages/www/app/components/ui/animated-beam.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const AnimatedBeam: React.FC<AnimatedBeamProps> = ({
const resizeObserver = new ResizeObserver((entries) => {
// For all entries, recalculate the path
// eslint-disable-next-line no-unused-vars
for (let _ of entries) {
for (const _ of entries) {
updatePath();
}
});
Expand Down
2 changes: 1 addition & 1 deletion packages/www/app/components/ui/animated-grid-pattern.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function GridPattern({
// Resize observer to update container dimensions
useEffect(() => {
const resizeObserver = new ResizeObserver((entries) => {
for (let entry of entries) {
for (const entry of entries) {
setDimensions({
width: entry.contentRect.width,
height: entry.contentRect.height,
Expand Down

0 comments on commit f8c9b76

Please sign in to comment.