Skip to content

Commit

Permalink
Use prettier conf same as in mediasoup
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Dec 29, 2024
1 parent 024d9d1 commit ff8cbc7
Show file tree
Hide file tree
Showing 48 changed files with 7,408 additions and 7,402 deletions.
20 changes: 7 additions & 13 deletions app/.prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
module.exports = {
printWidth: 80,
useTabs: true,
tabWidth: 2,
useTabs: false,
semi: false,
singleQuote: true,
quoteProps: 'as-needed',
jsxSingleQuote: true,
trailingComma: 'all',
bracketSpacing: true,
bracketSameLine: false,
arrowParens: 'avoid',
requirePragma: false,
insertPragma: false,
endOfLine: 'lf',
htmlWhitespaceSensitivity: 'ignore',
}
bracketSpacing: true,
semi: true,
singleQuote: true,
trailingComma: 'es5',
endOfLine: 'auto',
};
54 changes: 27 additions & 27 deletions app/src/Logger.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
import debug from 'debug'
import debug from 'debug';

const APP_NAME = 'mediasoup-demo'
const APP_NAME = 'mediasoup-demo';

export default class Logger {
constructor(prefix) {
if (prefix) {
this._debug = debug(`${APP_NAME}:${prefix}`)
this._warn = debug(`${APP_NAME}:WARN:${prefix}`)
this._error = debug(`${APP_NAME}:ERROR:${prefix}`)
} else {
this._debug = debug(APP_NAME)
this._warn = debug(`${APP_NAME}:WARN`)
this._error = debug(`${APP_NAME}:ERROR`)
}
constructor(prefix) {
if (prefix) {
this._debug = debug(`${APP_NAME}:${prefix}`);
this._warn = debug(`${APP_NAME}:WARN:${prefix}`);
this._error = debug(`${APP_NAME}:ERROR:${prefix}`);
} else {
this._debug = debug(APP_NAME);
this._warn = debug(`${APP_NAME}:WARN`);
this._error = debug(`${APP_NAME}:ERROR`);
}

/* eslint-disable no-console */
this._debug.log = console.info.bind(console)
this._warn.log = console.warn.bind(console)
this._error.log = console.error.bind(console)
/* eslint-enable no-console */
}
/* eslint-disable no-console */
this._debug.log = console.info.bind(console);
this._warn.log = console.warn.bind(console);
this._error.log = console.error.bind(console);
/* eslint-enable no-console */
}

get debug() {
return this._debug
}
get debug() {
return this._debug;
}

get warn() {
return this._warn
}
get warn() {
return this._warn;
}

get error() {
return this._error
}
get error() {
return this._error;
}
}
Loading

0 comments on commit ff8cbc7

Please sign in to comment.