Showing 742 of 2,674 total issues
Function render
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(props) {
const displayBody = METHOD_WITH_BODY.includes(props.action.method);
return (
<div>
<div
Function Gladys
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Gladys(params = {}) {
params.jwtSecret = params.jwtSecret || generateJwtSecret();
const config = getConfig();
const event = new Event();
Function createActions
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createActions = store => {
const houseActions = createActionsHouse(store);
const actions = {
async getDiscoveredDevices(state = {}) {
store.setState({
Function createActions
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createActions(store) {
const houseActions = createActionsHouse(store);
const integrationActions = createActionsIntegration(store);
const actions = {
async getPhilipsHueDevices(state) {
Function render
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render({ device = {}, deviceIndex, houses = [] }, { loading, saveError }) {
const { features = [] } = device;
const enableSaveButton = !device.created_at;
const enableUpdateButton = device.updatable;
const supportedDevice = features.findIndex(f => f.category !== DEVICE_FEATURE_CATEGORIES.BATTERY) >= 0;
Function render
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(props, { cardOpened }) {
return (
<div class="col">
<div class="card">
<div class="card-status bg-green" />
Function createActions
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createActions(store) {
const houseActions = createActionsHouse(store);
const integrationActions = createActionsIntegration(store);
const actions = {
async getTpLinkDevices(state) {
Function render
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(props, state) {
return (
<div class="card">
<div class="card-header">
<h1 class="card-title">
Function render
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(props, {}) {
const selectedOption = this.getSelectedOption();
return (
<div>
<div className={style.explanationText}>
File UsagePoints.jsx
has 347 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Component } from 'preact';
import { connect } from 'unistore/preact';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
import localizedFormat from 'dayjs/plugin/localizedFormat';
Function createActions
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createActions(store) {
const integrationActions = createActionsIntegration(store);
const houseActions = createActionsHouse(store);
const actions = {
async getZigbee2mqttDevices(state, take, skip) {
Function exports
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = (sequelize, DataTypes) => {
const deviceFeature = sequelize.define(
't_device_feature',
{
id: {
Function createActions
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createActions = store => {
const integrationActions = createActionsIntegration(store);
const actions = {
async checkStatus(state) {
let zigbee2mqttStatus = {
Function render
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render({ houses, bluetoothSaveStatus, currentIntegration = {} }, { device, presenceSensorIndex }) {
const deviceService = get(device, 'service_id');
const bluetoothDevice = !deviceService || deviceService === currentIntegration.id;
const disableForm = bluetoothSaveStatus === RequestStatus.Getting || !bluetoothDevice;
const { features = [] } = device;
File EditChart.jsx
has 344 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Component } from 'preact';
import { Localizer, Text } from 'preact-i18n';
import { connect } from 'unistore/preact';
import Select from 'react-select';
import get from 'get-value';
Function render
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render({ action }, { selectedCalendarsOptions, calendarsOptions }) {
return (
<div>
<div class="row">
<div class="col-md-12">
Function Zigbee2mqttController
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function Zigbee2mqttController(gladys, zigbee2mqttManager) {
/**
* @api {get} /api/v1/service/zigbee2mqtt/discovered Get discovered Zigbee2mqtt devices
* @apiName getDiscoveredDevices
* @apiGroup Zigbee2mqtt
Function render
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(
{ selectedFeature, selectedValue, learnAllMode, editedFeatures, device, learning, ...props },
{ timeLeft, errorKey }
) {
const { model: category } = device;
Function UserController
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function UserController(gladys) {
/**
* @api {post} /api/v1/user Create
* @apiName CreateUser
* @apiGroup User
Function createActions
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createActions(store) {
const integrationActions = createActionsIntegration(store);
const houseActions = createActionsHouse(store);
const actions = {
async getDiscoveredDevices(state) {