Skip to content

Commit d19cc63

Browse files
committed
update node packages, grunt tasks and eslint rules.
1 parent 26733f9 commit d19cc63

File tree

3 files changed

+24
-29
lines changed

3 files changed

+24
-29
lines changed

.eslintrc

+5-9
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,19 @@
4949
"getWithoutSet": true
5050
}],
5151
"block-scoped-var": 2,
52-
"complexity": [2, 20], /** TODO should try to get this lower **/
52+
"complexity": [1, 20], /** TODO always try to get this lower **/
5353
"consistent-return": 2,
5454
"curly": 2,
5555
"default-case": 2,
5656
"dot-location": [2, "property"],
5757
"dot-notation": 2,
5858
"eqeqeq": 2,
5959
"guard-for-in": 2,
60+
"max-statements": [1, 40, {"ignoreTopLevelFunctions": true}],
6061
"no-alert": 2,
6162
"no-caller": 2,
6263
"no-div-regex": 2,
6364
"no-else-return": 2,
64-
"no-empty-label": 2,
6565
"no-empty-pattern": 2,
6666
"no-eq-null": 2,
6767
"no-eval": 2,
@@ -151,15 +151,14 @@
151151
"comma-style": 2,
152152
"computed-property-spacing": [2, "never"],
153153
"consistent-this": [2, "self"],
154-
"constructor-super": 2,
155154
"func-style": [2, "declaration"],
156-
"id-match": [2, "^[a-z]+([A-Z][a-z]+)*$", {"properties": true}],
157155
"indent": [2, 4],
158156
"key-spacing": [2, {
159157
"beforeColon": false,
160158
"afterColon": true,
161159
"mode": "strict"
162160
}],
161+
"keyword-spacing": [2, {"before": true, "after": true, "overrides": {}}],
163162
"max-nested-callbacks": [2, 4],
164163
"new-cap": 2,
165164
"new-parens": 2,
@@ -177,13 +176,10 @@
177176
"after": true
178177
}],
179178
"semi": [2, "always"],
180-
"space-after-keywords": [2, "always"],
181179
"space-before-blocks": [2, "always"],
182180
"space-before-function-paren": [2, "always"],
183-
"space-before-keywords": [2, "always"],
184181
"space-in-parens": [2, "never"],
185182
"space-infix-ops": 2,
186-
"space-return-throw-case": 2,
187183
"wrap-regex": 2,
188184

189185
// ignored stylistic rules
@@ -242,8 +238,8 @@
242238
"browser": true
243239
},
244240
"globals": {
245-
"define": false,
246-
"require": false
241+
"define": true,
242+
"require": true
247243
},
248244
"parser": "babel-eslint",
249245
"extends": "eslint:recommended"

gruntfile.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/* global module */
22
module.exports = function (grunt) {
3-
'use strict';
43

54
// grunt task config
65
grunt.initConfig({
@@ -23,7 +22,7 @@ module.exports = function (grunt) {
2322
src: ['dist']
2423
}
2524
},
26-
autoprefixer: {
25+
postcss: {
2726
build: {
2827
expand: true,
2928
cwd: 'dist/widgets',
@@ -130,7 +129,7 @@ module.exports = function (grunt) {
130129
// load the tasks
131130
grunt.loadNpmTasks('grunt-contrib-copy');
132131
grunt.loadNpmTasks('grunt-contrib-clean');
133-
grunt.loadNpmTasks('grunt-autoprefixer');
132+
grunt.loadNpmTasks('grunt-postcss');
134133
grunt.loadNpmTasks('grunt-contrib-cssmin');
135134
grunt.loadNpmTasks('grunt-contrib-csslint');
136135
grunt.loadNpmTasks('grunt-contrib-uglify');
@@ -146,6 +145,6 @@ module.exports = function (grunt) {
146145
grunt.registerTask('build', 'Compiles all of the assets and copies the files to the build directory.', ['clean', 'copy', 'scripts', 'stylesheets', 'compress:build']);
147146
grunt.registerTask('build-view', 'Compiles all of the assets and copies the files to the build directory starts a web server and opens browser to preview app.', ['clean', 'copy', 'scripts', 'stylesheets', 'compress:build', 'connect:build', 'open:build_browser', 'watch:build']);
148147
grunt.registerTask('scripts', 'Compiles the JavaScript files.', ['eslint', 'uglify']);
149-
grunt.registerTask('stylesheets', 'Auto prefixes css and compiles the stylesheets.', ['csslint', 'autoprefixer', 'cssmin']);
148+
grunt.registerTask('stylesheets', 'Auto prefixes css and compiles the stylesheets.', ['csslint', 'postcss', 'cssmin']);
150149
grunt.registerTask('lint', 'Run simple eslint and csslint.', ['eslint', 'csslint']);
151150
};

package.json

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
{
22
"name": "cmv-widgets",
3-
"version": "v1.5.0",
3+
"version": "v1.6.0",
44
"author": "Tim McGee, MoosePoint Technology",
55
"license": "MIT",
6-
"year": "2015",
6+
"year": "2016",
77
"homepage": "https://tmcgee.github.io/cmv-widgets/",
88
"repository": "https://github.com/tmcgee/cmv-widgets",
99
"dependencies": {
1010
"csslint": "0.10.x",
11-
"babel-eslint": "4.1.x",
12-
"eslint": "1.10.x",
11+
"babel-eslint": "6.0.x",
12+
"eslint": "2.5.x",
1313
"grunt": "0.4.x",
14-
"grunt-autoprefixer": "0.7.x",
15-
"grunt-contrib-clean": "0.5.x",
16-
"grunt-contrib-connect": "0.7.x",
17-
"grunt-contrib-copy": "0.5.x",
18-
"grunt-contrib-csslint": "0.5.x",
19-
"grunt-contrib-cssmin": "0.9.x",
20-
"grunt-eslint": "17.3.x",
21-
"grunt-contrib-uglify": "0.4.x",
22-
"grunt-contrib-watch": "0.6.x",
23-
"grunt-newer": "0.7.x",
14+
"grunt-postcss": "0.8.x",
15+
"grunt-contrib-clean": "1.0.x",
16+
"grunt-contrib-connect": "1.0.x",
17+
"grunt-contrib-copy": "1.0.x",
18+
"grunt-contrib-csslint": "1.0.x",
19+
"grunt-contrib-cssmin": "1.0.x",
20+
"grunt-eslint": "18.0.x",
21+
"grunt-contrib-uglify": "1.0.x",
22+
"grunt-contrib-watch": "1.0.x",
23+
"grunt-newer": "1.1.x",
2424
"grunt-open": "0.2.x",
25-
"grunt-contrib-compress": "0.10.x"
25+
"grunt-contrib-compress": "1.2.x"
2626
},
27-
"engine": "node >= 0.12"
27+
"engine": "node >= 4"
2828
}

0 commit comments

Comments
 (0)