Skip to content
Merged
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
91 changes: 46 additions & 45 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,48 +1,49 @@
{
"comment": "off = 0, warn = 1, error = 2",
"comment": "off = 0, warn = 1, error = 2",

"parser": "babel-eslint",
"env": {
"browser": true
},
"extends": "airbnb",
"rules": {
"max-len": [1, 100, 2, {ignoreComments: true}],
"quote-props": [1, "consistent-as-needed"],
"no-cond-assign": [2, "except-parens"],
"radix": 0,
"space-infix-ops": 0,
"no-unused-vars": [1, {"vars": "local", "args": "none"}],
"default-case": 0,
"no-else-return": 0,
"no-param-reassign": 0,
"quotes": 0,
"comma-dangle": [1, "only-multiline"],
"vars-on-top": 0,
"prefer-const": 1,
"eqeqeq": 1,
"import/imports-first": 1,
"consistent-return": 0,
"import/no-mutable-exports": 0,
"no-class-assign": 0,
"jsx-a11y/label-has-for": 0,
"jsx-a11y/href-no-hash": 1,
"camelcase": 0,
"no-fallthrough": 0,
"no-restricted-syntax": 1,
"guard-for-in": 1,
"array-callback-return": 1,
"class-methods-use-this": 1,
"jsx-a11y/no-static-element-interactions": 1,
"react/forbid-prop-types": 1,
"arrow-parens": 1,
"no-bitwise": 1,
"no-plusplus": 1,
"no-extend-native": 1,
"no-use-before-define": 1,
"no-unused-expressions": 1,
"no-continue": 1,
"no-prototype-builtins": 1,
"dot-notation": 1,
}
"parser": "babel-eslint",
"env": {
"browser": true
},
"extends": "airbnb",
"rules": {
"max-len": [1, 100, 2, {ignoreComments: true}],
"quote-props": [1, "consistent-as-needed"],
"no-cond-assign": [2, "except-parens"],
"radix": 0,
"space-infix-ops": 0,
"no-unused-vars": [1, {"vars": "local", "args": "none"}],
"default-case": 0,
"no-else-return": 0,
"no-param-reassign": 0,
"quotes": 0,
"comma-dangle": [1, "only-multiline"],
"vars-on-top": 0,
"prefer-const": 1,
"eqeqeq": 1,
"import/imports-first": 1,
"consistent-return": 0,
"import/no-mutable-exports": 0,
"no-class-assign": 0,
"jsx-a11y/label-has-for": 0,
"jsx-a11y/href-no-hash": 1,
"camelcase": 0,
"no-fallthrough": 0,
"no-restricted-syntax": 1,
"guard-for-in": 1,
"array-callback-return": 1,
"class-methods-use-this": 1,
"jsx-a11y/no-static-element-interactions": 1,
"react/forbid-prop-types": 1,
"arrow-parens": 1,
"no-bitwise": 1,
"no-plusplus": 1,
"no-extend-native": 1,
"no-use-before-define": 1,
"no-unused-expressions": 1,
"no-continue": 1,
"no-prototype-builtins": 1,
"dot-notation": 1,
"react/no-array-index-key": 1
}
}
9 changes: 8 additions & 1 deletion .travis/travis_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@
set -ex


section "ESLint"

make lint-install
make lint

section_end "ESLint"


section "Tests"

make log &
make ${TEST_TARGET}

section_end "Tests"

2 changes: 1 addition & 1 deletion baselayer
Submodule baselayer updated 2 files
+8 −0 .eslintrc.yaml
+7 −1 app/test_util.py
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
"babel-preset-stage-2": "^6.22.0",
"css-loader": "^0.26.1",
"cwise": "^1.0.9",
"eslint": "^3.16.1",
"eslint-config-airbnb": "^14.1.0",
"eslint": "^4.19.1",
"eslint-config-airbnb": "^16.1.0",
"eslint-loader": "^1.6.3",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-react": "^6.10.0",
"eslint-plugin-import": "^2.11.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.7.0",
"exports-loader": "^0.6.3",
"glslify": "^6.0.1",
"imports-loader": "^0.7.0",
Expand Down
61 changes: 30 additions & 31 deletions static/js/CesiumMessageHandler.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
import * as Action from './actions';
import { SHOW_NOTIFICATION, showNotification } from 'baselayer/components/Notifications';
import MessageHandler from 'baselayer/MessageHandler';
import * as Action from './actions';

let CesiumMessageHandler = dispatch => {
return new MessageHandler(dispatch, message => {
switch (message.action) {
case Action.FETCH_PROJECTS:
dispatch(Action.fetchProjects());
break;
case Action.FETCH_FEATURES:
dispatch(Action.fetchFeatures());
break;
case Action.FETCH_DATASETS:
dispatch(Action.fetchDatasets());
break;
case Action.FETCH_FEATURESETS:
dispatch(Action.fetchFeaturesets());
break;
case Action.FETCH_MODELS:
dispatch(Action.fetchModels());
break;
case Action.FETCH_PREDICTIONS:
dispatch(Action.fetchPredictions());
break;
case Action.FEATURIZE_PROGRESS:
let time_update = message.payload;
dispatch(Action.featurizeUpdateProgress(time_update));
break;
default:
console.log('Unknown message received through flow:',
message);
const CesiumMessageHandler = dispatch => new MessageHandler(dispatch, (message) => {
switch (message.action) {
case Action.FETCH_PROJECTS:
dispatch(Action.fetchProjects());
break;
case Action.FETCH_FEATURES:
dispatch(Action.fetchFeatures());
break;
case Action.FETCH_DATASETS:
dispatch(Action.fetchDatasets());
break;
case Action.FETCH_FEATURESETS:
dispatch(Action.fetchFeaturesets());
break;
case Action.FETCH_MODELS:
dispatch(Action.fetchModels());
break;
case Action.FETCH_PREDICTIONS:
dispatch(Action.fetchPredictions());
break;
case Action.FEATURIZE_PROGRESS: {
const time_update = message.payload;
dispatch(Action.featurizeUpdateProgress(time_update));
break;
}
});
}
default:
console.log('Unknown message received through flow:',
message);
}
});

export default CesiumMessageHandler;
Loading