Skip to content

Commit d4c4bac

Browse files
committed
Export whole angular modules instead of its name.
- Remove JSHint and use ESLint instead.
1 parent e8e5032 commit d4c4bac

File tree

74 files changed

+220
-229
lines changed

Some content is hidden

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

74 files changed

+220
-229
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["es2015"]
3+
}

.eslintrc

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,27 @@
33
"parser": "babel-eslint",
44
"env": {
55
"browser": true,
6-
"node": true
6+
"node": true,
7+
"jasmine": true,
8+
"jest": true
79
},
810
"rules": {
11+
"camelcase": 1,
12+
"complexity": 1,
13+
"curly": 1,
14+
"eqeqeq": 2,
15+
"indent": [0, 2],
16+
"no-bitwise": 1,
917
"no-console": 0,
1018
"new-cap": 0,
1119
"strict": 0,
1220
"no-underscore-dangle": 0,
1321
"no-use-before-define": 0,
1422
"eol-last": 0,
15-
"quotes": [2, "single", "avoid-escape"]
23+
"quotes": [2, "single", "avoid-escape"],
24+
"max-len": [1, 120],
25+
"max-params": [1, 10],
26+
"max-statements": [1, 40],
27+
"no-var": 0
1628
}
1729
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ node_modules/
22
coverage/
33
dist/
44
.idea/
5+
.vscode/

.jshintrc

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

app/app.config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ function routing($httpProvider, $routeProvider, $logProvider) {
5050
redirectTo: '/'
5151
});
5252

53-
// jshint ignore:start
5453
$logProvider.debugEnabled(__LOGGING__); // eslint-disable-line no-undef
55-
//jshint ignore:end
5654

5755
} // end of routing()
5856

app/app.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ import routing from './app.config';
1111
import runBlock from './app.run';
1212

1313
// create main app module
14-
export default angular.module('ldVOWLApp', ['ngRoute', 'ngAnimate', 'ui.bootstrap', 'ngCookies', components, filters,
15-
services, utilities])
14+
export default angular.module('ldVOWLApp', ['ngRoute', 'ngAnimate', 'ui.bootstrap', 'ngCookies',
15+
components.name,
16+
filters.name,
17+
services.name,
18+
utilities.name])
1619
.config(routing)
1720
.run(runBlock);

app/components/about/about.module.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import angular from 'angular';
1+
import * as angular from 'angular';
22

33
import AboutCtrl from './about.ctrl';
44

@@ -10,5 +10,4 @@ import AboutCtrl from './about.ctrl';
1010
* Module for the about page of the application.
1111
*/
1212
export default angular.module('components.about', [])
13-
.controller('AboutCtrl', AboutCtrl)
14-
.name;
13+
.controller('AboutCtrl', AboutCtrl);

app/components/components.module.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,9 @@ import sidebar from './sidebar/sidebar.module';
77
import start from './start/start.module';
88
import about from './about/about.module';
99

10-
export default angular.module('components', [graph, header, settings, sidebar, start, about])
11-
.name;
10+
export default angular.module('components', [graph.name,
11+
header.name,
12+
settings.name,
13+
sidebar.name,
14+
start.name,
15+
about.name]);

app/components/graph/graph.ctrl.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @param {$location} $location
66
* @param {$log} $log
77
* @param {TBoxExtractor} TBoxExtractor
8-
* @param DetailExtractor
8+
* @param {DetailExtractor} DetailExtractor
99
* @param {RequestConfig} RequestConfig
1010
* @param {Data} Data
1111
* @param View
@@ -14,7 +14,6 @@
1414
*/
1515
function graphCtrl($location, $log, TBoxExtractor, DetailExtractor, RequestConfig, Data, View) {
1616

17-
/* jshint validthis: true */
1817
const vm = this;
1918

2019
vm.selected = {

app/components/graph/graph.module.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import angular from 'angular';
2-
1+
import * as angular from 'angular';
32
import GraphCtrl from './graph.ctrl';
43
import nodeLinkGraph from './nodelink-graph.drv';
54

@@ -13,5 +12,4 @@ import nodeLinkGraph from './nodelink-graph.drv';
1312
*/
1413
export default angular.module('components.graph', [])
1514
.controller('GraphCtrl', GraphCtrl)
16-
.directive('nodeLinkGraph', nodeLinkGraph)
17-
.name;
15+
.directive('nodeLinkGraph', nodeLinkGraph);

app/components/graph/nodelink-graph.drv.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import angular from 'angular';
2-
import d3 from 'd3';
1+
import * as angular from 'angular';
2+
import * as d3 from 'd3';
33

44
/**
55
* @ngdoc directive
@@ -107,11 +107,11 @@ function NodeLinkGraph($window, $log, Properties, Nodes, Prefixes, Filters, Util
107107
});
108108

109109
scope.$watch(function () {
110-
return Filters.getIncludeLiterals();
111-
},
112-
function (newVal) {
113-
scope.data.showTypes = newVal;
114-
return scope.render(scope.data);
110+
return Filters.getIncludeLiterals();
111+
},
112+
function (newVal) {
113+
scope.data.showTypes = newVal;
114+
return scope.render(scope.data);
115115
});
116116

117117
scope.$watch(function () {

app/components/header/header.ctrl.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ function HeaderCtrl($scope, $location) {
1313

1414
header.loading = false;
1515

16-
// jshint ignore:start
1716
header.appVersion = (__VERSION__ !== undefined) ? __VERSION__ : '0.0'; // eslint-disable-line no-undef
18-
// jshint ignore:end
1917

2018
$scope.$on('pending-requests-changed', function(event, pending) {
2119
header.loading = pending > 0;

app/components/header/header.module.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import angular from 'angular';
1+
import * as angular from 'angular';
22

33
import HeaderCtrl from './header.ctrl';
44
import HeaderDirective from './header.drv';
@@ -13,5 +13,4 @@ import HeaderDirective from './header.drv';
1313
*/
1414
export default angular.module('components.header', [])
1515
.controller('HeaderCtrl', HeaderCtrl)
16-
.directive('header', HeaderDirective)
17-
.name;
16+
.directive('header', HeaderDirective);

app/components/settings/blacklist/blacklist.module.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@ import BlacklistClasses from './blacklist_classes';
1515
export default angular.module('blacklist', [])
1616
.constant('PREFIX', BlacklistPrefixes)
1717
.constant('PROPERTY_BLACKLIST', BlacklistProperties)
18-
.constant('CLASS_BLACKLIST', BlacklistClasses)
19-
.name;
18+
.constant('CLASS_BLACKLIST', BlacklistClasses);

app/components/settings/settings.ctrl.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
function settingsCtrl($log, $cookies, PREFIX, PROPERTY_BLACKLIST, CLASS_BLACKLIST, RequestConfig, Data, ClassExtractor,
1818
RelationExtractor) {
1919

20-
/* jshint validthis: true */
2120
const vm = this;
2221

2322
const cookiePrefix = 'ldvowl_';
@@ -125,7 +124,6 @@ function settingsCtrl($log, $cookies, PREFIX, PROPERTY_BLACKLIST, CLASS_BLACKLIS
125124
vm.restoreListDefaults();
126125
};
127126

128-
129127
/**
130128
* Restore blacklists to predefined list.
131129
*/

app/components/settings/settings.module.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import angular from 'angular';
1+
import * as angular from 'angular';
22

33
import SettingsCtrl from './settings.ctrl';
44
import blacklist from './blacklist/blacklist.module.js';
@@ -14,6 +14,5 @@ import blacklist from './blacklist/blacklist.module.js';
1414
* This is the settings module of the application. This is where you can configure the extraction of the tbox
1515
* information and the blacklist being used.
1616
*/
17-
export default angular.module('components.settings', [blacklist])
18-
.controller('SettingsCtrl', SettingsCtrl)
19-
.name;
17+
export default angular.module('components.settings', [blacklist.name])
18+
.controller('SettingsCtrl', SettingsCtrl);

app/components/sidebar/groups/endpoint-group/endpoint-group.module.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ import EndpointGroupCtrl from './endpoint-group.ctrl';
55

66
export default angular.module('components.sidebar.groups.endpoint', [])
77
.controller('EndpointGroupCtrl', EndpointGroupCtrl)
8-
.directive('endpointGroup', EndpointGroup)
9-
.name;
8+
.directive('endpointGroup', EndpointGroup);

app/components/sidebar/groups/filter-group/filter-group.ctrl.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ function filterGroupCtrl(Filters, TBoxExtractor) {
1515
vm.filterDisjointNodes = !Filters.getIncludeDisjointNode();
1616
vm.filterSubclassRelations = !Filters.getIncludeSubclassRelations();
1717

18-
// jshint ignore:start
1918
vm.showEndpointUrl = __SHOW_ENDPOINT__; // eslint-disable-line no-undef
20-
// jshint ignore:end
2119

2220
/**
2321
* Toggle whether data types should be shown in the graph.

app/components/sidebar/groups/filter-group/filter-group.module.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import FilterGroup from './filter-group.drv';
1414
*/
1515
const filterModule = angular.module('components.sidebar.groups.filter', [])
1616
.controller('FilterGroupCtrl', FilterGroupCtrl)
17-
.directive('filterGroup', FilterGroup)
18-
.name;
17+
.directive('filterGroup', FilterGroup);
1918

2019
export default filterModule;

app/components/sidebar/groups/graph-settings-group/graph-settings-group.ctrl.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
*/
1212
function graphSettingsCtrl($rootScope, $log, Prefixes, Links) {
1313

14-
/* jshint validthis: true */
1514
const graphSettings = this;
1615

1716
graphSettings.differentColors = Prefixes.getDifferentColors();

app/components/sidebar/groups/graph-settings-group/graph-settings-group.module.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import graphSettingsGroup from './graph-settings-group.drv';
1313
*/
1414
const graphSettingsModule = angular.module('components.sidebar.groups.graphsettings', [])
1515
.directive('graphSettingsGroup', graphSettingsGroup)
16-
.controller('GraphSettingsCtrl', GraphSettingsGroupCtrl)
17-
.name;
16+
.controller('GraphSettingsCtrl', GraphSettingsGroupCtrl);
1817

1918
export default graphSettingsModule;

app/components/sidebar/groups/namespace-group/namespace-group.module.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import NamespaceGroup from './namespace-group.drv';
1313
*/
1414
const namespaceGroupModule = angular.module('components.sidebar.groups.namespace', [])
1515
.controller('NamespaceGroupCtrl', NamespaceGroupCtrl)
16-
.directive('namespaceGroup', NamespaceGroup)
17-
.name;
16+
.directive('namespaceGroup', NamespaceGroup);
1817

1918
export default namespaceGroupModule;

app/components/sidebar/groups/selection-group/selection-group.module.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import SelectionGroupCtrl from './selection-group.ctrl';
1414
*/
1515
const selectionGroupModule = angular.module('sidebar.groups.selection', [])
1616
.controller('SelectionGroupCtrl', SelectionGroupCtrl)
17-
.directive('selectionGroup', SelectionGroup)
18-
.name;
17+
.directive('selectionGroup', SelectionGroup);
1918

2019
export default selectionGroupModule;

app/components/sidebar/groups/sidebar-groups.module.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import selectionGroup from './selection-group/selection-group.module';
1414
*
1515
* This module includes all groups for the sidebar accordion of the application.
1616
*/
17-
export default angular.module('sidebar.groups', [endpointGroup, filterGroup, graphSettingsGroup, namespaceGroup,
18-
selectionGroup])
19-
.name;
17+
export default angular.module('sidebar.groups', [endpointGroup.name,
18+
filterGroup.name,
19+
graphSettingsGroup.name,
20+
namespaceGroup.name,
21+
selectionGroup.name]);

app/components/sidebar/selection/selection.module.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const selectionModule = angular.module('components.sidebar.selection', [])
2121
.directive('typeSelection', TypeSelection)
2222
.directive('propSelection', PropertySelection)
2323
.directive('datatypePropSelection', DatatypePropertySelection)
24-
.directive('subclassPropSelection', SubclassPropertySelection)
25-
.name;
24+
.directive('subclassPropSelection', SubclassPropertySelection);
2625

2726
export default selectionModule;

app/components/sidebar/sidebar.module.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ import selections from './selection/selection.module';
1515
*
1616
* This is the module for the sidebar of the application, including the directive for the jQuery slider.
1717
*/
18-
export default angular.module('components.sidebar', [groups, selections])
19-
.directive('slider', Slider)
20-
.name;
18+
export default angular.module('components.sidebar', [groups.name, selections.name])
19+
.directive('slider', Slider);

0 commit comments

Comments
 (0)