Skip to content

Commit 9dd08e5

Browse files
author
Alain Dumesny
committed
Merge branch 'develop' into feature/TS
2 parents a9ffd57 + 1c3f50b commit 9dd08e5

File tree

12 files changed

+660
-745
lines changed

12 files changed

+660
-745
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist/*.js
2+
demo/*
3+
spec/*

.eslintrc.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"commonjs": true,
5+
"es6": true,
6+
"node": true
7+
},
8+
"parserOptions": {
9+
"ecmaFeatures": {
10+
"jsx": true
11+
},
12+
"sourceType": "module"
13+
},
14+
"rules": {
15+
"indent": ["error", 2],
16+
"max-len": ["error", 180],
17+
"camelcase": "error",
18+
"no-trailing-spaces": "error"
19+
}
20+
}

.jscsrc

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

Gruntfile.js

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
// jscs:disable requireCamelCaseOrUpperCaseIdentifiers
1+
/*eslint-disable camelcase */
22
module.exports = function(grunt) {
33
grunt.loadNpmTasks('grunt-sass');
44
grunt.loadNpmTasks('grunt-contrib-cssmin');
55
grunt.loadNpmTasks('grunt-contrib-copy');
66
grunt.loadNpmTasks('grunt-contrib-uglify');
7-
grunt.loadNpmTasks('grunt-contrib-jshint');
8-
grunt.loadNpmTasks('grunt-jscs');
7+
grunt.loadNpmTasks('grunt-eslint');
98
grunt.loadNpmTasks('grunt-contrib-watch');
109
grunt.loadNpmTasks('grunt-protractor-runner');
1110
grunt.loadNpmTasks('grunt-contrib-connect');
@@ -58,12 +57,8 @@ module.exports = function(grunt) {
5857
}
5958
},
6059

61-
jshint: {
62-
all: ['src/*.js']
63-
},
64-
65-
jscs: {
66-
all: ['*.js', 'src/*.js', ],
60+
eslint: {
61+
target: ['*.js', 'src/*.js']
6762
},
6863

6964
watch: {
@@ -107,7 +102,8 @@ module.exports = function(grunt) {
107102
}
108103
});
109104

110-
grunt.registerTask('lint', ['jshint', 'jscs']);
111-
grunt.registerTask('default', ['sass', 'cssmin', 'jshint', 'jscs', 'copy', 'uglify']);
105+
grunt.registerTask('lint', ['eslint']);
106+
grunt.registerTask('default', ['sass', 'cssmin', 'eslint', 'copy', 'uglify']);
112107
grunt.registerTask('e2e-test', ['connect', 'protractor_webdriver', 'protractor']);
113108
};
109+
/*eslint-enable camelcase */

demo/anijs.html

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,10 @@
3737
<body>
3838
<div class="container-fluid">
3939
<h1>AniJS demo</h1>
40-
41-
<div>
42-
<a class="btn btn-default" id="add-widget" href="#">Add Widget</a>
43-
</div>
44-
45-
<div>
46-
<h4>Widget added</h4>
47-
</div>
48-
49-
<br/>
50-
51-
<div class="grid-stack">
52-
</div>
40+
<button id="add-widget" href="#">Add Widget</button>
41+
<h4>Widget added</h4>
42+
<br>
43+
<div class="grid-stack"></div>
5344
</div>
5445

5546
<script src="https://cdnjs.cloudflare.com/ajax/libs/AniJS/0.9.3/anijs.js"></script>

demo/float.html

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,9 @@
3535
<body>
3636
<div class="container-fluid">
3737
<h1>Float grid demo</h1>
38-
39-
<div>
40-
<a class="btn btn-default" id="add-new-widget" href="#">Add Widget</a>
41-
</div>
42-
43-
<br/>
44-
45-
<div class="grid-stack">
46-
</div>
38+
<button id="add-widget" href="#">Add Widget</button>
39+
<br><br>
40+
<div class="grid-stack"></div>
4741
</div>
4842

4943

@@ -79,7 +73,7 @@ <h1>Float grid demo</h1>
7973
return false;
8074
}.bind(this);
8175

82-
$('#add-new-widget').click(this.addNewWidget);
76+
$('#add-widget').click(this.addNewWidget);
8377
};
8478
});
8579
</script>

demo/serialization.html

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,12 @@
3535
<body>
3636
<div class="container-fluid">
3737
<h1>Serialization demo</h1>
38-
39-
<div>
40-
<a class="btn btn-default" id="save-grid" href="#">Save Grid</a>
41-
<a class="btn btn-default" id="load-grid" href="#">Load Grid</a>
42-
<a class="btn btn-default" id="clear-grid" href="#">Clear Grid</a>
43-
</div>
44-
45-
<br/>
46-
47-
<div class="grid-stack">
48-
</div>
49-
38+
<button id="save-grid" href="#">Save Grid</button>
39+
<button id="load-grid" href="#">Load Grid</button>
40+
<button id="clear-grid" href="#">Clear Grid</button>
41+
<br/><br/>
42+
<div class="grid-stack"></div>
5043
<hr/>
51-
5244
<textarea id="saved-data" cols="100" rows="20" readonly="readonly"></textarea>
5345
</div>
5446

doc/CHANGES.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ Change log
2424

2525
## v0.5.2-dev (upcoming changes)
2626

27-
TBD
27+
- fix widgets not animating when animate: true is used. on every move, styles were recreated-fix should slightly improve gridstack.js speed ([#937](https://github.com/gridstack/gridstack.js/issues/937)).
28+
- fix moving widgets when having multiple grids. jquery-ui workaround ([#1043](https://github.com/gridstack/gridstack.js/issues/1043)).
29+
- switch to eslint ([#763](https://github.com/gridstack/gridstack.js/issues/763)).
30+
- null values to addWidget() exception fix ([#1042](https://github.com/gridstack/gridstack.js/issues/1042)).
2831

2932
## v0.5.2 (2019-11-13)
3033

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,9 @@
4646
"grunt-contrib-connect": "^2.0.0",
4747
"grunt-contrib-copy": "^1.0.0",
4848
"grunt-contrib-cssmin": "^3.0.0",
49-
"grunt-contrib-jshint": "^2.1.0",
5049
"grunt-contrib-uglify": "^4.0.1",
5150
"grunt-contrib-watch": "^1.1.0",
52-
"grunt-jscs": "^3.0.1",
51+
"grunt-eslint": "^20.1.0",
5352
"grunt-protractor-runner": "^5.0.0",
5453
"grunt-protractor-webdriver": "^0.2.5",
5554
"grunt-sass": "2.1.0",

0 commit comments

Comments
 (0)