From 25d5310cf579d3e365fdec61e1a340304329c638 Mon Sep 17 00:00:00 2001 From: Andrew Watkins Date: Tue, 25 Jul 2017 13:38:12 -0700 Subject: [PATCH] Prettier --- ui/src/external/codemirror.js | 19 ++++++++++++------- ui/src/kapacitor/components/Tickscript.js | 3 +-- .../kapacitor/components/TickscriptHeader.js | 3 +-- ui/src/kapacitor/components/TickscriptID.js | 3 +-- ui/src/kapacitor/components/TickscriptType.js | 3 +-- 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/ui/src/external/codemirror.js b/ui/src/external/codemirror.js index 15e86c76e..b10a9ddbc 100644 --- a/ui/src/external/codemirror.js +++ b/ui/src/external/codemirror.js @@ -9,11 +9,13 @@ CodeMirror.defineSimpleMode = function(name, states) { CodeMirror.simpleMode = function(config, states) { ensureState(states, 'start') - const states_ = {}, meta = states.meta || {} + const states_ = {}, + meta = states.meta || {} let hasIndentation = false for (const state in states) { if (state !== meta && states.hasOwnProperty(state)) { - const list = (states_[state] = []), orig = states[state] + const list = (states_[state] = []), + orig = states[state] for (let i = 0; i < orig.length; i++) { const data = orig[i] list.push(new Rule(data, states)) @@ -51,9 +53,10 @@ CodeMirror.simpleMode = function(config, states) { s.persistentStates = { mode: pers.mode, spec: pers.spec, - state: pers.state === state.localState - ? s.localState - : CodeMirror.copyState(pers.mode, pers.state), + state: + pers.state === state.localState + ? s.localState + : CodeMirror.copyState(pers.mode, pers.state), next: s.persistentStates, } } @@ -144,7 +147,8 @@ function tokenFunction(states, config) { tok = state.local.mode.token(stream, state.localState) if ( - state.local.endScan && (m = state.local.endScan.exec(stream.current())) + state.local.endScan && + (m = state.local.endScan.exec(stream.current())) ) { stream.pos = stream.start + m.index } @@ -278,7 +282,8 @@ function indentFunction(states, meta) { return CodeMirror.Pass } - let pos = state.indent.length - 1, rules = states[state.state] + let pos = state.indent.length - 1, + rules = states[state.state] scan: for (;;) { for (let i = 0; i < rules.length; i++) { const rule = rules[i] diff --git a/ui/src/kapacitor/components/Tickscript.js b/ui/src/kapacitor/components/Tickscript.js index b8f59bbda..0ffb08282 100644 --- a/ui/src/kapacitor/components/Tickscript.js +++ b/ui/src/kapacitor/components/Tickscript.js @@ -15,7 +15,7 @@ const Tickscript = ({ onStartEditID, onStopEditID, isNewTickscript, -}) => ( +}) =>
-) const {arrayOf, bool, func, shape, string} = PropTypes diff --git a/ui/src/kapacitor/components/TickscriptHeader.js b/ui/src/kapacitor/components/TickscriptHeader.js index ff22c53ce..6b19f9e0d 100644 --- a/ui/src/kapacitor/components/TickscriptHeader.js +++ b/ui/src/kapacitor/components/TickscriptHeader.js @@ -17,7 +17,7 @@ const TickscriptHeader = ({ onChangeType, onSelectDbrps, isNewTickscript, -}) => ( +}) =>
@@ -43,7 +43,6 @@ const TickscriptHeader = ({
-) const {arrayOf, bool, func, shape, string} = PropTypes diff --git a/ui/src/kapacitor/components/TickscriptID.js b/ui/src/kapacitor/components/TickscriptID.js index 1e21dc6f7..a7c8beb86 100644 --- a/ui/src/kapacitor/components/TickscriptID.js +++ b/ui/src/kapacitor/components/TickscriptID.js @@ -53,11 +53,10 @@ class TickscriptNewID extends Component { } } -export const TickscriptEditID = ({id}) => ( +export const TickscriptEditID = ({id}) =>

{id}

-) const {bool, func, string} = PropTypes diff --git a/ui/src/kapacitor/components/TickscriptType.js b/ui/src/kapacitor/components/TickscriptType.js index e1365fcf7..e28a454bc 100644 --- a/ui/src/kapacitor/components/TickscriptType.js +++ b/ui/src/kapacitor/components/TickscriptType.js @@ -2,7 +2,7 @@ import React, {PropTypes} from 'react' const STREAM = 'stream' const BATCH = 'batch' -const TickscriptType = ({type, onChangeType}) => ( +const TickscriptType = ({type, onChangeType}) => -) const {string, func} = PropTypes