Showing 10 of 49 total issues
Function getBrowserWindowWithEvents
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getBrowserWindowWithEvents = (
options?: BrowserWindowConstructorOptions,
) => {
const browserWindow = new BrowserWindow(options);
Function createMenu
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createMenu(window: BrowserWindow) {
const menu = Menu.buildFromTemplate([
...(environmentService.mac
? ([
{
Function authReducer
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const authReducer: Reducer<AuthState, AuthAction> = (
state: AuthState = initialState,
action,
) => {
switch (action.type) {
Function chatReducer
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const chatReducer: Reducer<ChatState, ChatAction> = (
state: ChatState = initialState,
action,
) => {
switch (action.type) {
Function authenticateClient
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public authenticateClient(
clientId: string,
clientSecret: string,
): Promise<Tokens> {
return new Promise((resolve, reject) => {
Function attachEventListeners
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const attachEventListeners = (store: Store) => {
ipcRenderer
.on('app.setTheme', (_: Event, theme: string) => {
store.dispatch(setTheme(theme));
})
Function getUserInfo
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async getUserInfo(
clientId?: string,
clientSecret?: string,
): Promise<UserInfo> {
const id = clientId || this._storeService.getClientId();
Function createMainWindow
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createMainWindow() {
const window = getBrowserWindowWithEvents({
center: true,
minWidth: 360,
minHeight: 540,
Function template
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
export default function template(this: Wizard) {
return html`
<div class="backdrop"></div>
<div class="modal">
<div class="content">
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function connect
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
export const connect = <S>(store: Store<S>) => <
T extends Constructor<CustomElement>
>(
baseElement: T,
) =>
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"