From deb0b10bf05b776a4efb12f3522690426bf9eb08 Mon Sep 17 00:00:00 2001 From: john gravois Date: Fri, 11 Jan 2019 17:13:54 -0800 Subject: [PATCH] linting, no bower_components in tarball --- .npmignore | 2 ++ README.md | 7 ++----- src/cedar.js | 4 ++-- src/utils/request.js | 42 +++++++++++++++++++++--------------------- src/utils/utils.js | 12 ++++++------ 5 files changed, 33 insertions(+), 34 deletions(-) diff --git a/.npmignore b/.npmignore index 87e46531..2563905e 100644 --- a/.npmignore +++ b/.npmignore @@ -34,3 +34,5 @@ examples js *.zip + +bower_components/ \ No newline at end of file diff --git a/README.md b/README.md index 3c8acd86..fda2b6c6 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Build Status](https://travis-ci.org/Esri/cedar.svg?branch=v0.x)](https://travis-ci.org/Esri/cedar) -> **NOTE:** You're looking at the documentation for v0.x, but v1.x is in beta. For more info, see [the v1.x (beta) documentation](https://github.com/Esri/cedar) +> **NOTE:** You're looking at the documentation for v0.x, but v1.x is in beta. For more info, see [the v1.x documentation](https://github.com/Esri/cedar) Cedar is a library for crafting, sharing and data visualizations powered by ArcGIS Services. Built with D3 and the Vega graphics grammar, Cedar extends them with bindings for making templated chart graphics that can be re-used with different datasets. @@ -172,7 +172,7 @@ For more information on SemVer, please visit . ### Licensing -Copyright 2015 Esri +Copyright © 2015 Esri Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -187,6 +187,3 @@ See the License for the specific language governing permissions and limitations under the License. A copy of the license is available in the repository's [LICENSE](./LICENSE) file. - -[](Esri Tags: Visualization) -[](Esri Language: JavaScript) diff --git a/src/cedar.js b/src/cedar.js index 457b16a0..1f29d646 100644 --- a/src/cedar.js +++ b/src/cedar.js @@ -706,7 +706,7 @@ export default class Cedar { }); } - /** + /** * EVENT LOGIC HERE * * @@ -857,7 +857,7 @@ export default class Cedar { return items; } - /** + /** * Removes highlighted chart items * * If "options" are used, only clear specific items, otherwise clears all highlights. diff --git a/src/utils/request.js b/src/utils/request.js index c79bfa0d..0431a54c 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -101,27 +101,27 @@ export function createFeatureServiceRequest (dataset, queryFromSpec) { }]); } - // iterate the mappings keys to check for sort - // ----------------------------------------------------------------- - // This approach would seem 'clean' but if there are multiple fields - // to sort by, the order would be determined by how javascript decides to - // iterate the mappings property hash. - // Thus, using mappings.sort gives the developer explicit control - // ----------------------------------------------------------------- - // var sort = []; - // for (var property in dataset.mappings) { - // if (dataset.mappings.hasOwnProperty(property)) { - // if(dataset.mappings[property].sort){ - // //ok - build up the sort - // sort.push(dataset.mappings[property].field + ' ' + dataset.mappings[property].sort); - // } - // } - // } - // if(sort.length > 0){ - // mergedQuery.orderByFields = sort.join(','); - // } - // ----------------------------------------------------------------- - // check for a sort passed directly in + // iterate the mappings keys to check for sort + // ----------------------------------------------------------------- + // This approach would seem 'clean' but if there are multiple fields + // to sort by, the order would be determined by how javascript decides to + // iterate the mappings property hash. + // Thus, using mappings.sort gives the developer explicit control + // ----------------------------------------------------------------- + // var sort = []; + // for (var property in dataset.mappings) { + // if (dataset.mappings.hasOwnProperty(property)) { + // if(dataset.mappings[property].sort){ + // //ok - build up the sort + // sort.push(dataset.mappings[property].field + ' ' + dataset.mappings[property].sort); + // } + // } + // } + // if(sort.length > 0){ + // mergedQuery.orderByFields = sort.join(','); + // } + // ----------------------------------------------------------------- + // check for a sort passed directly in if (dataset.mappings.sort) { mergedQuery.orderByFields = dataset.mappings.sort; diff --git a/src/utils/utils.js b/src/utils/utils.js index 6c32b64c..85375470 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -78,7 +78,7 @@ export function getTokenValue (tokens, tokenName) { return tmpTokens; } - /** +/** * Helper function that validates that the * mappings hash contains values for all * the inputs @@ -95,7 +95,7 @@ export function validateMappings (inputs, mappings) { }); } - /** +/** * Validate that the incoming data has the fields expected * in the mappings * @access private @@ -117,7 +117,7 @@ export function validateData (data, mappings) { return missingInputs; } - /** +/** * TODO does nothing, must figure out. * Centralize and abstract the computation of * expected field names, based on the mapping name @@ -127,9 +127,9 @@ export function getMappingFieldName (mappingName, fieldName) { // this function why? let name = fieldName; - // if(mappingName.toLowerCase() === 'count'){ - // name = fieldName + '_SUM'; - // } + // if(mappingName.toLowerCase() === 'count'){ + // name = fieldName + '_SUM'; + // } return name; }