Skip to content
This repository was archived by the owner on Jan 7, 2022. It is now read-only.

Commit 8483071

Browse files
authored
[WIP] Feature/more eslint #48 (#50)
* added some directory specific eslintrc's, updated related linting, added stylelint to codeclimate * added stylelint, stylelintrc * added stylelinting to existing less * -aws icons.css dependency, linting cleanup on menu/popover * more linting, added menu/popover to material instead of icons, added npm start to readme * more linting in body+header * utils lint, lint cleanup all * unit test fix for DataTableService * codeclimate config reference added * adding angular checking involving global angular methods on utils, added angular injection service exceptions in utils * added eslint exceptions to codeclimate config * missed isFunction check in polyfill.js * moving david-dm badge images from david to shields.io * updating dependencies, rollup * fixed icons, material styles. rebuild. fixed popover registry to be factory
1 parent 068d962 commit 8483071

124 files changed

Lines changed: 2882 additions & 2660 deletions

File tree

Some content is hidden

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

.codeclimate.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,44 @@
11
---
22
engines:
3-
csslint:
3+
stylelint:
44
enabled: true
5+
channel: "beta"
56
duplication:
67
enabled: true
78
config:
89
languages:
910
- javascript
1011
eslint:
1112
enabled: true
13+
channel: "eslint-3"
14+
checks:
15+
import/no-extraneous-dependencies:
16+
enabled: false
17+
import/no-unresolved:
18+
enabled: false
19+
new-cap:
20+
enabled: false
21+
exclude_fingerprints:
22+
# Exclude $document service preference in vendorPrefixes.js
23+
- d05c060d75d5a94d266f0f7398093e1a
24+
# Exclude $window service preference in vendorPrefixes.js
25+
- 7029050c6569c51f4384a6b33c5846f1
26+
# Exclude $window service preference in utils.js
27+
- a43ad3721244d16282dfb81081b3580c
28+
# Exclude $timeout service preference in utils.js
29+
- e9642a68023bd808916ab7879649e556
30+
# Exclude $document service preference in utils.js
31+
- 2fc6dfef9461ffc93af629c3e4acf704
32+
# Exclude $timeout service preference in throttle.js
33+
- 3b8179a73a079c5d6ec554e36fbd4bdf
34+
# Exclude $window service preference in translate.js
35+
- da547e16b5d64c90f3955fc93573ec1c
1236
fixme:
1337
enabled: true
1438
ratings:
1539
paths:
1640
- "**.css"
41+
- "**.less"
1742
- "**.inc"
1843
- "**.js"
1944
- "**.jsx"

.csslintrc

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

.eslintrc

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,33 @@
11
{
22
"parser": "babel-eslint",
3+
"plugins": ["jasmine", "angular"],
4+
"extends": ["airbnb-base", "plugin:jasmine/recommended", "angular"],
5+
"root": true,
36
"env": {
4-
"browser": true
7+
"browser": true,
8+
"jasmine": true
59
},
610
"rules": {
7-
"strict": 0,
8-
"no-multi-spaces": 0,
911
"quotes": [
1012
1,
1113
"single"
1214
],
13-
"no-shadow": 0,
14-
"no-empty": 0,
15-
"no-cond-assign": 0,
16-
"no-loop-func": 0,
17-
"no-underscore-dangle": 0,
18-
"no-use-before-define": 0
15+
"import/no-extraneous-dependencies": [
16+
"error",
17+
{
18+
"devDependencies": [
19+
"gulpfile.babel.js",
20+
"src/**/*.js",
21+
"src/*.js",
22+
"test/*.js"
23+
]
24+
}
25+
],
26+
"jasmine/no-global-setup": "off",
27+
"no-param-reassign": "off",
28+
"angular/no-private-call": "off"
29+
},
30+
"globals": {
31+
"angular": true
1932
}
2033
}

.stylelintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "stylelint-config-standard"
3+
}

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
[![Join the chat at https://gitter.im/Swimlane/angular-data-table](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/swimlane/angular-data-table?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
44
[![Build Status](https://travis-ci.org/jonshaffer/angular-data-table.svg?branch=master)](https://travis-ci.org/jonshaffer/angular-data-table)
55
[![GitHub version](https://badge.fury.io/gh/jonshaffer%2Fangular-data-table.svg)](https://badge.fury.io/gh/jonshaffer%2Fangular-data-table)
6-
[![dependencies Status](https://david-dm.org/jonshaffer/angular-data-table/status.svg)](https://david-dm.org/jonshaffer/angular-data-table)
7-
[![devDependencies Status](https://david-dm.org/jonshaffer/angular-data-table/dev-status.svg)](https://david-dm.org/jonshaffer/angular-data-table?type=dev)
6+
[![dependencies Status](https://img.shields.io/david/jonshaffer/angular-data-table.svg)](https://david-dm.org/jonshaffer/angular-data-table)
7+
[![devDependencies Status](https://img.shields.io/david/dev/jonshaffer/angular-data-table.svg)](https://david-dm.org/jonshaffer/angular-data-table?type=dev)
88
[![Code Climate](https://codeclimate.com/github/jonshaffer/angular-data-table/badges/gpa.svg)](https://codeclimate.com/github/jonshaffer/angular-data-table)
99
[![Codecov](https://img.shields.io/codecov/c/github/jonshaffer/angular-data-table.svg)](https://codecov.io/gh/jonshaffer/angular-data-table)
1010

1111
`angular-data-table` is a AngularJS directive for presenting large and complex data. It has all the features you would expect from any other table but in a light package with _no external depedencies_. The table was designed to be extremely flexible and light; it doesn't make any assumptions about your data or how you: filter, sort or page it.
1212

1313
It was engineered from its conception to handle thousands of rows without sacrificing performance. It was built for modern browsers using _ES6, CSS3 and HTML5_ and **only supports [Evergreen Browsers](http://eisenbergeffect.bluespire.com/evergreen-browsers/) and Angular >= 1.4.x and < 2.0.0**.
1414

15-
Sadly, this project is **not Angular2 upgrade compatible**. Swimlane has authored an Angular 2 compatible table here: [angular2-data-table](https://github.com/swimlane/angular2-data-table) which is the successor to this project. ~~**We are going to slowly be transitioning this project maintenance mode**. We will continue to provide feedback to the community and accept PRs but we won't be doing any major new development.~~ Major new development is happening on this fork and there will be breaking changes, appropriately noted with [semvar](http://semver.org/) versioning.
15+
Sadly, this project is **not Angular2 upgrade compatible**. Swimlane has authored an Angular 2 compatible table here: [angular2-data-table](https://github.com/swimlane/angular2-data-table) which is the successor to this project. ~~**We are going to slowly be transitioning this project maintenance mode**. We will continue to provide feedback to the community and accept PR's but we won't be doing any major new development.~~ Major new development is happening on this fork and there will be breaking changes, appropriately noted with [semver](http://semver.org/) versioning.
1616

1717
See live demos [here]( http://jonshaffer.github.io/angular-data-table/).
1818

@@ -155,9 +155,8 @@ The data table can be created with the following `options`:
155155

156156
Ensure you have the latest NPM and JSPM installed globally. If you don't already have JSPM installed run: `npm install jspm -g`.
157157

158-
- `npm install`
159-
- `jspm install`
160-
- `gulp watch serve`
158+
- `npm install && jspm install`
159+
- `npm start` or `gulp serve watch`
161160
- Open your browser to `http://localhost:9000`
162161

163162
#### Build

config.js

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,86 @@
1+
/* eslint-disable angular/module-getter */
2+
13
System.config({
24
baseURL: '',
35
defaultJSExtensions: true,
46
transpiler: 'babel',
57
babelOptions: {
6-
'optional': [
7-
'runtime'
8-
]
8+
optional: [
9+
'runtime',
10+
],
911
},
1012
paths: {
1113
'*': 'dist/*.js',
1214
'github:*': 'jspm_packages/github/*',
13-
'npm:*': 'jspm_packages/npm/*'
15+
'npm:*': 'jspm_packages/npm/*',
1416
},
1517

1618
map: {
17-
'angular': 'npm:angular@1.5.8',
18-
'babel': 'npm:babel-core@5.8.38',
19+
angular: 'npm:angular@1.5.8',
20+
babel: 'npm:babel-core@5.8.38',
1921
'babel-runtime': 'npm:babel-runtime@5.8.38',
2022
'core-js': 'npm:core-js@1.2.7',
2123
'github:jspm/nodelibs-assert@0.1.0': {
22-
'assert': 'npm:assert@1.4.1'
24+
assert: 'npm:assert@1.4.1',
2325
},
2426
'github:jspm/nodelibs-buffer@0.1.0': {
25-
'buffer': 'npm:buffer@3.6.0'
27+
buffer: 'npm:buffer@3.6.0',
2628
},
2729
'github:jspm/nodelibs-path@0.1.0': {
28-
'path-browserify': 'npm:path-browserify@0.0.0'
30+
'path-browserify': 'npm:path-browserify@0.0.0',
2931
},
3032
'github:jspm/nodelibs-process@0.1.2': {
31-
'process': 'npm:process@0.11.9'
33+
process: 'npm:process@0.11.9',
3234
},
3335
'github:jspm/nodelibs-util@0.1.0': {
34-
'util': 'npm:util@0.10.3'
36+
util: 'npm:util@0.10.3',
3537
},
3638
'github:jspm/nodelibs-vm@0.1.0': {
37-
'vm-browserify': 'npm:vm-browserify@0.0.4'
39+
'vm-browserify': 'npm:vm-browserify@0.0.4',
3840
},
3941
'npm:angular@1.5.8': {
40-
'process': 'github:jspm/nodelibs-process@0.1.2'
42+
process: 'github:jspm/nodelibs-process@0.1.2',
4143
},
4244
'npm:assert@1.4.1': {
43-
'assert': 'github:jspm/nodelibs-assert@0.1.0',
44-
'buffer': 'github:jspm/nodelibs-buffer@0.1.0',
45-
'process': 'github:jspm/nodelibs-process@0.1.2',
46-
'util': 'npm:util@0.10.3'
45+
assert: 'github:jspm/nodelibs-assert@0.1.0',
46+
buffer: 'github:jspm/nodelibs-buffer@0.1.0',
47+
process: 'github:jspm/nodelibs-process@0.1.2',
48+
util: 'npm:util@0.10.3',
4749
},
4850
'npm:babel-runtime@5.8.38': {
49-
'process': 'github:jspm/nodelibs-process@0.1.2'
51+
process: 'github:jspm/nodelibs-process@0.1.2',
5052
},
5153
'npm:buffer@3.6.0': {
5254
'base64-js': 'npm:base64-js@0.0.8',
53-
'child_process': 'github:jspm/nodelibs-child_process@0.1.0',
54-
'fs': 'github:jspm/nodelibs-fs@0.1.2',
55-
'ieee754': 'npm:ieee754@1.1.8',
56-
'isarray': 'npm:isarray@1.0.0',
57-
'process': 'github:jspm/nodelibs-process@0.1.2'
55+
child_process: 'github:jspm/nodelibs-child_process@0.1.0',
56+
fs: 'github:jspm/nodelibs-fs@0.1.2',
57+
ieee754: 'npm:ieee754@1.1.8',
58+
isarray: 'npm:isarray@1.0.0',
59+
process: 'github:jspm/nodelibs-process@0.1.2',
5860
},
5961
'npm:core-js@1.2.7': {
60-
'fs': 'github:jspm/nodelibs-fs@0.1.2',
61-
'path': 'github:jspm/nodelibs-path@0.1.0',
62-
'process': 'github:jspm/nodelibs-process@0.1.2',
63-
'systemjs-json': 'github:systemjs/plugin-json@0.1.2'
62+
fs: 'github:jspm/nodelibs-fs@0.1.2',
63+
path: 'github:jspm/nodelibs-path@0.1.0',
64+
process: 'github:jspm/nodelibs-process@0.1.2',
65+
'systemjs-json': 'github:systemjs/plugin-json@0.1.2',
6466
},
6567
'npm:inherits@2.0.1': {
66-
'util': 'github:jspm/nodelibs-util@0.1.0'
68+
util: 'github:jspm/nodelibs-util@0.1.0',
6769
},
6870
'npm:path-browserify@0.0.0': {
69-
'process': 'github:jspm/nodelibs-process@0.1.2'
71+
process: 'github:jspm/nodelibs-process@0.1.2',
7072
},
7173
'npm:process@0.11.9': {
72-
'assert': 'github:jspm/nodelibs-assert@0.1.0',
73-
'fs': 'github:jspm/nodelibs-fs@0.1.2',
74-
'vm': 'github:jspm/nodelibs-vm@0.1.0'
74+
assert: 'github:jspm/nodelibs-assert@0.1.0',
75+
fs: 'github:jspm/nodelibs-fs@0.1.2',
76+
vm: 'github:jspm/nodelibs-vm@0.1.0',
7577
},
7678
'npm:util@0.10.3': {
77-
'inherits': 'npm:inherits@2.0.1',
78-
'process': 'github:jspm/nodelibs-process@0.1.2'
79+
inherits: 'npm:inherits@2.0.1',
80+
process: 'github:jspm/nodelibs-process@0.1.2',
7981
},
8082
'npm:vm-browserify@0.0.4': {
81-
'indexof': 'npm:indexof@0.0.1'
82-
}
83-
}
83+
indexof: 'npm:indexof@0.0.1',
84+
},
85+
},
8486
});

demos/action-links.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
</style>
4444
<link href="../dist/dataTable.css" media="all" rel="stylesheet" />
4545
<link href="../dist/themes/material.css" media="all" rel="stylesheet" />
46-
<link href="http://fontastic.s3.amazonaws.com/Jnf54BZCm7mSjGCxNRbfp3/icons.css" rel="stylesheet">
46+
<link href="../dist/themes/icons.css" rel="stylesheet">
4747
</head>
4848
<body ng-app="app" ng-controller="HomeController">
4949

demos/all-options.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</style>
3939
<link href="../dist/dataTable.css" media="all" rel="stylesheet" />
4040
<link href="../dist/themes/material.css" media="all" rel="stylesheet" />
41-
<link href="http://fontastic.s3.amazonaws.com/Jnf54BZCm7mSjGCxNRbfp3/icons.css" rel="stylesheet">
41+
<link href="../dist/themes/icons.css" rel="stylesheet">
4242
</head>
4343
<body ng-app="app" ng-controller="HomeController">
4444
<button type="button" ng-click="clearData()">Clear Data</button>

demos/basic.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</style>
3939
<link href="../dist/dataTable.css" media="all" rel="stylesheet" />
4040
<link href="../dist/themes/material.css" media="all" rel="stylesheet" />
41-
<link href="http://fontastic.s3.amazonaws.com/Jnf54BZCm7mSjGCxNRbfp3/icons.css" rel="stylesheet">
41+
<link href="../dist/themes/icons.css" rel="stylesheet">
4242
</head>
4343
<body ng-app="app" ng-controller="HomeController">
4444
<dtable id="dtable" options="options" rows="data" class="material" on-row-dbl-click="onRowDblClick(row)"></dtable>

demos/cell-templates.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
</style>
4040
<link href="../dist/dataTable.css" media="all" rel="stylesheet" />
4141
<link href="../dist/themes/material.css" media="all" rel="stylesheet" />
42-
<link href="http://fontastic.s3.amazonaws.com/Jnf54BZCm7mSjGCxNRbfp3/icons.css" rel="stylesheet">
42+
<link href="../dist/themes/icons.css" rel="stylesheet">
4343

4444
</head>
4545
<body ng-app="app" ng-controller="HomeController">

0 commit comments

Comments
 (0)