From a1bfab82dfc3b316941bfc025e18bf89c66fe2c6 Mon Sep 17 00:00:00 2001
From: Copilot <198982749+Copilot@users.noreply.github.com>
Date: Thu, 20 Nov 2025 11:38:43 +0100
Subject: [PATCH] Remove VITE_DISABLE_ESLINT_CHECKER environment variable
(#15943)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The `VITE_DISABLE_ESLINT_CHECKER` environment variable is removed from
the codebase. ESLint checker no longer runs during Vite builds
(equivalent to the previous `VITE_DISABLE_ESLINT_CHECKER=true`
behavior).
**Configuration**
- Removed from `.env.example` (active and commented lines)
- Removed from `vite.config.ts` destructuring and conditional logic
- Removed from build scripts in `package.json` and `nx.json`
**Code change in vite.config.ts:**
```diff
- if (VITE_DISABLE_ESLINT_CHECKER !== 'true') {
- checkers['eslint'] = {
- lintCommand: 'eslint ../../packages/twenty-front --max-warnings 0',
- useFlatConfig: true,
- };
- }
```
**Documentation**
- Updated main English troubleshooting guide to remove references to the
variable
- Translated documentation files are intentionally not modified and will
be handled by a separate workflow
> [!NOTE]
> ESLint will not run in the background via Vite's checker plugin.
Developers will need to run `npx nx lint twenty-front` manually or rely
on their IDE's ESLint extension for real-time feedback on open files.
Created from VS Code via the GitHub
Pull Request extension.
Original prompt
> Your job is to delete everything related to
VITE_DISABLE_ESLINT_CHECKER in the codebase.
>
> We mention this env var in documentation: drop the content talking
about it.
>
> We use it in the vite config: drop the check and keep the code paths
that used to run when `VITE_DISABLE_ESLINT_CHECKER=true`.
>
> User has selected text in file packages/twenty-front/.env.example from
3:1 to 3:28
Created from VS Code via the [GitHub Pull
Request](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github)
extension.
---
✨ Let Copilot coding agent [set things up for
you](https://github.com/twentyhq/twenty/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Devessier <29370468+Devessier@users.noreply.github.com>
---
nx.json | 2 +-
.../developers/self-hosting/troubleshooting.mdx | 2 +-
packages/twenty-front/.env.example | 2 --
packages/twenty-front/package.json | 4 ++--
packages/twenty-front/vite.config.ts | 12 ------------
5 files changed, 4 insertions(+), 18 deletions(-)
diff --git a/nx.json b/nx.json
index 1a15975922..bb94a73d3b 100644
--- a/nx.json
+++ b/nx.json
@@ -133,7 +133,7 @@
"outputs": ["{projectRoot}/{options.output-dir}"],
"options": {
"cwd": "{projectRoot}",
- "command": "VITE_DISABLE_TYPESCRIPT_CHECKER=true VITE_DISABLE_ESLINT_CHECKER=true storybook build --test",
+ "command": "VITE_DISABLE_TYPESCRIPT_CHECKER=true storybook build --test",
"output-dir": "storybook-static",
"config-dir": ".storybook"
},
diff --git a/packages/twenty-docs/developers/self-hosting/troubleshooting.mdx b/packages/twenty-docs/developers/self-hosting/troubleshooting.mdx
index bf03e84dcf..ea763fde3a 100644
--- a/packages/twenty-docs/developers/self-hosting/troubleshooting.mdx
+++ b/packages/twenty-docs/developers/self-hosting/troubleshooting.mdx
@@ -69,7 +69,7 @@ This should work out of the box with the eslint extension installed. If this doe
#### While running `npx nx start` or `npx nx start twenty-front`, Out of memory error is thrown
-In `packages/twenty-front/.env` uncomment `VITE_DISABLE_TYPESCRIPT_CHECKER=true` and `VITE_DISABLE_ESLINT_CHECKER=true` to disable background checks thus reducing amount of needed RAM.
+In `packages/twenty-front/.env` uncomment `VITE_DISABLE_TYPESCRIPT_CHECKER=true` to disable background checks thus reducing amount of needed RAM.
**If it does not work:**
Run only the services you need, instead of `npx nx start`. For instance, if you work on the server, run only `npx nx worker twenty-server`
diff --git a/packages/twenty-front/.env.example b/packages/twenty-front/.env.example
index 755698a121..f7e35a852f 100644
--- a/packages/twenty-front/.env.example
+++ b/packages/twenty-front/.env.example
@@ -1,13 +1,11 @@
REACT_APP_SERVER_BASE_URL=http://localhost:3000
VITE_BUILD_SOURCEMAP=false
-VITE_DISABLE_ESLINT_CHECKER=true
# ———————— Optional ————————
# REACT_APP_PORT=3001
# CHROMATIC_PROJECT_TOKEN=
# VITE_DISABLE_TYPESCRIPT_CHECKER=true
-# VITE_DISABLE_ESLINT_CHECKER=true
# VITE_ENABLE_SSL=false
# VITE_HOST=localhost.com
# SSL_KEY_PATH="./certs/your-cert.key"
diff --git a/packages/twenty-front/package.json b/packages/twenty-front/package.json
index c823c4f10e..6d834ac01f 100644
--- a/packages/twenty-front/package.json
+++ b/packages/twenty-front/package.json
@@ -3,8 +3,8 @@
"private": true,
"type": "module",
"scripts": {
- "build": "NODE_ENV=production VITE_DISABLE_TYPESCRIPT_CHECKER=true VITE_DISABLE_ESLINT_CHECKER=true NODE_OPTIONS=--max-old-space-size=8192 npx vite build && sh ./scripts/inject-runtime-env.sh",
- "build:sourcemaps": "NODE_ENV=production VITE_BUILD_SOURCEMAP=true VITE_DISABLE_TYPESCRIPT_CHECKER=true VITE_DISABLE_ESLINT_CHECKER=true NODE_OPTIONS=--max-old-space-size=8192 npx vite build && sh ./scripts/inject-runtime-env.sh",
+ "build": "NODE_ENV=production VITE_DISABLE_TYPESCRIPT_CHECKER=true NODE_OPTIONS=--max-old-space-size=8192 npx vite build && sh ./scripts/inject-runtime-env.sh",
+ "build:sourcemaps": "NODE_ENV=production VITE_BUILD_SOURCEMAP=true VITE_DISABLE_TYPESCRIPT_CHECKER=true NODE_OPTIONS=--max-old-space-size=8192 npx vite build && sh ./scripts/inject-runtime-env.sh",
"start:prod": "NODE_ENV=production npx serve -s build",
"tsup": "npx tsup"
},
diff --git a/packages/twenty-front/vite.config.ts b/packages/twenty-front/vite.config.ts
index dbde1d1ce9..8c9d03d50c 100644
--- a/packages/twenty-front/vite.config.ts
+++ b/packages/twenty-front/vite.config.ts
@@ -24,7 +24,6 @@ export default defineConfig(({ command, mode }) => {
REACT_APP_SERVER_BASE_URL,
VITE_BUILD_SOURCEMAP,
VITE_DISABLE_TYPESCRIPT_CHECKER,
- VITE_DISABLE_ESLINT_CHECKER,
VITE_HOST,
SSL_CERT_PATH,
SSL_KEY_PATH,
@@ -59,10 +58,6 @@ export default defineConfig(({ command, mode }) => {
);
}
- if (VITE_DISABLE_ESLINT_CHECKER === 'true') {
- console.log(`VITE_DISABLE_ESLINT_CHECKER: ${VITE_DISABLE_ESLINT_CHECKER}`);
- }
-
if (VITE_BUILD_SOURCEMAP === 'true') {
console.log(`VITE_BUILD_SOURCEMAP: ${VITE_BUILD_SOURCEMAP}`);
}
@@ -73,13 +68,6 @@ export default defineConfig(({ command, mode }) => {
};
}
- if (VITE_DISABLE_ESLINT_CHECKER !== 'true') {
- checkers['eslint'] = {
- lintCommand: 'eslint ../../packages/twenty-front --max-warnings 0',
- useFlatConfig: true,
- };
- }
-
return {
root: __dirname,
cacheDir: '../../node_modules/.vite/packages/twenty-front',