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

Commit 463a9e2

Browse files
committed
JSDoc
1 parent 428099b commit 463a9e2

File tree

8 files changed

+363
-172
lines changed

8 files changed

+363
-172
lines changed

.eslintrc.json

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es6": true
5+
},
6+
"extends": "eslint:recommended",
7+
"rules": {
8+
"capitalized-comments": [
9+
"error",
10+
"always",
11+
{
12+
"ignoreConsecutiveComments": true
13+
}
14+
],
15+
"comma-dangle": [
16+
"error", {
17+
"arrays": "always-multiline",
18+
"objects": "always-multiline",
19+
"imports": "never",
20+
"exports": "never",
21+
"functions": "never"
22+
}
23+
],
24+
"comma-spacing": "error",
25+
"curly": [
26+
"error",
27+
"multi-line"
28+
],
29+
"eol-last": "error",
30+
"eqeqeq": "error",
31+
"indent": [
32+
"error",
33+
"tab"
34+
],
35+
"keyword-spacing": "error",
36+
"linebreak-style": [
37+
"error",
38+
"unix"
39+
],
40+
"no-console": [
41+
"error",
42+
{
43+
"allow": ["warn", "error"]
44+
}
45+
],
46+
"no-eval": [
47+
"error",
48+
{
49+
"allowIndirect": true
50+
}
51+
],
52+
"no-redeclare": "error",
53+
"no-unused-vars": "warn",
54+
"no-useless-concat": "error",
55+
"one-var": [
56+
"error",
57+
"never"
58+
],
59+
"quote-props": [
60+
"error",
61+
"as-needed"
62+
],
63+
"quotes": [
64+
"error",
65+
"single"
66+
],
67+
"require-jsdoc": [
68+
"error", {
69+
"require": {
70+
"FunctionDeclaration": true,
71+
"MethodDefinition": true,
72+
"ClassDeclaration": false,
73+
"ArrowFunctionExpression": false,
74+
"FunctionExpression": true
75+
}
76+
}
77+
],
78+
"semi": [
79+
"error",
80+
"always"
81+
],
82+
"space-before-blocks": [
83+
"error",
84+
"always"
85+
],
86+
"space-before-function-paren": [
87+
"error",
88+
"never"
89+
],
90+
"spaced-comment": [
91+
"error",
92+
"always",
93+
{
94+
"line": {
95+
"markers": ["/"],
96+
"exceptions": ["-", "+"]
97+
},
98+
"block": {
99+
"markers": ["!"],
100+
"exceptions": ["*"],
101+
"balanced": true
102+
}
103+
}
104+
],
105+
"space-in-parens": [
106+
"error",
107+
"never"
108+
],
109+
"space-infix-ops": [
110+
"error",
111+
{
112+
"int32Hint": false
113+
}
114+
],
115+
"space-unary-ops": [
116+
"error",
117+
{
118+
"words": true,
119+
"nonwords": false,
120+
"overrides": {
121+
"new": false,
122+
"++": false
123+
}
124+
}
125+
],
126+
"valid-jsdoc": "error",
127+
"yoda": [
128+
"error",
129+
"always"
130+
]
131+
}
132+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/node_modules/
2+
/package-lock.json

Gruntfile.js

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
/*global module:false*/
22
module.exports = function(grunt) {
33

4-
//Project configuration.
4+
// Project configuration.
55
grunt.initConfig({
6-
//Metadata.
6+
// Metadata.
77
pkg: grunt.file.readJSON('package.json'),
88

9-
//JS HINT
10-
jshint: {
11-
all: ['src/blobject-fit.js']
9+
// Javascript.
10+
eslint: {
11+
check: {
12+
src: ['src/blobject-fit.js'],
13+
},
14+
fix: {
15+
options: {
16+
fix: true,
17+
},
18+
src: ['src/blobject-fit.js'],
19+
}
1220
},
13-
14-
//JS COMPRESSION
1521
uglify: {
1622
options: {
1723
mangle: false
@@ -22,8 +28,7 @@ module.exports = function(grunt) {
2228
}
2329
}
2430
},
25-
26-
//WATCH
31+
// Watch.
2732
watch: {
2833
scripts: {
2934
files: ['src/*.js'],
@@ -33,8 +38,7 @@ module.exports = function(grunt) {
3338
},
3439
}
3540
},
36-
37-
//NOTIFY
41+
// Notify.
3842
notify: {
3943
js: {
4044
options: {
@@ -45,16 +49,16 @@ module.exports = function(grunt) {
4549
}
4650
});
4751

48-
//These plugins provide necessary tasks.
49-
grunt.loadNpmTasks('grunt-contrib-uglify');
52+
// These plugins provide necessary tasks.
53+
grunt.loadNpmTasks('grunt-contrib-uglify-es');
5054
grunt.loadNpmTasks('grunt-contrib-watch');
51-
grunt.loadNpmTasks('grunt-contrib-jshint');
55+
grunt.loadNpmTasks('grunt-eslint');
5256
grunt.loadNpmTasks('grunt-notify');
5357

5458
//tasks
55-
grunt.registerTask('javascript', ['jshint', 'uglify']);
59+
grunt.registerTask('javascript', ['eslint', 'uglify']);
5660

5761
grunt.event.on('watch', function(action, filepath, target) {
5862
grunt.log.writeln(target + ': ' + filepath + ' has ' + action);
5963
});
60-
};
64+
};

blobject-fit.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "blobject-fit",
33
"main": "src/blobject-fit.js",
4-
"version": "1.0",
4+
"version": "1.5.1",
55
"homepage": "https://github.com/Blobfolio/blobject-fit",
66
"authors": [
77
"Josh Stoik"
@@ -22,4 +22,4 @@
2222
"type": "git",
2323
"url": "git://github.com/Blobfolio/blobject-fit.git"
2424
}
25-
}
25+
}

component.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "blobject-fit",
33
"repo": "blobfolio/blobject-fit",
44
"description": "A lightweight, dependency-free object-fit polyfill.",
5-
"version": "1.5",
5+
"version": "1.5.1",
66
"scripts": [
77
"blobject-fit.min.js"
88
],
@@ -11,4 +11,4 @@
1111
"blobject-fit.min.js"
1212
],
1313
"license": "WTFPL"
14-
}
14+
}

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"name": "blobject-fit",
33
"devDependencies": {
44
"grunt": "*",
5-
"grunt-contrib-jshint": "*",
6-
"grunt-contrib-uglify": "*",
5+
"grunt-eslint": "*",
76
"grunt-contrib-watch": "*",
8-
"grunt-notify": "*"
7+
"grunt-notify": "*",
8+
"grunt-contrib-uglify-es": "git://github.com/gruntjs/grunt-contrib-uglify.git#harmony"
99
}
10-
}
10+
}

0 commit comments

Comments
 (0)