diff --git a/.eslintrc b/.eslintrc index da305eed5ed8cd994ea7a8719eb04afd940da0e8..051cb2bd92077a5e2c333cb4b52830e38349932c 100644 --- a/.eslintrc +++ b/.eslintrc @@ -17,25 +17,59 @@ "modules": true, }, "rules": { + // Require parens in arrow function arguments. + "arrow-parens": [2, "always"], // Require dangling comma at the end of any multiline list/object. This is to be consistent // with backend code. "comma-dangle": [2, "always-multiline"], + // Enforce newline consistency in member expressions. Dots are places on the same line as + // the property. + "dot-location": [2, "property"], + // Enforce newline at the end of file, with no multiple empty lines. + "eol-last": 2, // Force using === and !=== except when comparing to null. This is to prevent from bugs that // come from automatic type conversion in == operator and to be consistent across the codebase. "eqeqeq": [2, "allow-null"], + // Require a capital letter for constructors. + "new-cap": 2, + // Disallow the omission of parentheses when invoking a constructor with no arguments. + "new-parens": 2, + // Disallow modifying constant variables. + "no-const-assign": 2, + // Disallow this keywords outside of classes or class-like objects. + "no-invalid-this": 2, + // Allow at most one newline between code blocks. + "no-multiple-empty-lines": [2, {"max": 1}], + // Disallow the use of ternary operators when a simpler alternative exists. + "no-unneeded-ternary": 2, + // Avoid code that looks like two expressions but is actually one. + "no-unexpected-multiline": 2, // Disallow trailing spaces. This is to unify code because editors may have different // settings. "no-trailing-spaces": 2, - // Disallow modifying constant variables. - "no-const-assign": 2, // Force using 'let' or 'const' instead of 'var'. This is to prevent from var hoisting bugs. "no-var": 2, + // Require one variable declaration statement. + "one-var": [2, "never"], + // Prefer using template literals instead of strings concatenation. + "prefer-template": 2, + // Require use of the second argument for parseInt(). + "radix": 2, // Require semicolons in every place they are valid. This is to prevent from automatic // semicolon insertion bugs. "semi": [2, "always"], // Disallow setting strict mode in files. All JS code in the project uses ES6 modules so is // implicitly strict. "strict": [2, "never"], + // Require valid JSDoc. + "valid-jsdoc": [2, { + "prefer": { + "returns": "return" + }, + "requireReturnDescription": false, + "requireReturn": false, + "requireParamDescription": false + }], // No spacing in object literals nor in imports/exports. "object-curly-spacing": [2, "never"], }, diff --git a/build/backend.js b/build/backend.js index 510bdf827af93a4f5df579538ad843b3f6985d2a..29e9551e0726dd2d3c61cc5a6f24ca903cf0c9be 100644 --- a/build/backend.js +++ b/build/backend.js @@ -22,7 +22,6 @@ import path from 'path'; import conf from './conf'; import goCommand from './gocommand'; - /** * Compiles backend application in development mode and places the binary in the serve * directory. @@ -40,7 +39,6 @@ gulp.task('backend', function(doneFn) { doneFn); }); - /** * Compiles backend application in production mode and places the binary in the dist * directory. diff --git a/build/build.js b/build/build.js index 60513d207d86cf571c57b1c19931d94875347ed9..f08a04a3b50c63c0281108ee16f05557e89e79b1 100644 --- a/build/build.js +++ b/build/build.js @@ -29,13 +29,11 @@ import path from 'path'; import conf from './conf'; - /** * Builds production package and places it in the dist directory. */ gulp.task('build', ['backend:prod', 'build-frontend']); - /** * Builds production version of the frontend application. * @@ -80,7 +78,6 @@ gulp.task('build-frontend', ['assets', 'index:prod'], function() { .pipe(gulp.dest(conf.paths.distPublic)); }); - /** * Copies assets to the dist directory. */ @@ -89,7 +86,6 @@ gulp.task('assets', function() { .pipe(gulp.dest(conf.paths.distPublic)); }); - /** * Cleans all build artifacts. */ diff --git a/build/check.js b/build/check.js index 81d195db33b0f436362c61c761055c2f6fa3b5a7..99c59232d13e1409f6a67aa4db34780100409a6d 100644 --- a/build/check.js +++ b/build/check.js @@ -22,7 +22,6 @@ import path from 'path'; import conf from './conf'; - /** * Checks whether codebase is in a state that is ready for submission. This means that code * follows the style guide, it is buildable and all tests pass. @@ -31,14 +30,12 @@ import conf from './conf'; **/ gulp.task('check', ['lint', 'build', 'test', 'integration-test:prod']); - /** * Lints all projects code files. * // TODO(bryk): Also lint Go files here. */ gulp.task('lint', ['lint-javascript', 'check-javascript-format']); - /** * Lints all projects JavaScript files using ESLint. This includes frontend source code, as well as, * build scripts. @@ -53,7 +50,6 @@ gulp.task('lint-javascript', function() { .pipe(gulpEslint.failOnError()); }); - /** * Checks whether project's JavaScript files are formatted according to clang-format style. */ @@ -62,7 +58,6 @@ gulp.task('check-javascript-format', function() { .pipe(gulpClangFormat.checkFormat('file', undefined, {verbose: true, fail: true})); }); - /** * Formats all project's JavaScript files using clang-format. */ diff --git a/build/cluster.js b/build/cluster.js index b986f00927b9c66604f0921df087d5c4618d3c40..f9b0570d206579ce547d7e6ff9481ecbc6de35d4 100644 --- a/build/cluster.js +++ b/build/cluster.js @@ -30,12 +30,11 @@ import source from 'vinyl-source-stream'; import conf from './conf'; - -const kubernetesArchive = 'kubernetes.tar.gz', - kubernetesUrl = 'https://github.com/kubernetes/kubernetes.git', stableVersion = 'v1.1.1', - tarballUrl = 'https://storage.googleapis.com/kubernetes-release/release', - upScript = `${conf.paths.kubernetes}/hack/local-up-cluster.sh`; - +const kubernetesArchive = 'kubernetes.tar.gz'; +const kubernetesUrl = 'https://github.com/kubernetes/kubernetes.git'; +const stableVersion = 'v1.1.1'; +const tarballUrl = 'https://storage.googleapis.com/kubernetes-release/release'; +const upScript = `${conf.paths.kubernetes}/hack/local-up-cluster.sh`; /** * Currently running cluster process object. Null if the cluster is not running. @@ -43,8 +42,6 @@ const kubernetesArchive = 'kubernetes.tar.gz', * @type {?child.ChildProcess} */ let clusterProcess = null; -let exec = childProcess.exec; - /** * A Number, representing the ID value of the timer that is set for function which periodically @@ -54,14 +51,13 @@ let exec = childProcess.exec; */ let isRunningSetIntervalHandler = null; - /** * Checks if cluster health check return correct status. * When custer is up and running then return 'ok'. * @param {function(?Error=)} doneFn */ function clusterHealthCheck(doneFn) { - exec(`curl http://127.0.0.1:8080/healthz/ping`, function(err, stdout) { + childProcess.exec(`curl http://127.0.0.1:8080/healthz/ping`, function(err, stdout) { if (err) { return doneFn(new Error(err)); } @@ -69,20 +65,18 @@ function clusterHealthCheck(doneFn) { }); } - /** * Executes controls command using kubectl. * @param {string} command * @param {function(?Error=)} doneFn */ function executeKubectlCommand(command, doneFn) { - exec(`${conf.paths.kubernetes}/cluster/kubectl.sh ${command}`, function(err) { + childProcess.exec(`${conf.paths.kubernetes}/cluster/kubectl.sh ${command}`, function(err) { if (err) return doneFn(new Error(err)); doneFn(); }); } - /** * Creates cluster from scratch. * Downloads latest version of kubernetes from git repository. @@ -96,7 +90,6 @@ function executeKubectlCommand(command, doneFn) { */ gulp.task('local-up-cluster', ['spawn-cluster']); - /** * Tears down a Kubernetes cluster. */ @@ -112,7 +105,6 @@ gulp.task('kill-cluster', function(doneFn) { } }); - /** * Clones kubernetes from git repository. Task skip if kubernetes directory exist. */ @@ -129,7 +121,6 @@ gulp.task('clone-kubernetes', function(doneFn) { }); }); - /** * Checkouts kubernetes to latest stable version. */ @@ -140,7 +131,6 @@ gulp.task('checkout-kubernetes-version', ['clone-kubernetes'], function(doneFn) }); }); - /** * Checks if kubectl is already downloaded. * If not downloads kubectl for all platforms from tarball. @@ -163,13 +153,11 @@ gulp.task('download-kubectl', function(doneFn) { }); }); - /** * Removes kubernetes before git clone command. */ gulp.task('clear-kubernetes', function() { return del(conf.paths.kubernetes); }); - /** * Spawns local-up-cluster.sh script. */ @@ -188,7 +176,6 @@ gulp.task( clusterProcess.on('exit', function() { clusterProcess = null; }); }); - /** * Checks periodically if cluster is up and running. */ @@ -209,7 +196,6 @@ gulp.task('wait-for-cluster', function(doneFn) { } }); - /** * Sets a cluster entry in kubeconfig. * Configures kubernetes server for localhost. @@ -223,7 +209,6 @@ gulp.task( doneFn); }); - /** * Sets a context entry in kubeconfig as local. */ @@ -233,7 +218,6 @@ gulp.task( executeKubectlCommand('config set-context local --cluster=local', doneFn); }); - /** * Sets the current-context in a kubeconfig file */ diff --git a/build/conf.js b/build/conf.js index 1f9dc5f008e04ae0b78a8bd0d35e3967124f48d1..7d5c6d385f190d292d90ba79be2448b6bc37fc2c 100644 --- a/build/conf.js +++ b/build/conf.js @@ -17,13 +17,11 @@ */ import path from 'path'; - /** * Base path for all other paths. */ const basePath = path.join(__dirname, '../'); - /** * Exported configuration object with common constants used in build pipeline. */ diff --git a/build/deploy.js b/build/deploy.js index 7aeede168907719a1d93347dd294fef0acf8c516..02bac6e3961b948af69b4097a9303f6d76721f75 100644 --- a/build/deploy.js +++ b/build/deploy.js @@ -21,7 +21,6 @@ import path from 'path'; import conf from './conf'; - /** * @param {!Array} args * @param {function(?Error=)} doneFn @@ -35,12 +34,11 @@ function spawnDockerProcess(args, doneFn) { if (code === 0) { doneFn(); } else { - doneFn(new Error('Docker command error, code:' + code)); + doneFn(new Error(`Docker command error, code: ${code}`)); } }); } - /** * Creates Docker image for the application. The image is tagged with the image name configuration * constant. @@ -60,7 +58,6 @@ gulp.task('docker-image', ['build', 'docker-file'], function(doneFn) { doneFn); }); - /** * Processes the Docker file and places it in the dist folder for building. */ diff --git a/build/gocommand.js b/build/gocommand.js index 4bba8941c0d417aa3c7f13974159a726ce4d088f..d929e28f713725bad90e6320f09a371875ea915d 100644 --- a/build/gocommand.js +++ b/build/gocommand.js @@ -20,7 +20,6 @@ import lodash from 'lodash'; import conf from './conf'; - /** * Spawns Go process wrapped with the Godep command. * @@ -43,7 +42,7 @@ export default function spawnGoProcess(args, doneFn) { if (code === 0) { doneFn(); } else { - doneFn(new Error('Go command error, code:' + code)); + doneFn(new Error(`Go command error, code: ${code}`)); } }); } diff --git a/build/index.js b/build/index.js index c34ed311c1b006f17af623283ae5a099b2b127f5..ce8c7856072de0043f731c64f537cba11a2bd2ca 100644 --- a/build/index.js +++ b/build/index.js @@ -23,11 +23,11 @@ import wiredep from 'wiredep'; import conf from './conf'; - /** * Creates index file in the given directory with dependencies injected from that directory. * * @param {string} indexPath + * @return {!stream.Stream} */ function createIndexFile(indexPath) { let injectStyles = gulp.src(path.join(indexPath, '**/*.css'), {read: false}); @@ -54,13 +54,11 @@ function createIndexFile(indexPath) { .pipe(browserSync.stream()); } - /** * Creates frontend application index file with development dependencies injected. */ gulp.task('index', ['scripts', 'styles'], function() { return createIndexFile(conf.paths.serve); }); - /** * Creates frontend application index file with production dependencies injected. */ diff --git a/build/karma.conf.js b/build/karma.conf.js index b0deebcf53c3205dd0635d52d86da83580255c63..1033c65836b2460d87f060e80c546044709e78a7 100644 --- a/build/karma.conf.js +++ b/build/karma.conf.js @@ -23,7 +23,6 @@ import wiredep from 'wiredep'; import conf from './conf'; - /** * Returns an array of files required by Karma to run the tests. * @@ -43,7 +42,6 @@ function getFileList() { ]); } - /** * Exported default function which sets Karma configuration. Required by the framework. * @@ -96,7 +94,7 @@ export default function(config) { // karma-ng-html2js-preprocessor plugin config. ngHtml2JsPreprocessor: { - stripPrefix: conf.paths.frontendSrc + '/', + stripPrefix: `${conf.paths.frontendSrc}/`, moduleName: conf.frontend.moduleName, }, }; diff --git a/build/protractor.conf.js b/build/protractor.conf.js index e960b5b065ddf5f6420b748e71201bd3b5fc33b6..6eddfb89cc0d7f526f347bd4e855f02f7047adbf 100644 --- a/build/protractor.conf.js +++ b/build/protractor.conf.js @@ -17,12 +17,12 @@ * * TODO(bryk): Start using ES6 in this file when supported. */ -/* eslint no-var: 0 */ // no-var check disabled because this file is not written in ES6. +/* eslint no-var: 0 */ // disabled because this file is not written in ES6. +/* eslint prefer-template: 0 */ // disabled because this file is not written in ES6. require('babel-core/register'); var conf = require('./conf'); var path = require('path'); - /** * Exported protractor config required by the framework. * diff --git a/build/script.js b/build/script.js index ac3c1ffd2af7a4db8a23d25e99f66f68919c6b12..d833cee26c9340bb1209278fefd35cdca5d089e2 100644 --- a/build/script.js +++ b/build/script.js @@ -24,7 +24,6 @@ import webpackStream from 'webpack-stream'; import conf from './conf'; - /** * Compiles frontend JavaScript files into development bundle located in {conf.paths.serve} * directory. This has to be done because currently browsers do not handle ES6 syntax and @@ -53,7 +52,6 @@ gulp.task('scripts', function() { .pipe(gulp.dest(conf.paths.serve)); }); - /** * Compiles frontend JavaScript files into production bundle located in {conf.paths.prodTmp} * directory. @@ -115,7 +113,6 @@ gulp.task('scripts:prod', ['angular-templates'], function() { .pipe(gulp.dest(conf.paths.prodTmp)); }); - /** * Compiles Angular HTML template files into one JS file that serves them through $templateCache. */ diff --git a/build/serve.js b/build/serve.js index 9449204c6a83cf27da433f1646cf17769aa4dea6..4395ab3a69013593dffd6e30b40b1c338e8e8ccd 100644 --- a/build/serve.js +++ b/build/serve.js @@ -25,13 +25,11 @@ import proxyMiddleware from 'proxy-middleware'; import conf from './conf'; - /** * Browser sync instance that serves the application. */ export const browserSyncInstance = browserSync.create(); - /** * Currently running backend process object. Null if the backend is not running. * @@ -39,7 +37,6 @@ export const browserSyncInstance = browserSync.create(); */ let runningBackendProcess = null; - /** * Initializes BrowserSync tool. Files are served from baseDir directory list and all API calls * are proxied to a running backend instance. When includeBowerComponents is true, requests for @@ -80,7 +77,6 @@ function browserSyncInit(baseDir, includeBowerComponents) { browserSyncInstance.init(config); } - /** * Serves the application in development mode. */ @@ -94,26 +90,22 @@ function serveDevelopmentMode() { true); } - /** * Serves the application in development mode. Watches for changes in the source files to rebuild * development artifacts. */ gulp.task('serve', ['spawn-backend', 'watch'], serveDevelopmentMode); - /** * Serves the application in development mode. */ gulp.task('serve:nowatch', ['spawn-backend', 'index'], serveDevelopmentMode); - /** * Serves the application in production mode. */ gulp.task('serve:prod', ['spawn-backend:prod']); - /** * Spawns new backend application process and finishes the task immediately. Previously spawned * backend process is killed beforehand, if any. The frontend pages are served by BrowserSync. @@ -130,7 +122,6 @@ gulp.task('spawn-backend', ['backend', 'kill-backend'], function() { }); }); - /** * Spawns new backend application process and finishes the task immediately. Previously spawned * backend process is killed beforehand, if any. In production the backend does serve the frontend @@ -150,7 +141,6 @@ gulp.task( }); }); - /** * Kills running backend process (if any). */ @@ -168,7 +158,6 @@ gulp.task('kill-backend', function(doneFn) { } }); - /** * Watches for changes in source files and runs Gulp tasks to rebuild them. */ diff --git a/build/style.js b/build/style.js index 4eca93636a315bdcf4735241390877165fd3b536..1ba48c1927dcfb154df4cb06e3f9666ed592d990 100644 --- a/build/style.js +++ b/build/style.js @@ -26,7 +26,6 @@ import gulpConcat from 'gulp-concat'; import {browserSyncInstance} from './serve'; import conf from './conf'; - /** * Compiles stylesheets and places them into the serve folder. Each stylesheet file is compiled * separately. @@ -45,7 +44,6 @@ gulp.task('styles', function() { .pipe(browserSyncInstance.stream()); }); - /** * Compiles stylesheets and places them into the prod tmp folder. Styles are compiled and minified * into a single file. diff --git a/build/test.js b/build/test.js index 0283e396058072ff4a531e6b10350e983e5ee621..ec60d4d47a4578dd2d77ea07ff88155c73ced10d 100644 --- a/build/test.js +++ b/build/test.js @@ -24,7 +24,6 @@ import {browserSyncInstance} from './serve'; import conf from './conf'; import goCommand from './gocommand'; - /** * @param {boolean} singleRun * @param {function(?Error=)} doneFn @@ -37,12 +36,11 @@ function runUnitTests(singleRun, doneFn) { }; let server = new karma.Server(localConfig, function(failCount) { - doneFn(failCount ? new Error("Failed " + failCount + " tests.") : undefined); + doneFn(failCount ? new Error(`Failed ${failCount} tests.`) : undefined); }); server.start(); } - /** * @param {function(?Error=)} doneFn */ @@ -55,7 +53,6 @@ function runBackendTests(doneFn) { doneFn); } - /** * @param {function(?Error=)} doneFn */ @@ -81,39 +78,33 @@ function runProtractorTests(doneFn) { }); } - /** * Runs once all unit tests of the application. */ gulp.task('test', ['frontend-test', 'backend-test']); - /** * Runs once all unit tests of the frontend application. */ gulp.task('frontend-test', function(doneFn) { runUnitTests(true, doneFn); }); - /** * Runs once all unit tests of the backend application. */ gulp.task('backend-test', runBackendTests); - /** * Runs all unit tests of the application. Watches for changes in the source files to rerun * the tests. */ gulp.task('test:watch', ['frontend-test:watch', 'backend-test:watch']); - /** * Runs frontend backend application tests. Watches for changes in the source files to rerun * the tests. */ gulp.task('frontend-test:watch', function(doneFn) { runUnitTests(false, doneFn); }); - /** * Runs backend application tests. Watches for changes in the source files to rerun * the tests. @@ -127,13 +118,11 @@ gulp.task('backend-test:watch', ['backend-test'], function() { ['backend-test']); }); - /** * Runs application integration tests. Uses development version of the application. */ gulp.task('integration-test', ['serve:nowatch', 'webdriver-update'], runProtractorTests); - /** * Runs application integration tests. Uses production version of the application. */ @@ -141,13 +130,11 @@ gulp.task( 'integration-test:prod', ['local-up-cluster', 'serve:prod', 'webdriver-update'], runProtractorTests); - /** * Downloads and updates webdriver. Required to keep it up to date. */ gulp.task('webdriver-update', gulpProtractor.webdriver_update); - /** * Kills backend server and cluster, if running. */ diff --git a/package.json b/package.json index e7646b1b34561ae20249fc7a1061ab9bb1851683..c684e0cecee513057b2f50921d5e6caaa70c43dc 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "gulp-clang-format": "~1.0.23", "gulp-closure-compiler": "~0.3.1", "gulp-concat": "~2.6.0", - "gulp-eslint": "~1.0.0", + "gulp-eslint": "~1.1.0", "gulp-filter": "~3.0.1", "gulp-flatten": "~0.2.0", "gulp-git": "~1.6.0", diff --git a/src/app/externs/.eslintrc b/src/app/externs/.eslintrc index 21a6ea4d07ad7a750929a9b27db6b319fd35b847..5a921646a3c7f1e11684ced365662956b72ed371 100644 --- a/src/app/externs/.eslintrc +++ b/src/app/externs/.eslintrc @@ -4,5 +4,7 @@ "no-undef": 0, // Disable unused variable checking. Extern functions always have unused variables. "no-unused-vars": 0, + // Disable JSDoc validation. Extern functions do not have valid JSDoc. + valid-jsdoc: 0, } } diff --git a/src/app/externs/angularresource.js b/src/app/externs/angularresource.js index 47b1ea27b3cd1663543e32a8bba602135ec77ca0..2a70bdf84fe7d0c6081cba173536d2c219e7cf2c 100644 --- a/src/app/externs/angularresource.js +++ b/src/app/externs/angularresource.js @@ -19,7 +19,6 @@ * @externs */ - /** * @typedef {{ * $promise: !angular.$q.Promise @@ -27,41 +26,35 @@ */ angular.ResourceClass; - /** * @typedef {function(string, !Object=):!angular.Resource} */ angular.$resource; - - /** * @constructor * @template T */ angular.Resource = function() {}; - /** * @param {!T} data * @param {function(!T)=} opt_callback * @param {function(!angular.$http.Response)=} opt_errback - * @returns {!angular.ResourceClass} + * @return {!angular.ResourceClass} */ angular.Resource.prototype.save = function(data, opt_callback, opt_errback) {}; - /** * @param {function(!T)=} opt_callback * @param {function(!angular.$http.Response)=} opt_errback - * @returns {!angular.ResourceClass} + * @return {!angular.ResourceClass} */ angular.Resource.prototype.get = function(opt_callback, opt_errback) {}; - /** * @param {function(!T)=} opt_callback * @param {function(!angular.$http.Response)=} opt_errback - * @returns {!angular.ResourceClass} + * @return {!angular.ResourceClass} */ angular.Resource.prototype.query = function(opt_callback, opt_errback) {}; diff --git a/src/app/externs/backendapi.js b/src/app/externs/backendapi.js index 808c7558f2466f609fc9dcfc52f74144f9cc4c4d..d602b9729c84978a0d3299b34a729b267059d216 100644 --- a/src/app/externs/backendapi.js +++ b/src/app/externs/backendapi.js @@ -22,10 +22,8 @@ * @externs */ - const backendApi = {}; - /** * @typedef {{ * port: (number|null), @@ -35,7 +33,6 @@ const backendApi = {}; */ backendApi.PortMapping; - /** * @typedef {{ * containerImage: string, @@ -48,7 +45,6 @@ backendApi.PortMapping; */ backendApi.AppDeployment; - /** * @typedef {{ * replicaSets: !Array @@ -56,7 +52,6 @@ backendApi.AppDeployment; */ backendApi.ReplicaSetList; - /** * @typedef {{ * name: string, @@ -73,7 +68,6 @@ backendApi.ReplicaSetList; */ backendApi.ReplicaSet; - /** * @typedef {{ * name: string, @@ -88,7 +82,6 @@ backendApi.ReplicaSet; */ backendApi.ReplicaSetDetail; - /** * @typedef {{ * name: string, @@ -99,7 +92,6 @@ backendApi.ReplicaSetDetail; */ backendApi.ReplicaSetPod; - /** * @typedef {{ * namespaces: !Array diff --git a/src/app/frontend/chrome/chrome_controller.js b/src/app/frontend/chrome/chrome_controller.js index 241cda53169d6cda5e57ff5131da497fe7c0b458..ab1d5d0a39b3d2f9d65769eafe86c3b0f01bf533 100644 --- a/src/app/frontend/chrome/chrome_controller.js +++ b/src/app/frontend/chrome/chrome_controller.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. - /** * Controller for the chrome directive. * diff --git a/src/app/frontend/chrome/chrome_directive.js b/src/app/frontend/chrome/chrome_directive.js index 2fff02bd95a11ec9671d440f67898467bef89e99..e85ac887f281918ad0497718812c48b6a7aba90f 100644 --- a/src/app/frontend/chrome/chrome_directive.js +++ b/src/app/frontend/chrome/chrome_directive.js @@ -14,7 +14,6 @@ import ChromeController from './chrome_controller'; - /** * Returns directive definition object for the chrome directive. * diff --git a/src/app/frontend/chrome/chrome_module.js b/src/app/frontend/chrome/chrome_module.js index 6ca9bd26bf89b28f8331f1ded122d8f8718846c7..a3e46ae4b4f8ea30ba5f119ceafd1acd7e843b41 100644 --- a/src/app/frontend/chrome/chrome_module.js +++ b/src/app/frontend/chrome/chrome_module.js @@ -14,7 +14,6 @@ import chromeDirective from './chrome_directive'; - /** * Angular module containing navigation chrome for the application. */ diff --git a/src/app/frontend/deploy/deploy_controller.js b/src/app/frontend/deploy/deploy_controller.js index 229b78f839e55bbaa83b4f3c3f9d03be3d75ae3d..6b33ac4c7ecf5fd35cf2f544194b7cd9d9d834a6 100644 --- a/src/app/frontend/deploy/deploy_controller.js +++ b/src/app/frontend/deploy/deploy_controller.js @@ -15,7 +15,6 @@ import {stateName as zerostate} from 'zerostate/zerostate_state'; import {stateName as replicasetliststate} from 'replicasetlist/replicasetlist_state'; - /** * Controller for the deploy view. * diff --git a/src/app/frontend/deploy/deploy_module.js b/src/app/frontend/deploy/deploy_module.js index 0fdf15198cab88e414abf26e4c33f82e56fde5b3..ebb70c7a6fb64d7bf0208e4fcefe6bd2259eb5d0 100644 --- a/src/app/frontend/deploy/deploy_module.js +++ b/src/app/frontend/deploy/deploy_module.js @@ -14,7 +14,6 @@ import stateConfig from './deploy_state'; - /** * Angular module for the deploy view. * diff --git a/src/app/frontend/deploy/deploy_state.js b/src/app/frontend/deploy/deploy_state.js index f53f9d5e6afdd6cd67a487a7b01d712ed7b787b7..ca5defc3c8cb899d4734f79a80a8fa2437f3ee51 100644 --- a/src/app/frontend/deploy/deploy_state.js +++ b/src/app/frontend/deploy/deploy_state.js @@ -14,11 +14,9 @@ import DeployController from './deploy_controller'; - /** Name of the state. Can be used in, e.g., $state.go method. */ export const stateName = 'deploy'; - /** * Configures states for the deploy view. * @@ -40,6 +38,7 @@ export default function stateConfig($stateProvider) { * Resolves namespaces for the deploy view. * * @param {!angular.$resource} $resource + * @return {!angular.$q.Promise} * @ngInject */ function resolveNamespaces($resource) { diff --git a/src/app/frontend/index_config.js b/src/app/frontend/index_config.js index feaaccc432df3d29c554637c36ed7f74ce93274a..c202886db7e07ef286440c701b63b7f3624efd25 100644 --- a/src/app/frontend/index_config.js +++ b/src/app/frontend/index_config.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. - /** * @param {!md.$mdThemingProvider} $mdThemingProvider * @ngInject diff --git a/src/app/frontend/index_module.js b/src/app/frontend/index_module.js index d85a2477a290211246cca74faa277afd7953b0dc..579f738803f451b3c42b09a158ff9aebb78aa565 100644 --- a/src/app/frontend/index_module.js +++ b/src/app/frontend/index_module.js @@ -24,7 +24,6 @@ import replicaSetDetailModule from './replicasetdetail/replicasetdetail_module'; import replicaSetListModule from './replicasetlist/replicasetlist_module'; import zerostateModule from './zerostate/zerostate_module'; - export default angular.module( 'kubernetesDashboard', [ diff --git a/src/app/frontend/index_route.js b/src/app/frontend/index_route.js index 9d67af33f3cf982c159ea48047770da5f1746c76..cde333c24ed5c61036d95d8e14a91ddd9ec76693 100644 --- a/src/app/frontend/index_route.js +++ b/src/app/frontend/index_route.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. - /** * Global route configuration for the application. * diff --git a/src/app/frontend/replicasetdetail/replicasetdetail_controller.js b/src/app/frontend/replicasetdetail/replicasetdetail_controller.js index 863f058a1aa633828c3bc6ae5c1add4f5a41e780..9d9036a97a16046c7746f556d82458f7a5195bee 100644 --- a/src/app/frontend/replicasetdetail/replicasetdetail_controller.js +++ b/src/app/frontend/replicasetdetail/replicasetdetail_controller.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. - /** * Controller for the replica set details view. * @@ -20,11 +19,12 @@ */ export default class ReplicaSetDetailController { /** + * @param {!backendApi.ReplicaSetDetail} replicaSetDetail * @ngInject */ constructor(replicaSetDetail) { /** - * @export {backendApi.ReplicaSetDetail} + * @export {!backendApi.ReplicaSetDetail} */ this.replicaSetDetail = replicaSetDetail; } diff --git a/src/app/frontend/replicasetdetail/replicasetdetail_module.js b/src/app/frontend/replicasetdetail/replicasetdetail_module.js index e77261f5ad2375aa4f9c5e1ca0f356641b80ff82..96e57dbc5a51575fbf9b6b5dafb48eb66292c608 100644 --- a/src/app/frontend/replicasetdetail/replicasetdetail_module.js +++ b/src/app/frontend/replicasetdetail/replicasetdetail_module.js @@ -14,7 +14,6 @@ import stateConfig from './replicasetdetail_state'; - /** * Angular module for the Replica Set details view. * diff --git a/src/app/frontend/replicasetdetail/replicasetdetail_state.js b/src/app/frontend/replicasetdetail/replicasetdetail_state.js index 592c5010f0be6944c58089232413f3ad2072b216..803fbf75c8d05080ac42ece74e2cf55a69492e4d 100644 --- a/src/app/frontend/replicasetdetail/replicasetdetail_state.js +++ b/src/app/frontend/replicasetdetail/replicasetdetail_state.js @@ -14,11 +14,9 @@ import ReplicaSetDetailController from './replicasetdetail_controller'; - /** Name of the state. Can be used in, e.g., $state.go method. */ export const stateName = 'replicasetdetail'; - /** * Parameters for this state. * @@ -39,7 +37,6 @@ export class StateParams { } } - /** * Configures states for the service view. * @@ -58,10 +55,10 @@ export default function stateConfig($stateProvider) { }); } - /** * @param {!StateParams} $stateParams * @param {!angular.$resource} $resource + * @return {!angular.$q.Promise} * @ngInject */ function resolveDetails($stateParams, $resource) { diff --git a/src/app/frontend/replicasetlist/replicasetlist_controller.js b/src/app/frontend/replicasetlist/replicasetlist_controller.js index ced338a8f93970245b414774d4bdbefb1930c8ad..66de17bf8d92e55bd170f5c97b20ce8360792aa8 100644 --- a/src/app/frontend/replicasetlist/replicasetlist_controller.js +++ b/src/app/frontend/replicasetlist/replicasetlist_controller.js @@ -15,7 +15,6 @@ import {StateParams} from 'replicasetdetail/replicasetdetail_state'; import {stateName} from 'replicasetdetail/replicasetdetail_state'; - /** * Controller for the replica set list view. * diff --git a/src/app/frontend/replicasetlist/replicasetlist_module.js b/src/app/frontend/replicasetlist/replicasetlist_module.js index dd0a53dc145fb0c747a5a7ba5c0e26b14a124f01..93e34be7ab253219a5d0d3505e0f34be96e48c7b 100644 --- a/src/app/frontend/replicasetlist/replicasetlist_module.js +++ b/src/app/frontend/replicasetlist/replicasetlist_module.js @@ -14,7 +14,6 @@ import stateConfig from './replicasetlist_state'; - /** * Angular module for the Replica Set list view. * diff --git a/src/app/frontend/replicasetlist/replicasetlist_state.js b/src/app/frontend/replicasetlist/replicasetlist_state.js index 79e3c588764b02ae87717dce9a0a708812f17c46..e9bb6b791d9aa473cdf3c7634bb8a646911bb11e 100644 --- a/src/app/frontend/replicasetlist/replicasetlist_state.js +++ b/src/app/frontend/replicasetlist/replicasetlist_state.js @@ -14,11 +14,9 @@ import ReplicaSetListController from './replicasetlist_controller'; - /** Name of the state. Can be used in, e.g., $state.go method. */ export const stateName = 'replicasets'; - /** * Configures states for the service view. * diff --git a/src/app/frontend/zerostate/zerostate_controller.js b/src/app/frontend/zerostate/zerostate_controller.js index 5814b18150fb72794ea8bd67d0dc1c41d4479f15..6b5630adb03341ccb222a62564dc684354a3afdc 100644 --- a/src/app/frontend/zerostate/zerostate_controller.js +++ b/src/app/frontend/zerostate/zerostate_controller.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. - /** * Controller for the zero state view. * diff --git a/src/app/frontend/zerostate/zerostate_module.js b/src/app/frontend/zerostate/zerostate_module.js index 2de7cc3840797942c1ce53f6b98526312c4b8218..abb88cf94290761174ecb57d42dc34cb5e829117 100644 --- a/src/app/frontend/zerostate/zerostate_module.js +++ b/src/app/frontend/zerostate/zerostate_module.js @@ -14,7 +14,6 @@ import stateConfig from './zerostate_state'; - /** * Angular module for the zero state view. * diff --git a/src/app/frontend/zerostate/zerostate_state.js b/src/app/frontend/zerostate/zerostate_state.js index cb979a62526f9a74807bc96a20cd2fd8949ee845..2f8f7da7b2d3083bb88c3ae2f5bca92b14161e67 100644 --- a/src/app/frontend/zerostate/zerostate_state.js +++ b/src/app/frontend/zerostate/zerostate_state.js @@ -14,11 +14,9 @@ import ZeroStateController from './zerostate_controller'; - /** Name of the state. Can be used in, e.g., $state.go method. */ export const stateName = 'zero'; - /** * Configures states for the zero state view. * diff --git a/src/test/frontend/zerostate/zerostate_controller_test.js b/src/test/frontend/zerostate/zerostate_controller_test.js index f5245c0b1931b943596eb7521c83f12ced624fa6..caccd083ff2c3f34cd6a332c3ec285e37daaa61a 100644 --- a/src/test/frontend/zerostate/zerostate_controller_test.js +++ b/src/test/frontend/zerostate/zerostate_controller_test.js @@ -14,7 +14,6 @@ import ZerostateController from 'zerostate/zerostate_controller'; - describe('Main controller', () => { let vm; diff --git a/src/test/integration/zerostate_po.js b/src/test/integration/zerostate_po.js index b1064f282c8fff9d9f1eed1ba1e0667e00a71e39..c5f6bb586bcdb5d4154d62ade89cd1496c8da544 100644 --- a/src/test/integration/zerostate_po.js +++ b/src/test/integration/zerostate_po.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. - export default class ZeroStatePageObject { constructor() { this.deployButton = element(by.css('.kd-zerostate-deploy-bt')); } } diff --git a/src/test/integration/zerostate_test.js b/src/test/integration/zerostate_test.js index ad67ac1d8ddb5b3489d7b59629af8d3902feab74..8832835e9fbe6e6bf57b16e7af76e1df95722a57 100644 --- a/src/test/integration/zerostate_test.js +++ b/src/test/integration/zerostate_test.js @@ -14,7 +14,6 @@ import PageObject from './zerostate_po'; - describe('Zero state view', function() { let page;