You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by mo...@apache.org on 2017/01/04 07:17:24 UTC

zeppelin git commit: [ZEPPELIN-1873] Use exclusively eslint for javascript code linting

Repository: zeppelin
Updated Branches:
  refs/heads/master 71d768a5b -> 70d4ad3b8


[ZEPPELIN-1873] Use exclusively eslint for javascript code linting

### What is this PR for?
[jscs](http://jscs.info) has merged with [eslint](http://eslint.org), therefore both should be unified as eslint and jscs should be removed

### What type of PR is it?
Improvement

### Todos
* [x] - Move jscs config to eslint
* [x] - Remove jscs
* [x] - Upgrade eslint

### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1873

### How should this be tested?
Build and dev modes should lint as expected

Author: felizbear <il...@nflabs.com>

Closes #1818 from felizbear/devops-eslint and squashes the following commits:

753bf4f [felizbear] update eslint version
e0e0ba2 [felizbear] remove jscs
3a35792 [felizbear] move jscs rules over to eslint


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/70d4ad3b
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/70d4ad3b
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/70d4ad3b

Branch: refs/heads/master
Commit: 70d4ad3b8c94885d7ed75fdc4fb9a898e278626b
Parents: 71d768a
Author: felizbear <il...@nflabs.com>
Authored: Thu Dec 29 18:35:18 2016 +0900
Committer: Lee moon soo <mo...@apache.org>
Committed: Tue Jan 3 23:17:19 2017 -0800

----------------------------------------------------------------------
 zeppelin-web/.eslintrc    |  6 ++++--
 zeppelin-web/.jscsrc      | 10 ----------
 zeppelin-web/Gruntfile.js | 23 +----------------------
 zeppelin-web/package.json |  4 ++--
 4 files changed, 7 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/70d4ad3b/zeppelin-web/.eslintrc
----------------------------------------------------------------------
diff --git a/zeppelin-web/.eslintrc b/zeppelin-web/.eslintrc
index 0049fad..ca8cd07 100644
--- a/zeppelin-web/.eslintrc
+++ b/zeppelin-web/.eslintrc
@@ -1,4 +1,5 @@
 {
+  "preset": "google",
   "env": {
     "browser": true,
     "jasmine": true,
@@ -9,7 +10,7 @@
     "ecmaFeatures": {
       "experimentalObjectRestSpread": true
     },
-	"sourceType": "module"
+    "sourceType": "module"
   },
   "globals": {
     "angular": false,
@@ -40,6 +41,7 @@
     "no-shadow": 0,
     "no-undef": 2,
     "no-unused-vars": [2, { "vars": "local", "args": "none" }],
-    "strict": [2, "global"]
+    "strict": [2, "global"],
+    "max-len": [2, {"code": 120, "ignoreComments": true, "ignoreRegExpLiterals": true}]
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/70d4ad3b/zeppelin-web/.jscsrc
----------------------------------------------------------------------
diff --git a/zeppelin-web/.jscsrc b/zeppelin-web/.jscsrc
deleted file mode 100644
index ab5a0f5..0000000
--- a/zeppelin-web/.jscsrc
+++ /dev/null
@@ -1,10 +0,0 @@
-{
-  "preset": "google",
-  "maximumLineLength": {
-    "value": 120,
-    "allExcept": [
-      "comments",
-      "regex"
-    ]
-  }
-}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/70d4ad3b/zeppelin-web/Gruntfile.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/Gruntfile.js b/zeppelin-web/Gruntfile.js
index c78b156..4266847 100644
--- a/zeppelin-web/Gruntfile.js
+++ b/zeppelin-web/Gruntfile.js
@@ -135,7 +135,7 @@ module.exports = function(grunt) {
           '<%= yeoman.app %>/app/**/*.js',
           '<%= yeoman.app %>/components/**/*.js'
         ],
-        tasks: ['newer:eslint:all', 'newer:jscs:all'],
+        tasks: ['newer:eslint:all'],
       },
       html: {
         files: [
@@ -147,7 +147,6 @@ module.exports = function(grunt) {
         files: ['test/spec/{,*/}*.js'],
         tasks: [
           'newer:eslint:test',
-          'newer:jscs:test',
           'karma'
         ]
       },
@@ -175,25 +174,6 @@ module.exports = function(grunt) {
       }
     },
 
-    jscs: {
-      options: {
-        config: '.jscsrc',
-        esnext: true, // If you use ES6 http://jscs.info/overview.html#esnext
-        verbose: true, // If you need output with rule names http://jscs.info/overview.html#verbose
-        requireCurlyBraces: ['if']
-      },
-      all: {
-        src: [
-          'Gruntfile.js',
-          '<%= yeoman.app %>/app/**/*.js',
-          '<%= yeoman.app %>/components/**/*.js'
-        ]
-      },
-      test: {
-        src: ['test/spec/{,*/}*.js']
-      }
-    },
-
     eslint: {
       all: {
         src: [
@@ -455,7 +435,6 @@ module.exports = function(grunt) {
   ]);
 
   grunt.registerTask('pre-webpack-dist', [
-    'jscs',
     'eslint',
     'htmlhint',
     'wiredep',

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/70d4ad3b/zeppelin-web/package.json
----------------------------------------------------------------------
diff --git a/zeppelin-web/package.json b/zeppelin-web/package.json
index 4806381..555165f 100644
--- a/zeppelin-web/package.json
+++ b/zeppelin-web/package.json
@@ -31,6 +31,7 @@
     "bower": "^1.8.0",
     "copy-webpack-plugin": "^4.0.1",
     "css-loader": "^0.26.1",
+    "eslint-config-google": "^0.7.1",
     "express": "^4.14.0",
     "extract-text-webpack-plugin": "^1.0.1",
     "file-loader": "^0.9.0",
@@ -44,11 +45,10 @@
     "grunt-contrib-htmlmin": "^0.3.0",
     "grunt-contrib-uglify": "^0.4.0",
     "grunt-contrib-watch": "^0.6.1",
-    "grunt-eslint": "^18.1.0",
+    "grunt-eslint": "^19.0.0",
     "grunt-filerev": "^0.2.1",
     "grunt-google-fonts": "^0.4.0",
     "grunt-htmlhint": "^0.9.13",
-    "grunt-jscs": "^2.1.0",
     "grunt-newer": "^0.7.0",
     "grunt-ng-annotate": "^0.10.0",
     "grunt-postcss": "^0.7.1",