From 784d06f0ae698f09a3c17dee96986d52f55958b8 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Sat, 23 Mar 2024 12:20:25 +0530 Subject: [PATCH] chore: temp fix for eslint OOM --- .eslintrc.cjs | 2 +- .husky/pre-commit | 2 +- package.json | 5 +++-- pnpm-lock.yaml | 11 +++++++++++ 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index bef8d99228..dceb314c8e 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -14,7 +14,7 @@ module.exports = { }, tsconfigRootDir: __dirname, sourceType: 'module', - ecmaVersion: 2020, + ecmaVersion: 2022, allowAutomaticSingleRunInference: true, project: ['./tsconfig.eslint.json', './packages/*/tsconfig.json'], parser: '@typescript-eslint/parser', diff --git a/.husky/pre-commit b/.husky/pre-commit index a9e30b9bec..e8191928d4 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -pnpm run pre-commit +NODE_OPTIONS=--max_old_space_size=8192 pnpm run pre-commit diff --git a/package.json b/package.json index 91c789ab91..e054cfca4c 100644 --- a/package.json +++ b/package.json @@ -25,8 +25,8 @@ "dev:vite": "tsx .vite/server.ts", "dev:coverage": "pnpm coverage:cypress:clean && VITE_COVERAGE=true pnpm dev:vite", "release": "pnpm build", - "lint": "eslint --cache --cache-strategy content --ignore-path .gitignore . && pnpm lint:jison && prettier --cache --check .", - "lint:fix": "eslint --cache --cache-strategy content --fix --ignore-path .gitignore . && prettier --write . && tsx scripts/fixCSpell.ts", + "lint": "cross-env NODE_OPTIONS=--max_old_space_size=8192 eslint --cache --cache-strategy content --ignore-path .gitignore . && pnpm lint:jison && prettier --cache --check .", + "lint:fix": "cross-env NODE_OPTIONS=--max_old_space_size=8192 eslint --cache --cache-strategy content --fix --ignore-path .gitignore . && prettier --write . && tsx scripts/fixCSpell.ts", "lint:jison": "tsx ./scripts/jison/lint.mts", "contributors": "tsx scripts/updateContributors.ts", "cypress": "cypress run", @@ -83,6 +83,7 @@ "chokidar": "^3.6.0", "concurrently": "^8.2.2", "cors": "^2.8.5", + "cross-env": "^7.0.3", "cspell": "^8.6.0", "cypress": "^13.7.1", "cypress-image-snapshot": "^4.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 576ecfce07..6589bbdb24 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -79,6 +79,9 @@ importers: cors: specifier: ^2.8.5 version: 2.8.5 + cross-env: + specifier: ^7.0.3 + version: 7.0.3 cspell: specifier: ^8.6.0 version: 8.6.0 @@ -7416,6 +7419,14 @@ packages: - ts-node dev: true + /cross-env@7.0.3: + resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==} + engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} + hasBin: true + dependencies: + cross-spawn: 7.0.3 + dev: true + /cross-spawn@6.0.5: resolution: {integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==} engines: {node: '>=4.8'}