build.js: Fix LINT env variable check

(cherry picked from commit 3d75eb66d7)
This commit is contained in:
Tomas Matus 2023-07-20 12:10:37 +02:00 committed by Justin Stephenson
parent 8f9d7bb636
commit cba733642f

View file

@ -20,7 +20,7 @@ const esbuild = (await import(useWasm ? 'esbuild-wasm' : 'esbuild')).default;
const production = process.env.NODE_ENV === 'production'; const production = process.env.NODE_ENV === 'production';
const watchMode = process.env.ESBUILD_WATCH === "true"; const watchMode = process.env.ESBUILD_WATCH === "true";
// linters dominate the build time, so disable them for production builds by default, but enable in watch mode // linters dominate the build time, so disable them for production builds by default, but enable in watch mode
const lint = process.env.LINT ? (process.env.LINT !== 0) : (watchMode || !production); const lint = process.env.LINT ? (process.env.LINT !== '0') : (watchMode || !production);
// List of directories to use when using import statements // List of directories to use when using import statements
const nodePaths = ['pkg/lib']; const nodePaths = ['pkg/lib'];
const outdir = 'dist'; const outdir = 'dist';