Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Added eslint install, config and grunt commands

ZachTRice513cdc426e11
diff --git a/.eslintrc b/.eslintrc
new file mode 100644
index 000000000..1249da891
--- /dev/null
+++ b/.eslintrc
@@ -0,0 +1,10 @@
+
+{
+ "env": {
+ "browser": true,
+ "node": true
+ },
+ "parser": "esprima",
+ "rules": {
+ }
+}
diff --git a/Gruntfile.js b/Gruntfile.js
index f95deaba7..bc6b0202c 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -143,11 +143,11 @@ module.exports = function(grunt) {
src: js["wv.js"],
dest: "build/worldview-debug/web/js/wv.js"
},
- // Combine all the Openlayers JavaScript files into one file.
- oljs: {
- src: js["ol.js"],
- dest: "build/worldview-debug/web/js/ol.js"
- },
+ // Combine all the Openlayers JavaScript files into one file.
+ oljs: {
+ src: js["ol.js"],
+ dest: "build/worldview-debug/web/js/ol.js"
+ },
// Combine all the Worldview CSS files into one file.
css: {
src: css,
@@ -203,7 +203,7 @@ module.exports = function(grunt) {
"web/**",
"*",
"web/**/.htaccess",
- "!node_modules/**",
+ "!node_modules/**",
"!web/brand/**",
"!web/config/**",
"!web/var/**"
@@ -602,6 +602,17 @@ module.exports = function(grunt) {
tasks: ['update'],
},
},
+ eslint: {
+ options: {
+ configFile: ".eslintrc",
+ format: "checkstyle",
+ silent: true
+ },
+ src: [
+ "web/js/**/wv.*.js",
+ "test/**/*.js",
+ ]
+ },
jshint: {
console: [
"web/js/**/wv.*.js",
@@ -657,6 +668,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks("grunt-contrib-copy");
grunt.loadNpmTasks("grunt-contrib-csslint");
grunt.loadNpmTasks("grunt-contrib-cssmin");
+ grunt.loadNpmTasks("gruntify-eslint");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks('grunt-contrib-watch');
@@ -763,7 +775,8 @@ module.exports = function(grunt) {
grunt.registerTask("check", ["lint", "test"]);
grunt.registerTask("clean", ["remove:build"]);
grunt.registerTask("distclean", ["remove:build", "remove:dist"]);
- grunt.registerTask("lint", ["jshint:console"]);
+ grunt.registerTask("lint", ["eslint"]);
+ // grunt.registerTask("lint", ["jshint:console"]);
grunt.registerTask("test", ["buster:console"]);
grunt.registerTask("chrome-tests", ["nightwatch:chrome"]);
grunt.registerTask("firefox-tests", ["nightwatch:firefox"]);
diff --git a/package.json b/package.json
index 7ff61b153..79e862e29 100644
--- a/package.json
+++ b/package.json
@@ -1,58 +1,59 @@
{
- "version": "1.4.8",
- "release": "1",
- "repository": {
- "type": "git",
- "url": "https://github.com/nasa-gibs/worldview.git"
- },
- "engines": {
- "node": "6.8.1"
- },
- "scripts": {
- "test": "grunt test lint",
- "start": "node ./bin/www",
- "preinstall": "node version-check.js"
- },
- "devDependencies": {
- "babel-polyfill": "6.16.0",
- "bluebird": "3.4.6",
- "buster": "0.7.12",
- "chromedriver": "2.25.1",
- "express": "4.15.2",
- "font-awesome": "4.7.0",
- "geckodriver": "1.2.0",
- "grunt": "0.4.x",
- "grunt-buster": "0.4.x",
- "grunt-contrib-clean": "1.0.x",
- "grunt-contrib-coffee": "1.0.x",
- "grunt-contrib-compress": "0.5.x",
- "grunt-contrib-concat": "1.0.x",
- "grunt-contrib-copy": "1.0.x",
- "grunt-contrib-csslint": "0.2.x",
- "grunt-contrib-cssmin": "1.0.x",
- "grunt-contrib-jshint": "0.8.x",
- "grunt-contrib-uglify": "2.0.x",
- "grunt-contrib-watch": "^1.0.0",
- "grunt-exec": "0.4.x",
- "grunt-git-rev-parse": "0.1.x",
- "grunt-line-remover": "0.0.x",
- "grunt-markdown": "0.7.x",
- "grunt-minjson": "0.4.x",
- "grunt-mkdir": "0.1.x",
- "grunt-nightwatch": "^0.5.4",
- "grunt-rename": "0.1.x",
- "grunt-text-replace": "0.4.x",
- "jshint": "2.9.x",
- "lodash": "4.15.0",
- "moment": "2.13.x",
- "openlayers": "4.0.1",
- "gifshot": "https://github.com/nasa-gibs/gifshot/archive/4.2.0.tar.gz",
- "nightwatch": "^0.9.9",
- "phantomjs": "2.1.x",
- "promise-queue": "2.2.3",
- "react": "15.3.1",
- "react-dom": "15.3.1",
- "worldview-components": "1.2.0",
- "selenium-server-standalone-jar": "3.0.1"
- }
+ "version": "1.4.8",
+ "release": "1",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/nasa-gibs/worldview.git"
+ },
+ "engines": {
+ "node": "6.8.1"
+ },
+ "scripts": {
+ "test": "grunt test lint",
+ "start": "node ./bin/www",
+ "preinstall": "node version-check.js"
+ },
+ "devDependencies": {
+ "babel-polyfill": "6.16.0",
+ "bluebird": "3.4.6",
+ "buster": "0.7.12",
+ "chromedriver": "2.25.1",
+ "express": "4.15.2",
+ "font-awesome": "4.7.0",
+ "geckodriver": "1.2.0",
+ "gifshot": "https://github.com/nasa-gibs/gifshot/archive/4.2.0.tar.gz",
+ "grunt": "0.4.x",
+ "grunt-buster": "0.4.x",
+ "grunt-contrib-clean": "1.0.x",
+ "grunt-contrib-coffee": "1.0.x",
+ "grunt-contrib-compress": "0.5.x",
+ "grunt-contrib-concat": "1.0.x",
+ "grunt-contrib-copy": "1.0.x",
+ "grunt-contrib-csslint": "0.2.x",
+ "grunt-contrib-cssmin": "1.0.x",
+ "grunt-contrib-jshint": "0.8.x",
+ "grunt-contrib-uglify": "2.0.x",
+ "grunt-contrib-watch": "^1.0.0",
+ "grunt-exec": "0.4.x",
+ "grunt-git-rev-parse": "0.1.x",
+ "grunt-line-remover": "0.0.x",
+ "grunt-markdown": "0.7.x",
+ "grunt-minjson": "0.4.x",
+ "grunt-mkdir": "0.1.x",
+ "grunt-nightwatch": "^0.5.4",
+ "grunt-rename": "0.1.x",
+ "grunt-text-replace": "0.4.x",
+ "gruntify-eslint": "^4.0.0",
+ "jshint": "2.9.x",
+ "lodash": "4.15.0",
+ "moment": "2.13.x",
+ "nightwatch": "^0.9.9",
+ "openlayers": "4.0.1",
+ "phantomjs": "2.1.x",
+ "promise-queue": "2.2.3",
+ "react": "15.3.1",
+ "react-dom": "15.3.1",
+ "selenium-server-standalone-jar": "3.0.1",
+ "worldview-components": "1.2.0"
+ }
}