Skip to content

Commit 56b22bc

Browse files
authored
chore: prevent linting all clients for JavaScript (#923)
1 parent 5100204 commit 56b22bc

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

.eslintignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
node_modules
2-
dist
1+
**/node_modules
2+
**/dist
33
playground
4-
build
4+
**/build
55
composer.json
66
tsconfig.json
77
vendor

scripts/generate.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,20 @@ export async function generate(
5757
}
5858

5959
for (const lang of langs) {
60-
await formatter(lang, getLanguageFolder(lang), verbose);
60+
let folder = getLanguageFolder(lang);
61+
62+
// We have scoped output folder for JavaScript which allow us to
63+
// avoid linting the whole client, only the part that changed
64+
if (lang === 'javascript') {
65+
folder = generators.reduce((folders, gen) => {
66+
if (gen.language === 'javascript') {
67+
return `${folders} ${gen.output}`;
68+
}
69+
70+
return folders;
71+
}, '');
72+
}
73+
74+
await formatter(lang, folder, verbose);
6175
}
6276
}

0 commit comments

Comments
 (0)