Skip to content

Commit

Permalink
style: fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
micalevisk committed Jan 15, 2024
1 parent 5b747ac commit b44b23a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
5 changes: 3 additions & 2 deletions lib/compiler/assets-manager.ts
Expand Up @@ -101,8 +101,9 @@ export class AssetsManager {

this.watchers.push(watcher);
} else {
const files = sync(item.glob, { ignore: item.exclude })
.filter((matched) => statSync(matched).isFile());
const files = sync(item.glob, { ignore: item.exclude }).filter(
(matched) => statSync(matched).isFile(),
);
for (const path of files) {
this.actionOnFile({ ...option, path, action: 'change' });
}
Expand Down
3 changes: 2 additions & 1 deletion lib/configuration/nest-configuration.loader.ts
Expand Up @@ -33,7 +33,8 @@ export class NestConfigurationLoader implements ConfigurationLoader {
]);

if (contentOrError) {
const isMissingPersmissionsError = contentOrError instanceof ReaderFileLackPersmissionsError;
const isMissingPersmissionsError =
contentOrError instanceof ReaderFileLackPersmissionsError;
if (isMissingPersmissionsError) {
console.error(contentOrError.message);
process.exit(1);
Expand Down
10 changes: 6 additions & 4 deletions lib/readers/file-system.reader.ts
Expand Up @@ -18,8 +18,8 @@ export class FileSystemReader implements Reader {
): string | undefined | ReaderFileLackPersmissionsError {
let firstFilePathFoundButWithInsufficientPermissions: string | undefined;

for (let idx=0; idx < filenames.length; idx++) {
const file = filenames[idx];
for (let id = 0; id < filenames.length; id++) {
const file = filenames[id];

try {
return this.read(file);
Expand All @@ -35,8 +35,10 @@ export class FileSystemReader implements Reader {
}
}

const isLastFileToLookFor = idx === filenames.length - 1;
if (!isLastFileToLookFor) continue;
const isLastFileToLookFor = id === filenames.length - 1;
if (!isLastFileToLookFor) {
continue;
}

if (firstFilePathFoundButWithInsufficientPermissions) {
return new ReaderFileLackPersmissionsError(
Expand Down

0 comments on commit b44b23a

Please sign in to comment.