Skip to content

Commit 973610b

Browse files
committed
lint: make happy
1 parent df2abb1 commit 973610b

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

demo/config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ collections:
1616
create: true
1717
slug: '{{year}}-{{month}}-{{day}}-{{slug}}'
1818
fields:
19-
- {label: 'Title', name: 'title', widget: 'string'}
20-
- {label: 'Date', name: 'date', widget: 'datetime'}
21-
- {label: 'Body', name: 'body', widget: 'markdown'}
19+
- { label: 'Title', name: 'title', widget: 'string' }
20+
- { label: 'Date', name: 'date', widget: 'datetime' }
21+
- { label: 'Body', name: 'body', widget: 'markdown' }

demo/web-dev-server.config.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const config = {
55
hostname: '0.0.0.0',
66
port: 8080,
77
watch: true,
8-
nodeResolve: {exportConditions: ['development']},
8+
nodeResolve: { exportConditions: ['development'] },
99
rootDir: '.',
1010
clearTerminalOnReload: false,
1111
};

src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {createLogger} from '@alwatr/logger';
1+
import { createLogger } from '@alwatr/logger';
22

33
const clientId = process.env.OAUTH_GITHUB_CLIENT_ID;
44
const clientSecret = process.env.OAUTH_GITHUB_CLIENT_SECRET;

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import './route/home.js';
22
import './route/auth.js';
33
import './route/callback.js';
4-
import {logger} from './config.js';
4+
import { logger } from './config.js';
55

66
logger.logOther?.('..:: Alwatr Decap CMS Backend ::..');

src/lib/api-server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {NanotronApiServer} from '@alwatr/nanotron';
1+
import { NanotronApiServer } from '@alwatr/nanotron';
22

3-
import {config} from '../config.js';
3+
import { config } from '../config.js';
44

55
export const apiServer = new NanotronApiServer(config.nanoServer);

src/route/auth.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import {AuthorizationCode} from 'simple-oauth2';
2-
import {randomBytes} from 'crypto';
3-
import {apiServer} from '../lib/api-server.js';
4-
import {config, logger} from '../config.js';
1+
import { AuthorizationCode } from 'simple-oauth2';
2+
import { randomBytes } from 'crypto';
3+
import { apiServer } from '../lib/api-server.js';
4+
import { config, logger } from '../config.js';
55

66
export const randomString = () => randomBytes(4).toString('hex');
77

@@ -12,7 +12,7 @@ apiServer.defineRoute({
1212
const host = this.headers.host;
1313
const url = new URL(`https://${host}/${this.url}`);
1414
const provider = url.searchParams.get('provider');
15-
logger.logMethodArgs?.('get-auth', {host, url, provider});
15+
logger.logMethodArgs?.('get-auth', { host, url, provider });
1616

1717
if (provider !== 'github') {
1818
return {

src/route/callback.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import {AuthorizationCode} from 'simple-oauth2';
2-
import {config, logger} from '../config.js';
3-
import {apiServer} from '../lib/api-server.js';
1+
import { AuthorizationCode } from 'simple-oauth2';
2+
import { config, logger } from '../config.js';
3+
import { apiServer } from '../lib/api-server.js';
44

55
apiServer.defineRoute({
66
method: 'GET',
@@ -10,7 +10,7 @@ apiServer.defineRoute({
1010
const url = new URL(`https://${host}/${this.url}`);
1111
const provider = url.searchParams.get('provider');
1212
const code = url.searchParams.get('code');
13-
logger.logMethodArgs?.('get-callback', {host, url, provider});
13+
logger.logMethodArgs?.('get-callback', { host, url, provider });
1414

1515
if (provider !== 'github') {
1616
return {
@@ -54,7 +54,7 @@ function renderBody(status: string, token?: string) {
5454
<script>
5555
const receiveMessage = (message) => {
5656
window.opener.postMessage(
57-
'authorization:github:${status}:${JSON.stringify({token})}',
57+
'authorization:github:${status}:${JSON.stringify({ token })}',
5858
message.origin
5959
);
6060

src/route/home.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {apiServer} from '../lib/api-server.js';
1+
import { apiServer } from '../lib/api-server.js';
22

33
apiServer.defineRoute({
44
method: 'GET',

0 commit comments

Comments
 (0)