Skip to content

Commit

Permalink
Fixed lint
Browse files Browse the repository at this point in the history
  • Loading branch information
gbourassa committed May 16, 2023
1 parent 5e310b3 commit 8b00403
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cli/src/base.ts
Expand Up @@ -19,7 +19,7 @@ export default abstract class extends Command {
project?: Project;
viewer?: ProjectViewer;

async initialize(configFilePath: String) {
async initialize(configFilePath: string) {
this.projectConfig = new ConfigFetcher(configFilePath);

const config = this.projectConfig.config;
Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/export.ts
Expand Up @@ -41,7 +41,7 @@ export default class Export extends Command {

async run() {
const {flags} = this.parse(Export);
super.initialize(flags['config']);
super.initialize(flags.config);
const documents = this.projectConfig.files();
const formatter = new DocumentExportFormatter();

Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/format.ts
Expand Up @@ -31,7 +31,7 @@ export default class Format extends Command {

async run() {
const {flags} = this.parse(Format);
super.initialize(flags['config']);
super.initialize(flags.config);
const documents = this.projectConfig.files();
const t0 = process.hrtime();
const formattedPaths: FormattedFile[] = [];
Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/jipt.ts
Expand Up @@ -36,7 +36,7 @@ export default class Jipt extends Command {
async run() {
const {args} = this.parse(Jipt);
const {flags} = this.parse(Jipt);
super.initialize(flags['config']);
super.initialize(flags.config);
const documents = this.projectConfig.files();
const formatter = new DocumentExportFormatter();

Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/lint.ts
Expand Up @@ -22,7 +22,7 @@ export default class Lint extends Command {

async run() {
const {flags} = this.parse(Lint);
super.initialize(flags['config']);
super.initialize(flags.config);
const documents = this.projectConfig.files();
const results: LintTranslation[] = [];
const t0 = process.hrtime();
Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/stats.ts
Expand Up @@ -20,7 +20,7 @@ export default class Stats extends Command {
/* eslint-disable @typescript-eslint/require-await */
async run() {
const {flags} = this.parse(Stats);
super.initialize(flags['config']);
super.initialize(flags.config);
const formatter = new Formatter(this.project!, this.projectConfig.config);

formatter.log();
Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/sync.ts
Expand Up @@ -75,7 +75,7 @@ export default class Sync extends Command {
async run() {
const t0 = process.hrtime();
const {flags} = this.parse(Sync);
super.initialize(flags['config']);
super.initialize(flags.config);
const documents = this.projectConfig.files();

// From all the documentConfigs, do the sync or peek operations and log the results.
Expand Down
6 changes: 3 additions & 3 deletions cli/src/services/config.ts
Expand Up @@ -14,9 +14,9 @@ export default class ConfigFetcher {
readonly config: Config;
readonly warnings: string[];

constructor(configFilePath: String) {
console.log('Loading configuration file: ' + configFilePath);
this.config = fs.readJsonSync('' + configFilePath);
constructor(configFilePath: string) {
console.log(`Loading configuration file: ${configFilePath}`);
this.config = fs.readJsonSync(`${configFilePath}`);
this.config.apiKey = process.env.ACCENT_API_KEY || this.config.apiKey;
this.config.apiUrl = process.env.ACCENT_API_URL || this.config.apiUrl;
this.config.project = process.env.ACCENT_PROJECT || this.config.project;
Expand Down

0 comments on commit 8b00403

Please sign in to comment.