Skip to content

Commit

Permalink
skip lint on build dir by means of .eslintignore generation
Browse files Browse the repository at this point in the history
solves google#483

solves google#520
  • Loading branch information
Naseem committed Jun 3, 2020
1 parent d25e25e commit 26328d2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ export const ESLINT_CONFIG = {
extends: './node_modules/gts/',
};

export const ESLINT_IGNORE = 'build/\n';

async function generateConfigFile(
options: Options,
filename: string,
Expand Down Expand Up @@ -227,6 +229,10 @@ async function generateESLintConfig(options: Options): Promise<void> {
);
}

async function generateESLintIgnore(options: Options): Promise<void> {
return generateConfigFile(options, './.eslintignore', ESLINT_IGNORE);
}

async function generateTsConfig(options: Options): Promise<void> {
const config = formatJson({
extends: './node_modules/gts/tsconfig-google.json',
Expand Down Expand Up @@ -308,6 +314,7 @@ export async function init(options: Options): Promise<boolean> {
}
await generateTsConfig(options);
await generateESLintConfig(options);
await generateESLintIgnore(options);
await generatePrettierConfig(options);
await installDefaultTemplate(options);

Expand Down

0 comments on commit 26328d2

Please sign in to comment.