mirror of https://github.com/searxng/searxng.git
eslint: grunt integration
This commit is contained in:
parent
2948a99b6e
commit
0ee316f3d1
2
manage
2
manage
|
@ -665,8 +665,6 @@ themes.oscar() {
|
||||||
themes.simple() {
|
themes.simple() {
|
||||||
build_msg GRUNT "theme: simple"
|
build_msg GRUNT "theme: simple"
|
||||||
npm --prefix searx/static/themes/simple run build
|
npm --prefix searx/static/themes/simple run build
|
||||||
# just report eslint issues but do not break the build (--force)
|
|
||||||
npm --prefix searx/static/themes/simple run eslint --force
|
|
||||||
dump_return $?
|
dump_return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
},
|
},
|
||||||
"extends": "eslint:recommended",
|
"extends": "eslint:recommended",
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"ecmaVersion": 12,
|
"ecmaVersion": 12
|
||||||
"sourceType": "module"
|
|
||||||
},
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,15 +9,13 @@ module.exports = function(grunt) {
|
||||||
watch: {
|
watch: {
|
||||||
scripts: {
|
scripts: {
|
||||||
files: ['src/**'],
|
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: {
|
eslint: {
|
||||||
options: {
|
options: {
|
||||||
configFile: '.eslintrc.json'
|
configFile: '.eslintrc.json',
|
||||||
|
failOnError: false
|
||||||
},
|
},
|
||||||
target: [
|
target: [
|
||||||
'src/js/main/*.js',
|
'src/js/main/*.js',
|
||||||
|
@ -204,8 +202,7 @@ module.exports = function(grunt) {
|
||||||
grunt.registerTask('test', ['jshint']);
|
grunt.registerTask('test', ['jshint']);
|
||||||
|
|
||||||
grunt.registerTask('default', [
|
grunt.registerTask('default', [
|
||||||
// 'eslint',
|
'eslint',
|
||||||
'jshint',
|
|
||||||
'stylelint',
|
'stylelint',
|
||||||
'copy',
|
'copy',
|
||||||
'concat',
|
'concat',
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^7.32.0",
|
|
||||||
"grunt-cli": "^1.4.3",
|
"grunt-cli": "^1.4.3",
|
||||||
"grunt": "~1.4.1",
|
"grunt": "~1.4.1",
|
||||||
"grunt-contrib-copy": "^1.0.0",
|
"grunt-contrib-copy": "^1.0.0",
|
||||||
|
@ -14,7 +13,7 @@
|
||||||
"grunt-eslint": "^23.0.0",
|
"grunt-eslint": "^23.0.0",
|
||||||
"grunt-webfont": "^1.7.2",
|
"grunt-webfont": "^1.7.2",
|
||||||
"ionicons-npm": "^2.0.1",
|
"ionicons-npm": "^2.0.1",
|
||||||
"jslint": "^0.12.1",
|
"eslint": "^7.32.0",
|
||||||
"less": "^4.1.1",
|
"less": "^4.1.1",
|
||||||
"less-plugin-clean-css": "^1.5.1",
|
"less-plugin-clean-css": "^1.5.1",
|
||||||
"stylelint": "^13.13.1",
|
"stylelint": "^13.13.1",
|
||||||
|
|
Loading…
Reference in New Issue