Skip to content

Commit

Permalink
fix(*): please linter
Browse files Browse the repository at this point in the history
I know this one is a chore, but I want to trigger sem release
  • Loading branch information
Abdel El-Medny committed Dec 21, 2018
1 parent de7a9d7 commit a84f94c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/analyzer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import { ITranslationDifference, ITranslationFile } from '../types';
export class Analyzer {

/** Gets the differences between all the translation files and the master file */
public getDifferences(masterFileName: string, translations: Map<string, any>): Map<string, ITranslationDifference> {
getDifferences(masterFileName: string, translations: Map<string, any>): Map<string, ITranslationDifference> {
const masterFileValue = translations.get(masterFileName);

const differences: Map<string, ITranslationDifference> = new Map();

translations.forEach((fileValue, fileKey) => {
if (fileKey != masterFileName) {
if (fileKey !== masterFileName) {
const difference = this.getDifference(
Object.keys(masterFileValue!),
Object.keys(fileValue),
Expand All @@ -23,12 +23,12 @@ export class Analyzer {
return differences;
}

public logDifferences(
logDifferences(
differences: Map<string, ITranslationDifference>,
fixFlagOn: boolean
) {

let message: string[] = [];
const message: string[] = [];

/** We want to be positive here! So we will show the good news first */
const positivelySortedDifferences = Array.from(differences.entries()).sort((a, b) => {
Expand Down Expand Up @@ -58,8 +58,8 @@ export class Analyzer {
].join('');
}

if ( redundantLength == 0 && missingLength == 0 ) {
toAppendMessage = `🎉 '${fileKey}' matches the master file`
if ( redundantLength === 0 && missingLength === 0 ) {
toAppendMessage = `🎉 '${fileKey}' matches the master file`;
}

message.push(toAppendMessage);
Expand All @@ -79,7 +79,7 @@ export class Analyzer {
const difference: ITranslationDifference = {
missing: [],
redundant: []
}
};

const masterSet = new Set(masterKeys);

Expand Down
2 changes: 1 addition & 1 deletion src/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class Configuration {

}

public async getConfiguration() {
async getConfiguration() {
if ( await this.filesManager.pathExists(this.configPath) ) {
const configuration = await this.filesManager.loadConfiguration(this.configPath);

Expand Down

0 comments on commit a84f94c

Please sign in to comment.