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

Commit e2303e5

Browse files
committed
[WIP] More changes
1 parent 9ba7ea8 commit e2303e5

File tree

132 files changed

+523
-308
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+523
-308
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ bower_components/**
22
build/**
33
docs/bower_components/**
44
docs/app/assets/**
5+
docs/config/templates/**
56
node_modules/**
67
lib/htmlparser/**
8+
src/angular.bind.js
79
src/ngParseExt/ucd.js
810
i18n/closure/**
911
tmp/**

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
// Best practices
4242
"accessor-pairs": "error",
4343
"array-callback-return": "error",
44-
"complexity": ["warn", 10],
44+
// "complexity": ["error", 10], // TODO enable?
4545
// "dot-notation": "error", // TODO enable?
4646
// "dot-location": ["error", "property"], // TODO enable?
4747
"eqeqeq": ["error", "allow-null"],

Gruntfile.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,18 @@ module.exports = function(grunt) {
119119
all: {
120120
src: [
121121
'*.js',
122+
'docs/**/*.js',
123+
'lib/**/*.js',
124+
'scripts/**/*.js',
122125
'src/**/*.js',
123126
'test/**/*.js',
124-
'i18n/**/*.js'
127+
'i18n/**/*.js',
128+
'!docs/app/assets/**',
129+
'!docs/bower_components/**',
130+
'!docs/config/templates/**',
131+
'!src/angular.bind.js',
132+
'!i18n/closure/**',
133+
'!src/ngParseExt/ucd.js'
125134
]
126135
}
127136
},

docs/app/src/.eslintrc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// ngMocks
1212
"module": false,
13-
"inject": true
13+
"inject": true,
14+
15+
"lunr": false
1416
}
1517
}

docs/app/src/docs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ angular.module('DocsController', [])
2929

3030
path = path.replace(/^\/?(.+?)(\/index)?\/?$/, '$1');
3131

32-
currentPage = $scope.currentPage = NG_PAGES[path];
32+
var currentPage = $scope.currentPage = NG_PAGES[path];
3333

3434
if (currentPage) {
3535
$scope.partialPath = 'partials/' + path + '.html';

docs/app/src/errors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
angular.module('errors', ['ngSanitize'])
44

55
.filter('errorLink', ['$sanitize', function($sanitize) {
6-
var LINKY_URL_REGEXP = /((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s\.\;\,\(\)\{\}<>]/g,
6+
var LINKY_URL_REGEXP = /((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s\.;,\(\)\{\}<>]/g,
77
MAILTO_REGEXP = /^mailto:/,
88
STACK_TRACE_REGEXP = /:\d+:\d+$/;
99

docs/app/src/examples.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ angular.module('examples', [])
44

55
.directive('runnableExample', ['$templateCache', '$document', function($templateCache, $document) {
66
var exampleClassNameSelector = '.runnable-example-file';
7-
var doc = $document[0];
87
var tpl =
98
'<nav class="runnable-example-tabs" ng-if="tabs">' +
109
' <a ng-class="{active:$index==activeTabIndex}"' +
@@ -31,7 +30,7 @@ angular.module('examples', [])
3130
return function(scope, element) {
3231
var node = element[0];
3332
var examples = node.querySelectorAll(exampleClassNameSelector);
34-
var tabs = [], now = Date.now();
33+
var tabs = [];
3534
angular.forEach(examples, function(child, index) {
3635
tabs.push(child.getAttribute('name'));
3736
});
@@ -103,7 +102,7 @@ angular.module('examples', [])
103102
},
104103
controllerAs: 'plnkr',
105104
template: '<button ng-click="plnkr.open($event)" class="btn pull-right"> <i class="glyphicon glyphicon-edit">&nbsp;</i> Edit in Plunker</button> ',
106-
controller: [function() {
105+
controller: [function Ctrl() {
107106
var ctrl = this;
108107

109108
ctrl.example = {

docs/app/src/search.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ angular.module('search', [])
4343
$scope.hasResults = totalAreas > 0;
4444
$scope.results = results;
4545
});
46-
}
47-
else {
46+
} else {
4847
clearResults();
4948
}
5049
if (!$scope.$$phase) $scope.$apply();
@@ -98,7 +97,7 @@ angular.module('search', [])
9897
console.log('Using Local Search Index');
9998

10099
// Create the lunr index
101-
var index = lunr(function() {
100+
var index = lunr(/* @this */ function() {
102101
this.ref('path');
103102
this.field('titleWords', {boost: 50});
104103
this.field('members', { boost: 40});

docs/app/test/.eslintrc.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@
55
"jasmine": true
66
},
77

8+
"rules": {
9+
// Some rules are not that important in tests and conflict with
10+
// Jasmine or would make it easier to write some tests; we disable
11+
// those ones here.
12+
"no-invalid-this": "off",
13+
"no-throw-literal": "off",
14+
"no-unused-vars": "off"
15+
},
16+
817
"globals": {
918
// AngularJS
1019
"angular": false,

docs/app/test/directivesSpec.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
describe("code", function() {
24
var prettyPrintOne, oldPP;
35
var compile, scope;

0 commit comments

Comments
 (0)