Showing 1,820 of 4,015 total issues
Function up
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function up(knex) {
logging.info('Backfilling "offer_id" column in "members_stripe_customers_subscriptions" by matching tier and cadence');
const subquery = `
SELECT
Function down
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function down(connection) {
const newSetting = await connection('settings')
.where('key', 'members_signup_access')
.select('value', 'created_by', 'updated_by')
.first();
Function clickHandler
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function clickHandler(event) {
el.removeEventListener('click', clickHandler);
event.preventDefault();
el.classList.remove('error');
el.classList.add('loading');
Function clickHandler
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function clickHandler(event) {
el.removeEventListener('click', clickHandler);
event.preventDefault();
el.classList.remove('error');
el.classList.add('loading');
Function validateFilter
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function validateFilter(filter: string | null, type: 'manual' | 'automatic', isAllowedEmpty = false) {
const allowedProperties = ['featured', 'published_at', 'tag', 'tags'];
if (type === 'manual') {
if (filter !== null) {
throw new ValidationError({
Function useSearchService
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const useSearchService = () => {
const [filter, setFilter] = useState('');
const [noResult, setNoResult] = useState(false);
const checkVisible = (keywords: string[]) => {
Function initialize
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function initialize(applicationInstance) {
const config = new TrackedObject({});
Object.defineProperty(config, 'availableTimezones', {
get() {
Function get
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async get(data, options = {}) {
if (!options.transacting) {
return this._Product.transaction((transacting) => {
return this.get(data, {
...options,
Function edit
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
edit: function (data, unfilteredOptions) {
const options = this.filterOptions(unfilteredOptions, 'edit');
const self = this;
if (!Array.isArray(data)) {
Function authenticateContentApiKey
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const authenticateContentApiKey = async function authenticateContentApiKey(req, res, next) {
// allow fallthrough to other auth methods or final ensureAuthenticated check
if (!req.query || !req.query.key) {
return next();
}
Function addFixturesForRelation
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async addFixturesForRelation(relationFixture, options) {
const ops = [];
let max = 0;
const data = await this.fetchRelationData(relationFixture, options);
Function mediaUploadValidation
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
return function mediaUploadValidation(req, res, next) {
const extensions = (config.get('uploads')[type] && config.get('uploads')[type].extensions) || [];
const contentTypes = (config.get('uploads')[type] && config.get('uploads')[type].contentTypes) || [];
const thumbnailExtensions = (config.get('uploads').thumbnails && config.get('uploads').thumbnails.extensions) || [];
Function up
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function up(knex) {
logging.info('Creating built in collections');
const existingLatestCollection = await knex('collections')
.where({
Function getAmperizeHTML
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getAmperizeHTML(html, post) {
if (!html) {
return;
}
Function getTitle
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getTitle(data, root, options = {}) {
const context = root ? root.context : null;
const siteTitle = settingsCache.get('title') || '';
const pagination = root ? root.pagination : null;
Function HeaderNotification
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const HeaderNotification = () => {
if (pageData.comments && commentsEnabled) {
const hideClassName = hasInteracted ? 'gh-portal-hide' : '';
return (
<>
Function HeaderNotification
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const HeaderNotification = () => {
if (pageData.comments && commentsEnabled) {
const hideClassName = hasInteracted ? 'gh-portal-hide' : '';
return (
<>
Function handleSignup
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
handleSignup(e) {
e.preventDefault();
const {pageData: offer, site} = this.context;
if (!offer) {
return null;
Function fetchOfferQueryStrData
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fetchOfferQueryStrData(qs = '') {
const qsParams = new URLSearchParams(qs);
const data = {};
// Handle the query params key/value pairs
for (let pair of qsParams.entries()) {
Function StripeConnectModal
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const StripeConnectModal: React.FC = () => {
const {config, settings} = useGlobalData();
const stripeConnectAccountId = getSettingValue(settings, 'stripe_connect_account_id');
const {updateRoute} = useRouting();
const [step, setStep] = useState<'start' | 'connect'>('start');