Skip to content

Commit 5a89567

Browse files
committed
refactor: eslint --fix
1 parent e994500 commit 5a89567

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

src/app.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import helmet from 'helmet';
77
import { logger } from 'kv-logger';
88
import { AppError, NotFound } from './core/app-error';
99
import { config } from './core/config';
10-
import { i18n } from "./core/i18n"
10+
import { i18n } from './core/i18n';
1111
import { Req, Res, withLogger } from './core/middleware';
1212
import { accessKeysRouter } from './routes/accessKeys';
1313
import { accountRouter } from './routes/account';
@@ -25,14 +25,12 @@ app.use(
2525
}),
2626
);
2727

28-
29-
3028
// view engine setup
3129
app.set('views', path.join(__dirname, '../views'));
3230
app.set('view engine', 'pug');
3331

3432
// translations
35-
app.use(i18n.init)
33+
app.use(i18n.init);
3634

3735
app.use(bodyParser.json());
3836
app.use(bodyParser.urlencoded({ extended: false }));

src/core/i18n.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { I18n } from 'i18n'
2-
import path from "path"
1+
import path from 'path';
2+
import { I18n } from 'i18n';
33

44
export const i18n = new I18n({
55
locales: ['en', 'cn'],
66
directory: path.join(__dirname, '../../locales'),
7-
defaultLocale: 'en'
8-
})
7+
defaultLocale: 'en',
8+
});

src/routes/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import express from 'express';
22
import { AppError } from '../core/app-error';
3-
import { i18n } from "../core/i18n"
3+
import { i18n } from '../core/i18n';
44
import { checkToken, Req } from '../core/middleware';
55
import { clientManager } from '../core/services/client-manager';
66

@@ -11,6 +11,7 @@ indexRouter.get('/', (req, res) => {
1111
});
1212

1313
indexRouter.get('/tokens', (req, res) => {
14+
// eslint-disable-next-line no-underscore-dangle
1415
res.render('tokens', { title: `${i18n.__('Obtain')} token` });
1516
});
1617

0 commit comments

Comments
 (0)