Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 197c860

Browse files
committed
[WIP] code review
1 parent a35c7b1 commit 197c860

File tree

11 files changed

+11
-42
lines changed

11 files changed

+11
-42
lines changed

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
bower_components/**
22
build/**
33
docs/bower_components/**
4-
docs/app/assets/**
4+
docs/app/assets/js/angular-bootstrap/**
55
docs/config/templates/**
66
node_modules/**
77
lib/htmlparser/**

docs/app/assets/js/search-worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ importScripts('../components/lunr.js-0.5.12/lunr.min.js');
88

99
// Create the lunr index - the docs should be an array of object, each object containing
1010
// the path and search terms for a page
11-
var index = lunr(function() {
11+
var index = lunr(/* @this */function() {
1212
this.ref('path');
1313
this.field('titleWords', {boost: 50});
1414
this.field('members', {boost: 40});

docs/app/src/examples.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
angular.module('examples', [])
44

5-
.directive('runnableExample', ['$templateCache', '$document', function($templateCache, $document) {
5+
.directive('runnableExample', [function() {
66
var exampleClassNameSelector = '.runnable-example-file';
77
var tpl =
88
'<nav class="runnable-example-tabs" ng-if="tabs">' +

docs/app/src/search.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,7 @@ angular.module('search', [])
3232
}
3333
});
3434

35-
var totalAreas = 0;
36-
// eslint-disable-next-line no-unused-vars
37-
for (var i in results) {
38-
++totalAreas;
39-
}
35+
var totalAreas = Object.keys(results).length;
4036
if (totalAreas > 0) {
4137
$scope.colClassName = 'cols-' + totalAreas;
4238
}

docs/content/guide/component.ngdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ Here is a tab pane example built from components:
388388
angular.module('docsTabsExample', [])
389389
.component('myTabs', {
390390
transclude: true,
391-
controller: function Controller() {
391+
controller: function MyTabsController() {
392392
var panes = this.panes = [];
393393
this.select = function(pane) {
394394
angular.forEach(panes, function(pane) {

docs/content/guide/decorators.ngdoc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,8 @@ those conditions.
354354
var exps = matchExpressions(originalExp);
355355

356356
// create and store the getters using $parse
357-
var getters = exps.map(function(el) {
358-
if (el) return $parse(el);
359-
return undefined;
357+
var getters = exps.map(function(exp) {
358+
return exp && $parse(exp);
360359
});
361360

362361
return function newLinkFn(scope, elem, attr) {

docs/content/guide/directive.ngdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ to which tab is active.
856856
restrict: 'E',
857857
transclude: true,
858858
scope: {},
859-
controller: ['$scope', function Controller($scope) {
859+
controller: ['$scope', function MyTabsController($scope) {
860860
var panes = $scope.panes = [];
861861

862862
$scope.select = function(pane) {

docs/gulpfile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"use strict";
1+
'use strict';
22

33
var gulp = require('gulp');
44
var log = require('gulp-util').log;
@@ -124,7 +124,7 @@ gulp.task('eslint', ['doc-gen'], function() {
124124
var examplesConfig = getMergedEslintConfig('../docs/app/test/.eslintrc.json');
125125

126126
var protractorConfig = getMergedEslintConfig('../docs/app/e2e/.eslintrc.json');
127-
protractorConfig.rules['no-unused-vars'] = ["error", {
127+
protractorConfig.rules['no-unused-vars'] = ['error', {
128128
vars: 'local',
129129
args: 'none',
130130
// This variable is declared in code generated by dgeni-packages

i18n/spec/utilSpec.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

i18n/src/closureI18nExtractor.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,8 @@ function extractDateTimeSymbols(content, localeInfo) {
6565
for (var propName in goog.i18n) {
6666
var localeID = findLocaleId(propName, 'datetime');
6767
if (localeID) {
68-
// eslint-disable-next-line no-unused-vars
6968
var info = getInfoForLocale(localeInfo, localeID);
70-
localeInfo[localeID].DATETIME_FORMATS =
69+
info.DATETIME_FORMATS =
7170
converter.convertDatetimeData(goog.i18n[propName]);
7271
}
7372
}

i18n/src/util.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)