Skip to content
This repository was archived by the owner on Jun 25, 2023. It is now read-only.

Commit 3978202

Browse files
committed
JSDoc
1 parent b73a7fc commit 3978202

File tree

4 files changed

+601
-437
lines changed

4 files changed

+601
-437
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+
}

Gruntfile.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ module.exports = function(grunt) {
4242
// Javascript.
4343
eslint: {
4444
check: {
45-
src: ['src/js/custom/**/*.js'],
45+
src: ['src/js/**/*.js'],
4646
},
4747
fix: {
4848
options: {
4949
fix: true,
5050
},
51-
src: ['src/js/custom/**/*.js'],
51+
src: ['src/js/**/*.js'],
5252
}
5353
},
5454
uglify: {
@@ -85,15 +85,15 @@ module.exports = function(grunt) {
8585
notify: {
8686
css: {
8787
options:{
88-
title: "CSS Files built",
89-
message: "SASS and Post CSS task complete"
88+
title: "CSS Done",
89+
message: "CSS has been linted, compiled, and minified."
9090
}
9191
},
9292

9393
js: {
9494
options: {
95-
title: "JS Files built",
96-
message: "Uglify and JSHint task complete"
95+
title: "Javascript Done",
96+
message: "JS has been linted, compiled, and minified."
9797
}
9898
}
9999
}
@@ -110,7 +110,7 @@ module.exports = function(grunt) {
110110
// Tasks.
111111
grunt.registerTask('default', ['css', 'javascript']);
112112
grunt.registerTask('css', ['sass', 'postcss']);
113-
grunt.registerTask('javascript', ['jshint', 'uglify']);
113+
grunt.registerTask('javascript', ['eslint', 'uglify']);
114114

115115
grunt.event.on('watch', function(action, filepath, target) {
116116
grunt.log.writeln(target + ': ' + filepath + ' has ' + action);

0 commit comments

Comments
 (0)