235 hijosCarrusel = unCarrusel.querySelectorAll('.carousel-item');
236
237 // Carrusel hijo. Envoltorio por item.
238 Array.prototype.forEach.call(hijosCarrusel, function(el,i){239 envolver(el,item);
240 });
241
5 */
6import { registerBlockType } from '@wordpress/blocks';
7import { useBlockProps, InnerBlocks, InspectorControls } from '@wordpress/block-editor';
8import { PanelBody, SelectControl, ToggleControl, TextControl } from '@wordpress/components'; 9
10/**
11 * Retrieves the translation of text.
5 */
6import { registerBlockType } from '@wordpress/blocks';
7import { useBlockProps, InnerBlocks, InspectorControls } from '@wordpress/block-editor';
8import { PanelBody, ToggleControl, TextControl } from '@wordpress/components'; 9
10/**
11 * Retrieves the translation of text.
46 * Import the element creator function (React abstraction layer)
47 * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-element/
48 */
49import { createElement, renderToString } from '@wordpress/element'; 50const customIcon = createElement(
51 'svg',
52 { width: 20, height: 20 },
Found variables that are declared but not used anywhere.
Unused variables are most often the result of incomplete refactoring. They can lead to confusing code and minor performance hitches.
NOTE: If you have intentionally left a variable unused, we suggest you to prefix the variable name with a _
to prevent them from being flagged by DeepSource.
// Write-only variables are not considered as used.
var y = 10;
y = 5;
// A variable that modifies only itself isn't considered used.
var z = 0;
z = z + 1;
// Unused argument
(function(x) {
return 5;
})();
// Unused recursive functions also raise this issue.
function fact(n) {
if (n < 2) return 1;
return n * fact(n - 1);
}
// When a function definition destructures an array,
// unused entries from the array also cause warnings.
function getY([x, y]) {
return y;
}
var x = 10;
alert(x);
((arg1) => {
return arg1;
})();
let myFunc;
myFunc = (n) => {
// this is legal
if (n < 0) myFunc();
};
// this is also considered legal
console.log(declaredLater);
var declaredLater;
// Only the second argument from the descructured array is used.
function getY([, y]) {
return y;
}