From 19655c2cc345d88b94004c702f0c380149228fe1 Mon Sep 17 00:00:00 2001 From: Jamie Snape Date: Wed, 7 Oct 2015 15:03:43 -0400 Subject: [PATCH] Add ESLint configuration --- .eslintignore | 12 ++++++++++++ .eslintrc | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 .eslintignore create mode 100644 .eslintrc diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..89ce87161 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,12 @@ +# Midas Server. Copyright Kitware SAS. Licensed under the Apache License 2.0. + +**/*.min.js +**/jqplot*.js +**/jquery*.js +bower_components/ +library/SwaggerUI/ +modules/{pvw,visualize}/public/js/jquery/colorpicker.js +modules/statistics/public/js/googlemaps/*.js +modules/visualize/public/js/{paraview,webgl}/*.js +node_modules/ +vendor/ diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 000000000..658e0a9c8 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,43 @@ +#============================================================================= +# Midas Server +# Copyright Kitware SAS, 26 rue Louis Guérin, 69100 Villeurbanne, France. +# All rights reserved. +# For more information visit http://www.kitware.com/. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0.txt +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#============================================================================= + +--- +rules: + indent: + - 2 + - 4 + quotes: + - 2 + - single + linebreak-style: + - 2 + - unix + semi: + - 2 + - always + + no-unused-vars: + - 2 + - argsIgnorePattern: ^_ + +env: + browser: true + jquery: true + +extends: 'eslint:recommended'