diff --git a/searx/static/themes/simple/.eslintrc.json b/searx/static/themes/simple/.eslintrc.json deleted file mode 100644 index df53fcce8..000000000 --- a/searx/static/themes/simple/.eslintrc.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "env": { - "browser": true, - "es2021": true, - "node": true - }, - "extends": "eslint:recommended", - "parserOptions": { - "ecmaVersion": 12 - }, - "rules": { - "indent": ["error", 2], - "keyword-spacing": ["error", { "before": true, "after": true }], - "no-trailing-spaces": 2, - "space-before-function-paren": ["error", "always"], - "space-infix-ops": "error", - "comma-spacing": ["error", { "before": false, "after": true }], - "brace-style": ["error", "1tbs", { "allowSingleLine": true }], - "curly": ["error", "multi-line"], - "block-spacing": ["error", "always"], - "dot-location": ["error", "property"], - "key-spacing": ["error", { "beforeColon": false, "afterColon": true }], - "spaced-comment": ["error", "always", { - "line": { "markers": ["*package", "!", "/", ",", "="] }, - "block": { "balanced": true, "markers": ["*package", "!", ",", ":", "::", "flow-include"], "exceptions": ["*"] } - }] - } -} diff --git a/searx/static/themes/simple/eslint.config.js b/searx/static/themes/simple/eslint.config.js new file mode 100644 index 000000000..bc82727b5 --- /dev/null +++ b/searx/static/themes/simple/eslint.config.js @@ -0,0 +1,26 @@ +module.exports = [ + { + "rules": { + "indent": ["error", 2], + "keyword-spacing": ["error", { "before": true, "after": true }], + "no-trailing-spaces": 2, + "space-before-function-paren": ["error", "always"], + "space-infix-ops": "error", + "comma-spacing": ["error", { "before": false, "after": true }], + "brace-style": ["error", "1tbs", { "allowSingleLine": true }], + "curly": ["error", "multi-line"], + "block-spacing": ["error", "always"], + "dot-location": ["error", "property"], + "key-spacing": ["error", { "beforeColon": false, "afterColon": true }], + "spaced-comment": [ + "error", "always", { + "line": { "markers": ["*package", "!", "/", ",", "="] }, + "block": { "balanced": true, "markers": ["*package", "!", ",", ":", "::", "flow-include"], "exceptions": ["*"] } + } + ] + }, + languageOptions: { + ecmaVersion: 12 + } + } +]; diff --git a/searx/static/themes/simple/gruntfile.js b/searx/static/themes/simple/gruntfile.js index 9410a674b..921b30e97 100644 --- a/searx/static/themes/simple/gruntfile.js +++ b/searx/static/themes/simple/gruntfile.js @@ -35,7 +35,7 @@ module.exports = function (grunt) { }, eslint: { options: { - overrideConfigFile: '.eslintrc.json', + overrideConfigFile: 'eslint.config.js', failOnError: true, fix: grunt.option('fix') },