From d58c40522b62dddbd836d0c70c2635037362a467 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Apr 2024 16:12:44 +0000 Subject: [PATCH 1/2] [upd] npm: Bump grunt-eslint in /searx/static/themes/simple Bumps [grunt-eslint](https://github.com/sindresorhus/grunt-eslint) from 24.3.0 to 25.0.0. - [Release notes](https://github.com/sindresorhus/grunt-eslint/releases) - [Commits](https://github.com/sindresorhus/grunt-eslint/compare/v24.3.0...v25.0.0) --- updated-dependencies: - dependency-name: grunt-eslint dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- searx/static/themes/simple/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/static/themes/simple/package.json b/searx/static/themes/simple/package.json index 0114028b5..b4ece0cf7 100644 --- a/searx/static/themes/simple/package.json +++ b/searx/static/themes/simple/package.json @@ -8,7 +8,7 @@ "grunt-contrib-uglify": "~5.2.1", "grunt-xmlmin": "~0.1.8", "grunt-contrib-watch": "~1.1.0", - "grunt-eslint": "^24.0.0", + "grunt-eslint": "^25.0.0", "grunt-stylelint": "^0.16.0", "grunt-image": "^6.4.0", "ionicons": "^7.1.0", From 766823a64b07e839cfb07a101f52353f54590cca Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Wed, 15 May 2024 16:57:22 +0200 Subject: [PATCH 2/2] [fix] eslint: migrate JSON config to flat-config (.eslintrc.json -> eslint.config.js) In ESLint v9.0.0, ``eslint.config.js`` is the new default configuration format. The previous format, ``eslintrc``, is now deprecated and will not automatically be searched for. [1] This migration was done with the help of the "Configuration Migration Guide" [2] [1] https://eslint.org/docs/latest/use/migrate-to-9.0.0#flat-config [2] https://eslint.org/docs/latest/use/configure/migration-guide Signed-off-by: Markus Heiser --- searx/static/themes/simple/.eslintrc.json | 28 --------------------- searx/static/themes/simple/eslint.config.js | 26 +++++++++++++++++++ searx/static/themes/simple/gruntfile.js | 2 +- 3 files changed, 27 insertions(+), 29 deletions(-) delete mode 100644 searx/static/themes/simple/.eslintrc.json create mode 100644 searx/static/themes/simple/eslint.config.js 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') },