Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
exreplay committed Nov 7, 2020
1 parent ee46025 commit 74c8aab
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@ module.exports = {
jest: true
},
extends: [
'standard',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended'
],
rules: {
'@typescript-eslint/explicit-module-boundary-types': 'off',

'no-use-before-define': 'off',

...averConfig.rules,
...{ 'unicorn/no-process-exit': 'off' }
}
Expand Down
16 changes: 9 additions & 7 deletions packages/@averjs/cli/lib/commands/help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,15 @@ export default class HelpCommand extends Command implements CommandInterface {

generateCommandLineUsage(command?: CommandInterface) {
const cmd: Section[] = [];
const head = command ? {
header: `aver ${command.name}`,
content: command.description
} : {
content: this.getLogo(),
raw: true
};
const head = command
? {
header: `aver ${command.name}`,
content: command.description
}
: {
content: this.getLogo(),
raw: true
};

cmd.push(head);

Expand Down
13 changes: 8 additions & 5 deletions packages/@averjs/core/lib/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,14 @@ export default class Server extends WWW {
}
});

this.app.get('*', this.isProd ? this.render.bind(this) : (req, res) => {
this.builder?.readyPromise?.then(async() => {
await this.render(req, res);
});
});
this.app.get('*', this.isProd
? this.render.bind(this)
: (req, res) => {
this.builder?.readyPromise?.then(async() => {
await this.render(req, res);
});
}
);

await this.aver.callHook('server:after-register-routes', { app: this.app, middlewares: this.middlewares, server: this.server });
}
Expand Down

0 comments on commit 74c8aab

Please sign in to comment.