Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
parser: babel-eslint
env:
browser: true
extends: [airbnb, plugin:react/recommended]
plugins: [import, react]
settings:
import/resolver:
webpack:
config: webpack.config.js

rules:
array-callback-return: 1
arrow-parens: 1
camelcase: off
class-methods-use-this: 1
comma-dangle: [1, only-multiline]
consistent-return: 0
default-case: 0
dot-notation: 1
eqeqeq: 1
guard-for-in: 1
import/imports-first: 1
import/no-mutable-exports: 0
jsx-a11y/anchor-is-valid: [warn, {"aspects": [invalidHref]}]
jsx-a11y/href-no-hash: 'off'
jsx-a11y/label-has-for: 0
jsx-a11y/no-static-element-interactions: 1
max-len: [0, 80, 2, {"ignoreComments": true}]
no-bitwise: 1
no-class-assign: 0
no-cond-assign: [2, except-parens]
no-continue: 1
no-else-return: 0
no-extend-native: 1
no-fallthrough: 'off'
no-param-reassign: 0
no-plusplus: 1
no-prototype-builtins: 1
no-restricted-syntax: 1
no-unused-expressions: 1
no-unused-vars: [1, {"args": none, "vars": local}]
no-use-before-define: 1
prefer-const: 1
quote-props: [1, consistent-as-needed]
quotes: 0
radix: 0
react/forbid-prop-types: 1
space-infix-ops: 0
no-underscore-dangle: [2, {"allowAfterThis": true}]
vars-on-top: 0
object-curly-newline: [2, {"consistent": true}]
function-paren-newline: [2, "consistent"]
react/no-array-index-key: 1
jsx-a11y/click-events-have-key-events: 0
jsx-a11y/no-noninteractive-element-interactions: 1
prefer-promise-reject-errors: 1
react/jsx-key: 1
indent: 1
import/no-unresolved: 1
import/extensions: 1
react/destructuring-assignment: 1
react/jsx-one-expression-per-line: 1
react/jsx-wrap-multilines: 1
operator-linebreak: 1
lines-between-class-members: 1
react/no-access-state-in-setstate: 1
implicit-arrow-linebreak: 1
jsx-a11y/label-has-associated-control: 1
2 changes: 1 addition & 1 deletion .travis/travis_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ section "install.base.requirements"
firefox --version

# Install v1.7 or newer of nginx to support 'if' statement for logging
sudo apt-add-repository -y ppa:nginx/development
sudo apt-add-repository -y ppa:nginx/stable
sudo apt update
sudo apt install -y nginx

Expand Down
2 changes: 1 addition & 1 deletion baselayer
3 changes: 2 additions & 1 deletion static/js/components/FoldableRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
* The second element can be, e.g., another row in the table.
* */

import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import colorScheme from './colorscheme';

const cs = colorScheme;
Expand Down
5 changes: 3 additions & 2 deletions static/js/components/Plot.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { showNotification } from 'baselayer/components/Notifications';
/* eslint-disable */
Expand Down Expand Up @@ -71,8 +72,8 @@ class Plot extends Component {
}
}
Plot.propTypes = {
url: React.PropTypes.string.isRequired,
dispatch: React.PropTypes.func.isRequired
url: PropTypes.string.isRequired,
dispatch: PropTypes.func.isRequired
};

Plot = connect()(Plot);
Expand Down
3 changes: 2 additions & 1 deletion static/js/components/Progress.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';

const Progress = (props) => {
let response = '';
Expand All @@ -25,7 +26,7 @@ const Progress = (props) => {
};

Progress.propTypes = {
type: React.PropTypes.string.isRequired
type: PropTypes.string.isRequired
};

export default Progress;
3 changes: 2 additions & 1 deletion static/js/components/Projects.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { reduxForm } from 'redux-form';

Expand Down
5 changes: 3 additions & 2 deletions static/js/components/UserProfile.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';

let UserProfile = props => (
<div style={props.style}>{props.profile.username}</div>
);
UserProfile.propTypes = {
style: React.PropTypes.object.isRequired,
profile: React.PropTypes.object.isRequired
style: PropTypes.object.isRequired,
profile: PropTypes.object.isRequired
};

const mapStateToProps = state => (
Expand Down