From d873c9871cdb9b95fa68732d20a3177c7012b672 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 12:53:40 +0000 Subject: [PATCH 1/3] chore(deps-dev): bump eslint from 8.57.1 to 9.17.0 Bumps [eslint](https://github.com/eslint/eslint) from 8.57.1 to 9.17.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.57.1...v9.17.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 786c745..63c9538 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "devDependencies": { "c8": "^10.1.2", "chai": "^4.3.7", - "eslint": "^8.57.0", + "eslint": "^9.17.0", "eslint-config-hexo": "^5.0.0", "hexo": "^7.1.1", "mocha": "^10.4.0" From 759e69446e613c59844c5b12699dfdd4b9575e3a Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Mon, 30 Dec 2024 13:50:59 +0000 Subject: [PATCH 2/3] fix eslint --- .eslintignore | 3 --- .eslintrc | 5 +---- eslint.config.js | 3 +++ lib/renderer.js | 2 +- package.json | 4 ++-- test/.eslintrc | 3 --- test/eslint.config.js | 5 +++++ 7 files changed, 12 insertions(+), 13 deletions(-) delete mode 100644 .eslintignore create mode 100644 eslint.config.js delete mode 100644 test/.eslintrc create mode 100644 test/eslint.config.js diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index f6b9638..0000000 --- a/.eslintignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules/ -coverage/ -tmp/ \ No newline at end of file diff --git a/.eslintrc b/.eslintrc index 4ab2c05..d6ed5dc 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,4 +1 @@ -{ - "extends": "hexo", - "root": true -} +const config = require("eslint-config-hexo"); module.exports = config; \ No newline at end of file diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..a13e60f --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,3 @@ +const config = require('eslint-config-hexo/eslint'); + +module.exports = config; diff --git a/lib/renderer.js b/lib/renderer.js index e16894b..91ec16e 100644 --- a/lib/renderer.js +++ b/lib/renderer.js @@ -89,7 +89,7 @@ const renderer = { try { out += encodeURL(href); - } catch (e) { + } catch { out += href; } diff --git a/package.json b/package.json index 63c9538..6954885 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Markdown renderer plugin for Hexo", "main": "index", "scripts": { - "eslint": "eslint .", + "eslint": "eslint --flag unstable_config_lookup_from_file lib/ test/ index.js", "test": "mocha test/index.js", "test-cov": "c8 --reporter=lcovonly npm run test" }, @@ -40,7 +40,7 @@ "c8": "^10.1.2", "chai": "^4.3.7", "eslint": "^9.17.0", - "eslint-config-hexo": "^5.0.0", + "eslint-config-hexo": "github:yoshinorin/eslint-config-hexo#chore/migrate-to-flatconfig", "hexo": "^7.1.1", "mocha": "^10.4.0" }, diff --git a/test/.eslintrc b/test/.eslintrc deleted file mode 100644 index fef0a05..0000000 --- a/test/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "hexo/test" -} diff --git a/test/eslint.config.js b/test/eslint.config.js new file mode 100644 index 0000000..4545a72 --- /dev/null +++ b/test/eslint.config.js @@ -0,0 +1,5 @@ +'use strict'; + +const config = require('eslint-config-hexo/test'); + +module.exports = config; From be6d27d293c310e310f285ccaf74cf63402badc3 Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Mon, 30 Dec 2024 23:42:25 +0800 Subject: [PATCH 3/3] Delete .eslintrc Signed-off-by: Mimi <1119186082@qq.com> --- .eslintrc | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .eslintrc diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index d6ed5dc..0000000 --- a/.eslintrc +++ /dev/null @@ -1 +0,0 @@ -const config = require("eslint-config-hexo"); module.exports = config; \ No newline at end of file