<commit_before>/**
 * ProgressComponent.jsx
 * Created by <NAME> 12/31/15
 **/

import React, { PropTypes } from 'react';

const propTypes = {
    currentStep: PropTypes.number.isRequired,
    totalSteps: PropTypes.number.isRequired,
    stepNames: PropTypes.array.isRequired
};

const defaultProps = {
    currentStep: 1,
    totalSteps: 3,
    stepNames: ['Upload .csv Files', 'Validate .csv Data', 'Review and Publish']
};

export default class Progress extends React.Component {
    constructor(props) {
        super(props);
    }

    render() {
        var progressBar = [];
        var progressLabels = [];
        var stepNames = this.props.stepNames;

        for (let i = 1; i <= this.props.totalSteps; i++) {
            if (i < this.props.currentStep) {
                progressBar.push(<li key={i} className="usa-da-progress-bar-step-done"><span className="step">{i}</span></li>);
                progressLabels.push(<li key={i} className="usa-da-progress-bar-step-done"><span className="name">{stepNames[i - 1]}</span></li>);
            } else if (i == this.props.currentStep){
                progressBar.push(<li key={i} className="usa-da-progress-bar-step-current"><span className="step">{i}</span></li>);
                progressLabels.push(<li key={i} className="usa-da-progress-bar-step-current"><span className="name">{stepNames[i-1]}</span></li>);
            } else {
                progressBar.push(<li key={i} className="usa-da-progress-bar-step"><span className="step">{i}</span></li>);
                progressLabels.push(<li key={i} className="usa-da-progress-bar-step"><span className="name">{stepNames[i-1]}</span></li>);
            }
        }

        return (
            <div className="row">
                <div className="col-md-12 usa-da-progress-bar">
                    <ul className="usa-da-progress-bar-holder" data-steps={this.props.totalSteps}>
                        {progressBar}
                    </ul>
                    <ul className="usa-da-progress-bar-holder" data-steps={this.props.totalSteps}>
                        {progressLabels}
                    </ul>
                </div>
            </div>
        );
    }
}

Progress.propTypes = propTypes;
Progress.defaultProps = defaultProps;<commit_msg>Fixing some eslint errors related to style and ES6<commit_after>/**
 * ProgressComponent.jsx
 * Created by <NAME> 12/31/15
 **/

import React, { PropTypes } from 'react';

const propTypes = {
    currentStep: PropTypes.number.isRequired,
    totalSteps: PropTypes.number.isRequired,
    stepNames: PropTypes.array.isRequired
};

const defaultProps = {
    currentStep: 1,
    totalSteps: 3,
    stepNames: ['Upload .csv Files', 'Validate .csv Data', 'Review and Publish']
};

export default class Progress extends React.Component {
    constructor(props) {
        super(props);
    }

    render() {
        const progressBar = [];
        const progressLabels = [];
        const stepNames = this.props.stepNames;

        for (let i = 1; i <= this.props.totalSteps; i++) {
            if (i < this.props.currentStep) {
                progressBar.push(<li key={i} className="usa-da-progress-bar-step-done"><span className="step">{i}</span></li>);
                progressLabels.push(<li key={i} className="usa-da-progress-bar-step-done"><span className="name">{stepNames[i - 1]}</span></li>);
            } else if (i === this.props.currentStep) {
                progressBar.push(<li key={i} className="usa-da-progress-bar-step-current"><span className="step">{i}</span></li>);
                progressLabels.push(<li key={i} className="usa-da-progress-bar-step-current"><span className="name">{stepNames[i - 1]}</span></li>);
            } else {
                progressBar.push(<li key={i} className="usa-da-progress-bar-step"><span className="step">{i}</span></li>);
                progressLabels.push(<li key={i} className="usa-da-progress-bar-step"><span className="name">{stepNames[i - 1]}</span></li>);
            }
        }

        return (
            <div className="row">
                <div className="col-md-12 usa-da-progress-bar">
                    <ul className="usa-da-progress-bar-holder" data-steps={this.props.totalSteps}>
                        {progressBar}
                    </ul>
                    <ul className="usa-da-progress-bar-holder" data-steps={this.props.totalSteps}>
                        {progressLabels}
                    </ul>
                </div>
            </div>
        );
    }
}

Progress.propTypes = propTypes;
Progress.defaultProps = defaultProps;
{'fraction_non_alphanumeric': 0.1621208815186559, 'fraction_numerical': 0.006327732926030984, 'mean_word_length': 2.293103448275862, 'pattern_counts': {'":': 0, '<': 73, '<?xml version=': 0, '>': 69, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7246470', 'n_tokens_mistral': 1379, 'n_tokens_neox': 1323, 'n_words': 235}