Skip to content

Commit

Permalink
CI: Add vue to eslint patterns and enable logging (#2976)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lykoi18 authored Nov 7, 2023
1 parent 9e789d9 commit 754442d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/visual_tests_frameworks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions utils/eslint-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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(
Expand All @@ -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;
Expand Down

0 comments on commit 754442d

Please sign in to comment.