Skip to content

Commit

Permalink
Merge pull request #28 from dolittle/change-brace-style
Browse files Browse the repository at this point in the history
Change brace style
  • Loading branch information
woksin committed Jul 13, 2020
2 parents 1f24dbc + ab31e59 commit 528a1b9
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 22 deletions.
3 changes: 1 addition & 2 deletions Source/Build/Gulp/Tasks/GulpTasks.ts
Expand Up @@ -50,8 +50,7 @@ export function createTask(context: GulpContext, taskName: string, parallel: boo
});
task = parallel ? gulp.parallel(workspaceTasks) : gulp.series(workspaceTasks);
task.displayName = taskName;
}
else {
} else {
task = createTaskCallback();
task.displayName = taskName;
}
Expand Down
9 changes: 3 additions & 6 deletions Source/Build/Project/Project.ts
Expand Up @@ -84,21 +84,18 @@ export class Project {
const workspaceSources = new Sources(workspacePackage.rootFolder, workspacePackage);
this._workspaces.push(new YarnWorkspace(workspacePackage, workspaceSources));
}
}
catch (error) {
} catch (error) {
throw new InvalidYarnWorkspace(workspacePath, error);
}
});
}
else {
} else {
try {
if (fs.statSync(workspace).isDirectory()) {
const workspacePackage = new Package(workspace, this.rootPackage);
const workspaceSources = new Sources(workspacePackage.rootFolder, workspacePackage);
this._workspaces.push(new YarnWorkspace(workspacePackage, workspaceSources));
}
}
catch (error) {
} catch (error) {
throw new InvalidYarnWorkspace(workspace, error);
}
}
Expand Down
3 changes: 1 addition & 2 deletions Source/Build/Project/Sources/OutputFiles.ts
Expand Up @@ -79,8 +79,7 @@ export class OutputFiles {
this._workspaces.forEach(_ => {
globs.includes.push(...createGlobPatterns(_.sources.outputFiles.root!, globPatterns, _.sources.outputFiles.root! === this._projectRootFolder ? '' : toUnixPath(_.sources.outputFiles.root!.replace(`${this._projectRootFolder}${path.sep}`, ''))));
});
}
else {
} else {
globs.includes.push(...createGlobPatterns(this.root!, globPatterns, OutputFiles.FOLDER_NAME));
}
return globs;
Expand Down
11 changes: 6 additions & 5 deletions Source/Build/Project/Sources/SourceFiles.ts
Expand Up @@ -165,11 +165,12 @@ export class SourceFiles {
excludes: []
};
if (this._workspaces.length > 0) {
this._workspaces.forEach(_ => {
globs.includes.push(...createGlobPatterns(_.sources.sourceFiles.root, globPatterns, _.sources.sourceFiles.root === this._projectRootFolder ? '' : toUnixPath(_.sources.sourceFiles.root.replace(`${this._projectRootFolder}${path.sep}`, ''))));
});
}
else globs.includes.push(...createGlobPatterns(this.root, globPatterns, this._underSourceFolder === true ? SourceFiles.FOLDER_NAME : undefined));
this._workspaces.forEach(_ => {
globs.includes.push(...createGlobPatterns(_.sources.sourceFiles.root, globPatterns, _.sources.sourceFiles.root === this._projectRootFolder ? '' : toUnixPath(_.sources.sourceFiles.root.replace(`${this._projectRootFolder}${path.sep}`, ''))));
});
} else {
globs.includes.push(...createGlobPatterns(this.root, globPatterns, this._underSourceFolder === true ? SourceFiles.FOLDER_NAME : undefined));
}

const excludePatterns = ['node_modules/**/*', '**/node_modules/**/*', ...SourceFiles.getWebpackSpecificExcludes(this._rootPackage), ...SourceFiles.filesToIgnore];
excludePatterns.forEach(globPattern => {
Expand Down
9 changes: 3 additions & 6 deletions Source/Build/Wallaby/Settings/WallabySettings.ts
Expand Up @@ -86,16 +86,14 @@ export class WallabySettings {
this._files.push(...this.getBaseIgnoredFiles(), ...this.getBaseInstrumentedFiles());
if (this._project.workspaces.length > 0) {
this._project.workspaces.forEach(_ => this._files.push(...this.getFilesFromSources(_.sources)));
}
else this._files.push(...this.getFilesFromSources(this._project.sources));
} else this._files.push(...this.getFilesFromSources(this._project.sources));
}

private createTests() {
this._tests = this.getBaseIgnoredFiles();
if (this._project.workspaces.length > 0) {
this._project.workspaces.forEach(_ => this._tests.push(...this.getTestsFromSources(_.sources)));
}
else this._tests.push(...this.getTestsFromSources(this._project.sources));
} else this._tests.push(...this.getTestsFromSources(this._project.sources));
}


Expand Down Expand Up @@ -155,8 +153,7 @@ export class WallabySettings {
});
}
});
}
else {
} else {
const rootPackage = this._project.rootPackage;
if (rootPackage.usesWebpack()) {
SourceFiles.getWebpackSpecificExcludes(rootPackage).forEach((pattern: any) => {
Expand Down
2 changes: 1 addition & 1 deletion Source/EslintConfig/.eslintrc.js
Expand Up @@ -83,7 +83,7 @@ module.exports = {
'jsdoc/check-alignment': 'error',

// eslint
'brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
'constructor-super': 'error',
'curly': ['error', 'multi-line'],
'dot-notation': 'error',
Expand Down

0 comments on commit 528a1b9

Please sign in to comment.