From 2948a99b6e51c42039025b049d8f92e92b1b7d2c Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sun, 1 Aug 2021 16:04:19 +0200 Subject: [mod] simple theme - add ESLint [1] https://eslint.org/ [2] https://eslint.org/docs/user-guide/configuring/ [3] https://eslint.org/docs/user-guide/command-line-interface Signed-off-by: Markus Heiser --- searx/static/themes/simple/gruntfile.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'searx/static/themes/simple/gruntfile.js') diff --git a/searx/static/themes/simple/gruntfile.js b/searx/static/themes/simple/gruntfile.js index 7e5ad5466..049e21fca 100644 --- a/searx/static/themes/simple/gruntfile.js +++ b/searx/static/themes/simple/gruntfile.js @@ -15,6 +15,16 @@ module.exports = function(grunt) { jshint: { files: ['src/js/main/*.js', 'src/js/head/*.js', '../__common__/js/*.js'], }, + eslint: { + options: { + configFile: '.eslintrc.json' + }, + target: [ + 'src/js/main/*.js', + 'src/js/head/*.js', + '../__common__/js/*.js' + ], + }, stylelint: { options: { formatter: 'unix', @@ -189,10 +199,12 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-webfont'); grunt.loadNpmTasks('grunt-stylelint'); + grunt.loadNpmTasks('grunt-eslint'); grunt.registerTask('test', ['jshint']); grunt.registerTask('default', [ + // 'eslint', 'jshint', 'stylelint', 'copy', -- cgit v1.2.3 From 0ee316f3d1561853ceb26fc3cf4ec673f575168d Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Tue, 24 Aug 2021 09:52:40 +0200 Subject: eslint: grunt integration --- searx/static/themes/simple/gruntfile.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'searx/static/themes/simple/gruntfile.js') diff --git a/searx/static/themes/simple/gruntfile.js b/searx/static/themes/simple/gruntfile.js index 049e21fca..47e5a962e 100644 --- a/searx/static/themes/simple/gruntfile.js +++ b/searx/static/themes/simple/gruntfile.js @@ -9,15 +9,13 @@ module.exports = function(grunt) { watch: { scripts: { files: ['src/**'], - tasks: ['jshint', 'copy', 'concat', 'uglify', 'less:development', 'less:production'] + tasks: ['eslint', 'copy', 'concat', 'uglify', 'less:development', 'less:production'] } }, - jshint: { - files: ['src/js/main/*.js', 'src/js/head/*.js', '../__common__/js/*.js'], - }, eslint: { options: { - configFile: '.eslintrc.json' + configFile: '.eslintrc.json', + failOnError: false }, target: [ 'src/js/main/*.js', @@ -204,8 +202,7 @@ module.exports = function(grunt) { grunt.registerTask('test', ['jshint']); grunt.registerTask('default', [ - // 'eslint', - 'jshint', + 'eslint', 'stylelint', 'copy', 'concat', -- cgit v1.2.3