From 754442d9a39db15170f7e3c92d3ed9e5f77be3d3 Mon Sep 17 00:00:00 2001 From: Georgy K <36447502+Lykoi18@users.noreply.github.com> Date: Tue, 7 Nov 2023 15:33:09 +0400 Subject: [PATCH] CI: Add vue to eslint patterns and enable logging (#2976) --- .github/workflows/visual_tests_frameworks.yml | 1 + utils/eslint-runner.ts | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/visual_tests_frameworks.yml b/.github/workflows/visual_tests_frameworks.yml index ada4aad7d1b..77d9bc387e3 100644 --- a/.github/workflows/visual_tests_frameworks.yml +++ b/.github/workflows/visual_tests_frameworks.yml @@ -249,6 +249,7 @@ jobs: - name: Run lint env: CHANGEDFILEINFOSPATH: ${{ github.workspace }}/changed-files.json + DEBUG: 'eslint:cli-engine,stylelint:standalone' run: ${{ matrix.command }} check_generated_demos: diff --git a/utils/eslint-runner.ts b/utils/eslint-runner.ts index 8369b75f9a1..4979282fd1f 100644 --- a/utils/eslint-runner.ts +++ b/utils/eslint-runner.ts @@ -13,7 +13,7 @@ const getPatterns = () => { const CONSTEL = process.env.CONSTEL; if (CONSTEL == null) { - return ['JSDemos/Demos/**/*.[tj]s?(x)']; + return ['JSDemos/Demos/**/*.@(vue|[tj]s?(x))']; } const changedFiles: Array<{ filename: string }> | null = getChangedFiles(); @@ -22,7 +22,7 @@ const getPatterns = () => { const demos = fs.readdirSync(path.resolve(process.cwd(), 'JSDemos/Demos')); const filteredDemos = demos.filter((_, index) => index % total === current - 1); - const filteredDemosPatterns = filteredDemos.map((widgetName) => `JSDemos/Demos/${widgetName}/**/*.[tj]s?(x)`); + const filteredDemosPatterns = filteredDemos.map((widgetName) => `JSDemos/Demos/${widgetName}/**/*.@(vue|[tj]s?(x))`); if (changedFiles != null) { const isChangedConfig = changedFiles.some( @@ -44,7 +44,7 @@ const getPatterns = () => { }; }).filter(({ widget }) => filteredDemos.includes(widget)); - return changedDemos.map(({ widget, name, framework }) => `JSDemos/Demos/${widget}/${name}/${framework}/*.[tj]s?(x)`); + return changedDemos.map(({ widget, name, framework }) => `JSDemos/Demos/${widget}/${name}/${framework}/**/*.@(vue|[tj]s?(x))`); } return filteredDemosPatterns;