fix(server): linting issues
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
26573e5a2b
commit
7726223698
4 changed files with 37 additions and 15 deletions
|
@ -16,7 +16,6 @@ module.exports = {
|
|||
'ignoreDestructuring': false,
|
||||
'ignoreImports': false,
|
||||
}],
|
||||
// 'capitalized-comments': ['error', 'always'],
|
||||
'comma-dangle': ['error', 'always-multiline'],
|
||||
'comma-spacing': ['error', { 'before': false, 'after': true }],
|
||||
'curly': ['error', 'all'],
|
||||
|
@ -49,14 +48,14 @@ module.exports = {
|
|||
'ignoreCase': false,
|
||||
'ignoreDeclarationSort': false,
|
||||
'ignoreMemberSort': false,
|
||||
'memberSyntaxSortOrder': ['none', 'all', 'multiple', 'single']
|
||||
'memberSyntaxSortOrder': ['none', 'all', 'multiple', 'single'],
|
||||
}],
|
||||
'sort-vars': ['error', { 'ignoreCase': true }],
|
||||
'space-before-blocks': ['error', 'always'],
|
||||
'space-before-function-paren': ['error', {
|
||||
'anonymous': 'always',
|
||||
'named': 'never',
|
||||
'asyncArrow': 'always'
|
||||
'asyncArrow': 'always',
|
||||
}],
|
||||
'space-in-parens': ['error', 'never'],
|
||||
'spaced-comment': ['error', 'always'],
|
||||
|
@ -76,14 +75,37 @@ module.exports = {
|
|||
'plugin:@typescript-eslint/recommended',
|
||||
],
|
||||
rules: {
|
||||
// '@typescript-eslint/array-type': ['error', {
|
||||
// 'default': 'array',
|
||||
// 'readonly': 'array-simple',
|
||||
// }],
|
||||
'@typescript-eslint/interface-name-prefix': ['error', 'always'],
|
||||
'@typescript-eslint/naming-convention': [
|
||||
'error',
|
||||
{
|
||||
'selector': 'default',
|
||||
'format': ['camelCase'],
|
||||
},
|
||||
{
|
||||
'selector': 'variable',
|
||||
'modifiers': ['const'],
|
||||
'format': ['PascalCase', 'camelCase'],
|
||||
},
|
||||
{
|
||||
'selector': 'parameter',
|
||||
'format': ['camelCase'],
|
||||
'leadingUnderscore': 'allow',
|
||||
},
|
||||
{
|
||||
'selector': 'typeLike',
|
||||
'format': ['PascalCase'],
|
||||
},
|
||||
{
|
||||
'selector': 'interface',
|
||||
'format': ['PascalCase'],
|
||||
'prefix': ['I'],
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/no-empty-interface': ['error', { 'allowSingleExtends': false }],
|
||||
'quotes': 'off',
|
||||
'@typescript-eslint/quotes': ['error', 'single'],
|
||||
'@typescript-eslint/type-annotation-spacing': ['error', { 'before': false, 'after': true }],
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
|
@ -7,7 +7,7 @@ export class AppController {
|
|||
|
||||
@Get()
|
||||
@Render('index.hbs')
|
||||
async getIndex(): Promise<object> {
|
||||
async getIndex(): Promise<Record<string, unknown>> {
|
||||
const channels = await this.teamspeakService.getPopulatedChannelList();
|
||||
return { title: 'Cliffbreak.de TS-Viewer', channels };
|
||||
}
|
||||
|
|
|
@ -6,8 +6,9 @@ import { TeamSpeakClient } from 'node-ts';
|
|||
|
||||
const env = process.env;
|
||||
|
||||
/* eslint-disable camelcase */
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/* eslint-disable @typescript-eslint/camelcase */
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
// Disable specific ESLint rules because node-ts has no typings
|
||||
@Injectable()
|
||||
export class TeamspeakService {
|
||||
|
|
|
@ -5,7 +5,6 @@ import { NestFactory } from '@nestjs/core';
|
|||
import { join } from 'path';
|
||||
|
||||
const env = process.env;
|
||||
const __webapp = join(__dirname, '..', '..', 'webapp');
|
||||
|
||||
|
||||
async function bootstrap(): Promise<void> {
|
||||
|
@ -15,14 +14,14 @@ async function bootstrap(): Promise<void> {
|
|||
);
|
||||
|
||||
app.useStaticAssets({
|
||||
root: join(__webapp, 'assets'),
|
||||
root: join(__dirname, '../../webapp/assets'),
|
||||
prefix: '/assets/',
|
||||
});
|
||||
app.setViewEngine({
|
||||
engine: {
|
||||
handlebars: require('handlebars'),
|
||||
},
|
||||
templates: join(__webapp, 'src', 'views'),
|
||||
templates: join(__dirname, '../../webapp/src/views'),
|
||||
layout: join('layouts', 'main.hbs'),
|
||||
options: {
|
||||
partials: {
|
||||
|
|
Loading…
Reference in a new issue