Showing 39 of 128 total issues
Function render
has 162 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
let lineItems = [];
if (this.props.order.state !== 'complete') {
lineItems = this.props.order.line_items;
}
Function render
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
let renderString = null;
let variantListNode = null;
let { currentVariant } = this.state;
Function render
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
let statesRequired = this.state.stateList.states_required;
let stateOptionsMarkup;
if (statesRequired) {
Function render
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { handleSubmit } = this.props;
return (
<Modal modalClasses="user-form-modal" showModal={ this.props.showModal } closeModal={ this.closeModal } >
<div className="user-signup-modal">
Function render
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const useBilling = this.props.useBilling;
const { handleSubmit, valid, submitting } = this.props;
return (
Function build
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function build(previousSizeMap) {
console.log('Creating an optimized production build...');
webpack(config).run((err, stats) => {
if (err) {
printErrors('Failed to compile.', [err]);
Function render
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
let thisShipment = this.props.shipment;
return (
<div className="shipment-view">
Function render
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { handleSubmit, valid, submitting } = this.props;
return (
<Modal modalClasses="user-form-modal" showModal={ this.props.showModal } closeModal={ this.closeModal } >
Function render
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { handleSubmit, valid, submitting } = this.props;
return (
<Layout>
<BaseCheckoutLayout currentStep="confirm"
Function navIcons
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
navIcons () {
let userSessionActionMarkup;
let { user } = this.props;
if (this.props.user.id) {
Function mapDispatchToProps
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const mapDispatchToProps = (dispatch) => {
return {
setCurrentCheckoutStep: () => {
dispatch ({
type: APP_ACTIONS.SET_CURRENT_CHECKOUT_STEP,
Function lineItemList
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
let lineItemList = lineItems.map((lineItem, idx) => {
let variantImage = lineItem.variant.images[0].small_url;
let imageUrl = URLSanitizer.makeAbsolute(variantImage);
let productSlug = lineItem.variant.slug;
Function render
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
let userLoggedInClass = this.props.user.id ? 'user-logged-in ' : 'guest-user ';
return (
<nav className={ "global-header " + userLoggedInClass + styles.header}>
<div className="container">
Function render
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { handleSubmit, valid, submitting, order } = this.props;
let paymentMethods = order.payment_methods || [];
let paymentMethodMarkup = paymentMethods.map((paymentMethod, idx) => {
return (
Function setupCompiler
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setupCompiler(host, port, protocol) {
// "Compiler" is a low-level interface to Webpack.
// It lets us listen to some events and provide our own custom messages.
compiler = webpack(config, handleCompile);
Function _shipmentStateMarkup
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_shipmentStateMarkup() {
let thisShipment = this.props.shipment;
if (this._isShipped()) {
return (
Function getOrderPropertiesMapper
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getOrderPropertiesMapper () {
let thisOrder = this.props.order;
const ItemTotalRep = <FormattedMessage
id="label.itemTotal"
defaultMessage="Item Total"
Function _panelHeaderMarkup
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_panelHeaderMarkup() {
let thisOrder = this.props.order;
let paymentStatus = thisOrder.payment_state === 'paid' ? 'success' : 'danger';
return (
Function mapDispatchToProps
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const mapDispatchToProps = (dispatch) => {
return {
setCurrentCheckoutStep: () => {
dispatch ({
type: APP_ACTIONS.SET_CURRENT_CHECKOUT_STEP,
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
let shipments = this.props.order.shipments;
const { handleSubmit, valid, submitting } = this.props;
let shipmentsMarkup = shipments.map((shipment, idx) => {