Showing 754 of 2,690 total issues
Function exports
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = (sequelize, DataTypes) => {
const scene = sequelize.define(
't_scene',
{
id: {
Function newValueCube
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function newValueCube(message, data) {
const { sid } = message;
logger.debug(`Xiaomi : New value cube, sid = ${sid}`);
const newSensor = {
service_id: this.serviceId,
Function BluetoothController
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function BluetoothController(bluetoothManager) {
/**
* @api {get} /api/v1/service/bluetooth/status Get Bluetooth status
* @apiName getStatus
* @apiGroup Bluetooth
Function createActions
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createActions(store) {
const actions = {
resetPreferences() {
store.setState({
signupUserPreferences: {
Function render
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(props, { showPassword }) {
const gladysNotAvailable = props.mqttConnectionError === RequestStatus.NetworkError;
return (
<form>
<div class="form-group">
Function setValue
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function setValue(gladysDevice, gladysFeature, value) {
if (!gladysFeature.external_id.startsWith('zwavejs-ui:')) {
throw new BadParameters(
`ZWaveJs-UI deviceFeature external_id is invalid: "${gladysFeature.external_id}" should starts with "zwavejs-ui:"`,
);
Function up
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
up: async () => {
// Get Tasmota service
const service = await db.Service.findOne({
attributes: ['id'],
where: {
Function installContainer
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function installContainer(config) {
if (!(await this.isEnabled())) {
logger.info('Nodered: is not enabled, skipping...');
return;
}
Function sendState
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function sendState(hkAccessory, feature, event) {
const { Characteristic, Service } = this.hap;
switch (`${feature.category}:${feature.type}`) {
case `${DEVICE_FEATURE_CATEGORIES.LIGHT}:${DEVICE_FEATURE_TYPES.LIGHT.BINARY}`:
case `${DEVICE_FEATURE_CATEGORIES.SWITCH}:${DEVICE_FEATURE_TYPES.SWITCH.BINARY}`:
Function newValueGateway
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function newValueGateway(message, data) {
const { sid } = message;
logger.debug(`Xiaomi : New value gateway, sid = ${sid}`);
if (message.cmd === 'heartbeat' && message.token) {
const newSensor = {
Function render
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(props, {}) {
return (
<div>
<div class="form-group" style={maxWidth}>
<label class="form-label" for="deviceName">
File index.js
has 281 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Component } from 'preact';
import { connect } from 'unistore/preact';
import actions from '../actions';
import FeatureTab from './FeatureTab';
import MqttPage from '../../MqttPage';
Function newValueSmoke
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function newValueSmoke(message, data) {
const { sid } = message;
logger.debug(`Xiaomi : New value smoke, sid = ${sid}`);
const newSensor = {
service_id: this.serviceId,
Function configureContainer
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function configureContainer(basePathOnContainer, config, setupMode = false) {
logger.info('Z2M Docker container is being configured...');
// Create configuration path (if not exists)
const configFilepath = path.join(basePathOnContainer, DEFAULT.CONFIGURATION_PATH);
Function render
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(props, state) {
const {
selectedOption,
userOptions,
houseOptions,
Function onMessage
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function onMessage(msg, rsinfo) {
const message = JSON.parse(msg.toString());
const ip = rsinfo.address;
logger.debug(message);
const data = message.data ? JSON.parse(message.data) : null;
Function createActions
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createActions(store) {
const actions = {
async getHouses(state) {
store.setState({
housesGetStatus: RequestStatus.Getting
File CalendarEventIsComing.jsx
has 278 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Component } from 'preact';
import { connect } from 'unistore/preact';
import cx from 'classnames';
import get from 'get-value';
Function DeviceController
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function DeviceController(gladys) {
/**
* @api {get} /api/v1/device/:device_selector getBySelector
* @apiName getBySelector
* @apiGroup Device
Function exports
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = (sequelize, DataTypes) => {
const message = sequelize.define(
't_message',
{
id: {