From ad0a653f82d36d5e2a5f56d0df1db4a9e4f1eb7f Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 7 Feb 2024 16:43:38 +0100 Subject: [PATCH] build.js: Fix escape characters Spotted by ESLint when calling it on build.js itself (which the esbuild integration didn't). --- build.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.js b/build.js index 8fca807..87bdae4 100755 --- a/build.js +++ b/build.js @@ -95,8 +95,8 @@ const context = await esbuild.context({ target: ['es2020'], plugins: [ cleanPlugin(), - ...args.no_stylelint ? [] : [stylelintPlugin({ filter: new RegExp(cwd + '\/src\/.*\.(css?|scss?)$') })], - ...args.no_eslint ? [] : [eslintPlugin({ filter: new RegExp(cwd + '\/src\/.*\.(jsx?|js?)$') })], + ...args.no_stylelint ? [] : [stylelintPlugin({ filter: new RegExp(cwd + '/src/.*\\.(css?|scss?)$') })], + ...args.no_eslint ? [] : [eslintPlugin({ filter: new RegExp(cwd + '/src/.*\\.(jsx?|js?)$') })], // Esbuild will only copy assets that are explicitly imported and used // in the code. This is a problem for index.html and manifest.json which are not imported copy({