From 31a200e360b68039a8fcfa60461245eb4fd45450 Mon Sep 17 00:00:00 2001 From: Daniel Van Der Ploeg Date: Thu, 21 Nov 2024 13:36:10 +1030 Subject: [PATCH] chore: fixing eslint errors --- .eslintrc.json | 6 +++ .prettierrc | 2 +- eslint.config.mjs | 38 ------------------- packages/graphql-mesh-server/lib/fargate.ts | 2 +- .../graphql-mesh-server/lib/maintenance.ts | 2 +- .../prerender-cf-cache-control-construct.ts | 2 +- tsconfig.base.json | 2 +- 7 files changed, 11 insertions(+), 43 deletions(-) delete mode 100644 eslint.config.mjs diff --git a/.eslintrc.json b/.eslintrc.json index 3e3095ab..2b9bf1d7 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -51,6 +51,12 @@ { "argsIgnorePattern": "^_" } + ], + "@nx/enforce-module-boundaries": [ + "error", + { + "allow": ["@aligent/cdk-esbuild"] + } ] } }, diff --git a/.prettierrc b/.prettierrc index a4e0b6b9..2c288c2c 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,6 +1,6 @@ { "semi": true, - "singleQuote": false, + "singleQuote": true, "arrowParens": "avoid", "trailingComma": "es5" } \ No newline at end of file diff --git a/eslint.config.mjs b/eslint.config.mjs deleted file mode 100644 index acc40b76..00000000 --- a/eslint.config.mjs +++ /dev/null @@ -1,38 +0,0 @@ -// eslint.config.mjs -import eslintPluginPrettier from "eslint-plugin-prettier"; -import eslintPluginTypeScript from "@typescript-eslint/eslint-plugin"; -import eslintParserTypeScript from "@typescript-eslint/parser"; - -export default [ - { - languageOptions: { - ecmaVersion: "latest", - sourceType: "module", - globals: { - // Directly define any necessary globals instead of using `env` - process: "readonly", - __dirname: "readonly", - module: "readonly", - exports: "readonly", - require: "readonly", - }, - parser: eslintParserTypeScript, - }, - plugins: { - "@typescript-eslint": eslintPluginTypeScript, - prettier: eslintPluginPrettier, - }, - rules: { - "@typescript-eslint/no-unused-vars": [ - "error", - { - argsIgnorePattern: "^_", - varsIgnorePattern: "^_", - caughtErrorsIgnorePattern: "^_", - }, - ], - }, - ignores: [".pnp.*"], - settings: {}, - }, -]; diff --git a/packages/graphql-mesh-server/lib/fargate.ts b/packages/graphql-mesh-server/lib/fargate.ts index d0a05100..7141f80a 100644 --- a/packages/graphql-mesh-server/lib/fargate.ts +++ b/packages/graphql-mesh-server/lib/fargate.ts @@ -24,7 +24,7 @@ import { } from "aws-cdk-lib/aws-autoscaling"; import { ApplicationLoadBalancer } from "aws-cdk-lib/aws-elasticloadbalancingv2"; import { LogGroup } from "aws-cdk-lib/aws-logs"; -import path = require("path"); +import * as path from "path"; import { MetricOptions } from "aws-cdk-lib/aws-cloudwatch"; export interface MeshServiceProps { diff --git a/packages/graphql-mesh-server/lib/maintenance.ts b/packages/graphql-mesh-server/lib/maintenance.ts index 9f710ecd..12086890 100644 --- a/packages/graphql-mesh-server/lib/maintenance.ts +++ b/packages/graphql-mesh-server/lib/maintenance.ts @@ -6,7 +6,7 @@ import { NodejsFunction } from "aws-cdk-lib/aws-lambda-nodejs"; import { Construct } from "constructs"; import { FileSystem } from "aws-cdk-lib/aws-efs"; import { FargateService, MountPoint } from "aws-cdk-lib/aws-ecs"; -import path = require("path"); +import * as path from "path"; import { PolicyStatement } from "aws-cdk-lib/aws-iam"; interface MaintenanceProps { diff --git a/packages/prerender-proxy/lib/prerender-cf-cache-control-construct.ts b/packages/prerender-proxy/lib/prerender-cf-cache-control-construct.ts index 798c4ef4..0a2524b7 100644 --- a/packages/prerender-proxy/lib/prerender-cf-cache-control-construct.ts +++ b/packages/prerender-proxy/lib/prerender-cf-cache-control-construct.ts @@ -42,7 +42,7 @@ export class CloudFrontCacheControl extends Construct { options?.cacheKey ?? "x-prerender-requestid" ), "process.env.PRERENDER_CACHE_MAX_AGE": JSON.stringify( - String(options?.maxAge) ?? "0" + String(options?.maxAge ?? 0) ), }, }), diff --git a/tsconfig.base.json b/tsconfig.base.json index ed190114..c5e9a7be 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -21,5 +21,5 @@ "typeRoots": ["./node_modules/@types"], "baseUrl": "." }, - "exclude": ["**/node_modules", "cdk.out", "**/handlers/**"] + "exclude": ["**/node_modules", "cdk.out"] }