mirror of https://github.com/portainer/portainer
chore(gruntfile): use eslint instead of jshint
parent
df3a529f0a
commit
5b81b35bf8
27
gruntfile.js
27
gruntfile.js
|
@ -1,7 +1,7 @@
|
||||||
module.exports = function (grunt) {
|
module.exports = function (grunt) {
|
||||||
|
|
||||||
grunt.loadNpmTasks('grunt-contrib-concat');
|
grunt.loadNpmTasks('grunt-contrib-concat');
|
||||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
grunt.loadNpmTasks('gruntify-eslint');
|
||||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||||
|
@ -16,7 +16,7 @@ module.exports = function (grunt) {
|
||||||
grunt.loadNpmTasks('grunt-replace');
|
grunt.loadNpmTasks('grunt-replace');
|
||||||
|
|
||||||
// Default task.
|
// Default task.
|
||||||
grunt.registerTask('default', ['jshint', 'build']);
|
grunt.registerTask('default', ['eslint', 'build']);
|
||||||
grunt.registerTask('build', [
|
grunt.registerTask('build', [
|
||||||
'clean:app',
|
'clean:app',
|
||||||
'if:unixBinaryNotExist',
|
'if:unixBinaryNotExist',
|
||||||
|
@ -110,7 +110,7 @@ module.exports = function (grunt) {
|
||||||
'clean:tmp',
|
'clean:tmp',
|
||||||
'replace'
|
'replace'
|
||||||
]);
|
]);
|
||||||
grunt.registerTask('lint', ['jshint']);
|
grunt.registerTask('lint', ['eslint']);
|
||||||
grunt.registerTask('run', ['if:unixBinaryNotExist', 'build', 'shell:buildImage', 'shell:run']);
|
grunt.registerTask('run', ['if:unixBinaryNotExist', 'build', 'shell:buildImage', 'shell:run']);
|
||||||
grunt.registerTask('run-swarm', ['if:unixBinaryNotExist', 'build', 'shell:buildImage', 'shell:runSwarm', 'watch:buildSwarm']);
|
grunt.registerTask('run-swarm', ['if:unixBinaryNotExist', 'build', 'shell:buildImage', 'shell:runSwarm', 'watch:buildSwarm']);
|
||||||
grunt.registerTask('run-swarm-local', ['if:unixBinaryNotExist', 'build', 'shell:buildImage', 'shell:runSwarmLocal', 'watch:buildSwarm']);
|
grunt.registerTask('run-swarm-local', ['if:unixBinaryNotExist', 'build', 'shell:buildImage', 'shell:runSwarmLocal', 'watch:buildSwarm']);
|
||||||
|
@ -335,24 +335,11 @@ module.exports = function (grunt) {
|
||||||
tasks: ['build', 'shell:buildImage', 'shell:runSsl', 'shell:cleanImages']
|
tasks: ['build', 'shell:buildImage', 'shell:runSsl', 'shell:cleanImages']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
jshint: {
|
eslint: {
|
||||||
files: ['gruntfile.js', '<%= src.js %>'],
|
src: ['gruntfile.js', '<%= src.js %>'],
|
||||||
options: {
|
options: {
|
||||||
curly: true,
|
configFile: '.eslintrc.yml'
|
||||||
eqeqeq: true,
|
}
|
||||||
immed: true,
|
|
||||||
indent: 2,
|
|
||||||
latedef: 'nofunc',
|
|
||||||
newcap: true,
|
|
||||||
noarg: true,
|
|
||||||
sub: true,
|
|
||||||
boss: true,
|
|
||||||
eqnull: true,
|
|
||||||
globals: {
|
|
||||||
angular: false,
|
|
||||||
'$': false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
shell: {
|
shell: {
|
||||||
buildImage: {
|
buildImage: {
|
||||||
|
|
|
@ -41,7 +41,8 @@
|
||||||
"grunt-recess": "~0.3",
|
"grunt-recess": "~0.3",
|
||||||
"grunt-replace": "^1.0.1",
|
"grunt-replace": "^1.0.1",
|
||||||
"grunt-shell": "^1.1.2",
|
"grunt-shell": "^1.1.2",
|
||||||
"grunt-usemin": "^3.1.1"
|
"grunt-usemin": "^3.1.1",
|
||||||
|
"gruntify-eslint": "^3.1.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "bower install"
|
"postinstall": "bower install"
|
||||||
|
|
Loading…
Reference in New Issue