Skip to content

Commit 2ad8d2f

Browse files
committed
format code
1 parent a46f1f6 commit 2ad8d2f

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

src/command/compile.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ export async function runCompile(): Promise<void> {
2424
log.invisible('checking for required properties in config');
2525
errorChecks([
2626
[!('compile' in config), 'syxconfig.json.compile: Missing'],
27-
[!arg.getArgument('root')&&!arg.getArgument('r')&& 'compile' in config && !('root' in config.compile), 'syxconfig.json.compile.root: Missing'],
28-
[!arg.getArgument('out')&&!arg.getArgument('o')&&'compile' in config && !('out' in config.compile), 'syxconfig.json.compile.out: Missing'],
29-
[!arg.getArgument('language')&&!arg.getArgument('lang')&&!arg.getArgument('lng')&&!arg.getArgument('l')&&'compile' in config && !('format' in config.compile), 'syxconfig.json.compile.format: Missing']
27+
[!arg.getArgument('root') && !arg.getArgument('r') && 'compile' in config && !('root' in config.compile), 'syxconfig.json.compile.root: Missing'],
28+
[!arg.getArgument('out') && !arg.getArgument('o') && 'compile' in config && !('out' in config.compile), 'syxconfig.json.compile.out: Missing'],
29+
[!arg.getArgument('language') && !arg.getArgument('lang') && !arg.getArgument('lng') && !arg.getArgument('l') && 'compile' in config && !('format' in config.compile), 'syxconfig.json.compile.format: Missing']
3030
]);
3131

3232
log.invisible('creating compiler instance');
33-
const compiler = new SyntaxScriptCompiler(arg.getArgument('root')??arg.getArgument('r')??config.compile.root, arg.getArgument('out')??arg.getArgument('o')??config.compile.out, arg.getArgument('language')??arg.getArgument('lang')??arg.getArgument('lng')??arg.getArgument('l')??config.compile.format);
33+
const compiler = new SyntaxScriptCompiler(arg.getArgument('root') ?? arg.getArgument('r') ?? config.compile.root, arg.getArgument('out') ?? arg.getArgument('o') ?? config.compile.out, arg.getArgument('language') ?? arg.getArgument('lang') ?? arg.getArgument('lng') ?? arg.getArgument('l') ?? config.compile.format);
3434

3535
log.info('Starting compilation');
3636
timer.mark('compilerstart');

src/env.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ export namespace environment {
22
export const MODULE_VERSION = '0.0.1-alpha';
33
export const FULL_MODULE_NAME = '[email protected]';
44
export const MODULE_NAME = 'syntaxs';
5-
export const IS_TESTING = process.env.TESTING==='1';
6-
export let DEBUG:boolean;
5+
export const IS_TESTING = process.env.TESTING === '1';
6+
export let DEBUG: boolean;
77
}

src/module/log.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const ansiEscape = /\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])/g;
2828
const time = Date.now();
2929

3030
process.on('exit', (c) => {
31-
log.invisible(`process end with code ${c}`, `end time: ${new Date().toISOString()}`, `time passed (in ms): ${Date.now()-time}`);
31+
log.invisible(`process end with code ${c}`, `end time: ${new Date().toISOString()}`, `time passed (in ms): ${Date.now() - time}`);
3232
if (!existsSync(dirPath)) mkdirSync(dirPath, { recursive: true });
3333
writeFileSync(logPath, logLines.map((s, i) => `${i + 1} ${s}`.replace(ansiEscape, '')).join('\n'));
3434
});

src/test/environment.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ import { expect } from 'chai';
55
const full = /[a-z]+@[0-9]\.[0-9]\.[0-9](-(alpha|beta|pre|rc[0-9]*))?/;
66
const ver = /[0-9]\.[0-9]\.[0-9](-(alpha|beta|pre|rc[0-9]*))?/;
77

8-
describe('Environment values',()=>{
8+
describe('Environment values', () => {
99

10-
it('should contain values',()=>{
10+
it('should contain values', () => {
1111
expect(environment).to.have.property('DEBUG').to.be.a('boolean').to.be.equal(false);
1212
expect(environment).to.have.property('IS_TESTING').to.be.a('boolean').to.be.equal(true);
1313
expect(environment).to.have.property('FULL_MODULE_NAME').to.be.a('string').to.be.not.equal('').to.be.not.equal(undefined);
1414
expect(environment).to.have.property('MODULE_NAME').to.be.a('string').to.be.not.equal('').to.be.not.equal(undefined);
1515
expect(environment).to.have.property('MODULE_VERSION').to.be.a('string').to.be.not.equal('').to.be.not.equal(undefined);
1616
});
1717

18-
it('should match valid version values',()=>{
18+
it('should match valid version values', () => {
1919
expect(environment.FULL_MODULE_NAME).to.be.a('string').to.match(full);
2020
expect(environment.MODULE_NAME).to.be.a('string').to.match(/[a-z]+/);
2121
expect(environment.MODULE_VERSION).to.be.a('string').to.match(ver);

src/test/function.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import { describe, it } from '@efekos/es-test/bin/testRunner.js';
22
import { expect } from 'chai';
33
import { getLocalAppDataPath } from '../utils.js';
44

5-
describe('Working function tests',()=>{
5+
describe('Working function tests', () => {
66

7-
it('utils.getLocalAppDataPath',()=>{
7+
it('utils.getLocalAppDataPath', () => {
88

99
const path = getLocalAppDataPath();
1010
expect(path).to.be.a('string').to.be.not.equal(undefined);

0 commit comments

Comments
 (0)