Added jshint and jscs checks to Grunt tasks.

This commit is contained in:
Alexander Zobnin
2016-09-27 20:19:35 +03:00
parent 07ad717df4
commit e10b831a91
2 changed files with 29 additions and 1 deletions

View File

@@ -68,6 +68,29 @@ module.exports = function(grunt) {
'dist/panel-triggers/css/panel_triggers.css' : 'src/panel-triggers/sass/panel_triggers.scss', 'dist/panel-triggers/css/panel_triggers.css' : 'src/panel-triggers/sass/panel_triggers.scss',
} }
} }
},
jshint: {
source: {
files: {
src: ['src/**/*.js'],
}
},
options: {
jshintrc: true,
reporter: require('jshint-stylish'),
ignores: [
'node_modules/*',
'dist/*',
]
}
},
jscs: {
src: ['src/**/*.js'],
options: {
config: ".jscs.json",
},
} }
}); });
@@ -76,7 +99,9 @@ module.exports = function(grunt) {
'clean', 'clean',
'copy:src_to_dist', 'copy:src_to_dist',
'copy:pluginDef', 'copy:pluginDef',
'sass',
'babel', 'babel',
'sass' 'jshint',
'jscs'
]); ]);
}; };

View File

@@ -32,6 +32,9 @@
"babel-plugin-transform-es2015-modules-systemjs": "^6.5.0", "babel-plugin-transform-es2015-modules-systemjs": "^6.5.0",
"babel-plugin-transform-es2015-for-of": "^6.5.0", "babel-plugin-transform-es2015-for-of": "^6.5.0",
"babel-preset-es2015": "^6.5.0", "babel-preset-es2015": "^6.5.0",
"grunt-contrib-jshint": "^1.0.0",
"grunt-jscs": "^2.8.0",
"jshint-stylish": "^2.1.0",
"lodash": "~4.0.0" "lodash": "~4.0.0"
}, },
"homepage": "http://grafana-zabbix.org" "homepage": "http://grafana-zabbix.org"